From wsheldahl at qx.net Wed Mar 1 23:57:08 2000 From: wsheldahl at qx.net (Wesley) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Victory over VFP ODBC! (almost) References: <4.1.20000210235130.00dca790@mail.ket.org> Message-ID: <38BE02B4.529D5D69@qx.net> David Hempy wrote: > > You all have heard me whining recently over my ODBC woes connecting to a > Visual FoxPro data source and writing Memo fields over 255 characters. > I've reached a point where I cannot ignore this limitation any more, so I > sat out to slay the beast. The good news is...VICTORY! > > It turns out there is a limitation (I call it a bug) in VFP's ODBC driver > of 254 characters for string literals. *Strings* can be longer, but not > string literals. So you can't say something like: [snip] > I have updated the verse field to be a string made of the concatenation of > several smaller string literals, each of which is 100 characters. Note it > is not a limitation of the string, but of the string *literal*. Go figure! > > So I've written a subroutine to break it up, and also escape apostrophes in > the string at the same time: [snip] > ...grr...Now for the bad news... > > Okay, so I start to really load it down after writing this much of my > victory memoirs. All my tests have been 300-400 characters up until now. > I start throwing several-KB values at it, and start getting runtime > exceptions again! A little playing around, and the closest I can narrow it > down is "somewhere around 500 bytes". Depending on how I split it, it > starts crashing between around 450 to 510 characters. I'm pretty sure it's > not a 512 byte limit, not of the resulting string nor of the "concatenating > strings". > > Ugh. Just when I had popped the cork. > > Okay...I concede for the evening...I'm going home. Anyone have any ideas? > > -dave |-( Ok, so update statements don't seem to work. Does VFP have any kind of bulk import facility? Would it be possible to write the new records to either a text file or to a different database's temp table or somewhere, then bulk import them into VFP? This is a kludgy solution at best and has several possible pitfalls. The import might balk at overwriting records with the same key; if so, you might have to delete the old record(s) before inserting the new one(s). If you do that, make sure you have some sort of transaction in place so you can roll back the deletion if the import fails for some reason. A bigger stretch would be to see if VFP has a blob or binary datatype, and if so, see if storing stuff that way would still let you manipulate the data you need to. It would probably get around the string literal limitation (I hope), but might introduce other problems. HTH. Let us know when you have a final solution; I'd like to learn what winds up working. -- Wes Sheldahl wsheldahl@qx.net From oneiros at dcr.net Mon Mar 6 14:08:07 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Computer Fest, Dayton, Ohio Message-ID: For those interested, I just realized that ComputerFest is this coming weekend-- http://www.computerfest.com/ Some of the deals there are good (and tend to disappear early on Saturday), some aren't... (If you have a wishlist, it's good to check prices on Pricewatch or whatever your prefered pricing guide is, and go up there informed) It also helps to take something with a decent carrying capacity, as there's a few places with decent prices on monitors, and some places have had racks & cabinet enclosures -Joe From dpitts at mk.net Mon Mar 6 14:26:23 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: LPM's dinner with Nat T. Message-ID: <007301bf87aa$3d9f3fa0$7801a8c0@adverb.com> I just wanted to say that I enjoyed last Wednesday's dinner with Nat. Thanks, David David Pitts President, Professional Consulting Services (606) 552-3262 www.dpitts.com dpitts@mk.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/lexington-pm/attachments/20000306/eb34ff8f/attachment.htm From fprice at mis.net Tue Mar 7 12:49:14 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering Message-ID: Hi LexPM, I want to text-wrap a string to 50 columns before printing it to sendmail. In the shell, I'd do this: echo "Really long string ..." | fmt -50 | mail How can I do the same in perl? I tried something like the following, essentially from the Cookbook, but it just printed to my terminal's stdout and then hung until I ctrl-D. I realize I could use a temp array to hold the formatted output, but for some reason this seems more "elegant" -- is there any way to make it work? -Frank. $width = 50; $string = "Now is the time for all good men to come to the aid of \ their country! E Pluribus Unix, and all that! This is a very \ very very long string, ain't it?"; &fmt($string, $width); open(SM, "| /usr/lib/sendmail -oi -t") or die "Can't open sendmail: $!\n"; print SM "To: blah@blah.com\n\n"; while (<>) { print SM $_; } close STDIN; close SM; exit; sub fmt { my ($s, $w) = @_; return if $pid = open(STDOUT, "|-"); # we're left w/ the child die "Cannot fork: $!\n" unless defined $pid; open(FMT, "| /usr/bin/fmt -$w") or die "Can't use fmt: $!\n"; print FMT $string; close FMT; exit; } From oneiros at dcr.net Tue Mar 7 13:38:41 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering In-Reply-To: Message-ID: On Tue, 7 Mar 2000, Frank Price wrote: > Hi LexPM, > > I want to text-wrap a string to 50 columns before printing it to > sendmail. In the shell, I'd do this: > > echo "Really long string ..." | fmt -50 | mail > > How can I do the same in perl? I tried something like the following, > essentially from the Cookbook, but it just printed to my terminal's > stdout and then hung until I ctrl-D. I realize I could use a temp > array to hold the formatted output, but for some reason this seems > more "elegant" -- is there any way to make it work? I've never used it, but both the format command, and Text::Wrap chould do it.. using Text::Wrap, it'd be something like this: use Text::Wrap; $Text::Wrap::columns = 50; my $output = ('', '', $input); (with $input having the text to wrap, and you using $output for whatever) Text::Wrap is also covered in Programming Perl -Joe From fprice at mis.net Tue Mar 7 14:18:41 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering In-Reply-To: Message-ID: On Tue, 7 Mar 2000, Joe Hourcle wrote: # On Tue, 7 Mar 2000, Frank Price wrote: # # > Hi LexPM, # > # > I want to text-wrap a string to 50 columns before printing it to # > sendmail. In the shell, I'd do this: # > # > echo "Really long string ..." | fmt -50 | mail # > # > How can I do the same in perl? I tried something like the following, # > essentially from the Cookbook, but it just printed to my terminal's # > stdout and then hung until I ctrl-D. I realize I could use a temp # > array to hold the formatted output, but for some reason this seems # > more "elegant" -- is there any way to make it work? # # I've never used it, but both the format command, and Text::Wrap chould do # it.. # # using Text::Wrap, it'd be something like this: Yah, I know about Text::Wrap, and it works great. Seemed a shame to load a module just for that if I could roll my own though (although forking might be just as bad). Anyway, a more abstract version of my question is: Can I pipe to a program, print to it, and then read from that stdout so I can do something else with it? The "fork off another process" idea from the Cookbook seems to be what I want, but something's going wrong. -Frank. -- Frank Price fprice@mis.net E Pluribus Unix | Linux: Choice of a GNU Generation | Why not go mad? From fireston at lexmark.com Tue Mar 7 15:26:10 2000 From: fireston at lexmark.com (Mik Firestone) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering In-Reply-To: Message-ID: <200003072126.QAA20465@interlock2.lexmark.com> Sigh. I never showed you this. Please understand it actually only splits the line at the whitespace nearest to char 50. It will not slice a line into as many ~50 char pieces as it can. As usual, this is very specific and runs fast. Text::Wrap does it generically and runs slower. Your choice. To see how this works, pipe ypcat across . The regex is, of course, the heart and soul. You can change the record seperator by replacing the space. You can control the length of the bits by changing the 50. It can go fast or work well. Which one do you want? With neat tricks, you could probably come up with a more generic solution: while ( length( $string ) > 50 ) { $string =~ s/^(.{0,50} (.+)$/$2/; push @stuff, $1; } That is untested. Try it - it may actually work. Mik -------- Included code -------- #!/os/dist/bin/perl -w $" = "|"; while ( ) { @resp = ( /(.{0,50}) (.+)/g ); printf "I split line %d into %d pieces\n", $., scalar @resp; print "@resp\n"; } -- Mik Firestone fireston@lexmark.com When I become an Evil Overlord: I will have young lads/lasses in strange clothes, with foreign accents, REGULARLY climb some monument in the main sqaure of my capital and denounce me, claim to know the secret of my power, rally the masses to rebellion, etc. That way, the citizens will be jaded in case the real thing ever comes along. On Tue, 7 Mar 2000, Frank Price wrote: > On Tue, 7 Mar 2000, Joe Hourcle wrote: > > # On Tue, 7 Mar 2000, Frank Price wrote: > # > # > Hi LexPM, > # > > # > I want to text-wrap a string to 50 columns before printing it to > # > sendmail. In the shell, I'd do this: > # > > # > echo "Really long string ..." | fmt -50 | mail > # > > # > How can I do the same in perl? I tried something like the following, > # > essentially from the Cookbook, but it just printed to my terminal's > # > stdout and then hung until I ctrl-D. I realize I could use a temp > # > array to hold the formatted output, but for some reason this seems > # > more "elegant" -- is there any way to make it work? > # > # I've never used it, but both the format command, and Text::Wrap chould do > # it.. > # > # using Text::Wrap, it'd be something like this: > > Yah, I know about Text::Wrap, and it works great. Seemed a shame to > load a module just for that if I could roll my own though (although > forking might be just as bad). > > Anyway, a more abstract version of my question is: Can I pipe to a > program, print to it, and then read from that stdout so I can do > something else with it? The "fork off another process" idea from the > Cookbook seems to be what I want, but something's going wrong. > > -Frank. > -- > Frank Price fprice@mis.net > E Pluribus Unix | Linux: Choice of a GNU Generation | Why not go mad? > > > From oneiros at dcr.net Tue Mar 7 15:29:18 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering In-Reply-To: Message-ID: On Tue, 7 Mar 2000, Frank Price wrote: > Yah, I know about Text::Wrap, and it works great. Seemed a shame to > load a module just for that if I could roll my own though (although > forking might be just as bad). > > Anyway, a more abstract version of my question is: Can I pipe to a > program, print to it, and then read from that stdout so I can do > something else with it? The "fork off another process" idea from the > Cookbook seems to be what I want, but something's going wrong. >From Programming Perl: You may not have an open command that pipes both in and out, although the IPC::Open2 and IPC::Open3 library routines give you a close equivalent. In your example, however, you knew what the arguments were that you were passing it... so you could just as easy call: open (WHATEVER, "echo $input | program to send to |"); (of course, you'd have to make sure that you stripped out any characters that might confuse the shell, which means, doing this badly could result in a major security hole.) -Joe From fireston at lexmark.com Tue Mar 7 15:35:14 2000 From: fireston at lexmark.com (Mik Firestone) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: filtering In-Reply-To: <200003072126.QAA20465@interlock2.lexmark.com> Message-ID: <200003072135.QAA21929@interlock2.lexmark.com> Sorry. If you want to use the loop version, there has to be one push of the string onto to array after the loop. Ie, > With neat tricks, you could probably come up with a more generic solution: > while ( length( $string ) > 50 ) { > $string =~ s/^(.{0,50} (.+)$/$2/; > push @stuff, $1; > } push @stuff, $string; Sorry. -- Mik Firestone fireston@lexmark.com When I become an Evil Overlord: No matter how well it would perform, I will never construct any sort of machinery which is completely indestructable except for one small and virtually inaccessible vulnerable spot. From hempy at ket.org Fri Mar 10 15:03:23 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: RegEx quiz! In-Reply-To: <200003072135.QAA21929@interlock2.lexmark.com> References: <200003072126.QAA20465@interlock2.lexmark.com> Message-ID: <4.3.2.20000310152510.04dcff00@mail.ket.org> Okay, all you macho RegEx wizards... I want to turn a file path into a URL. I want to allow filenames like "../images/logo.gif". I will then prepend the project folder, so you get something like: "/www/mydepartment/myproject/../images/logo.gif". Works fine for file access, but parent references ("../") do not work in URL's. I need to reduce this to "/www/mydepartment/images/logo.gif". I thought I had it licked in a single regex, but it balked when you had grandparent references ("../../"): $url =~ s|/.?/\.\.(?=/)||g; In the end, I resorted to putting the regex in a loop...seems to work, but pains my ego: $url = "/a/b/c/u/../v/../d/e/w/../x/y/z/9/../../../../f/index.html"; print "Start with $url\n"; while ($url =~ s|/.?/\.\.(?=/)||g) { print " Then make $url\n"; } print " End with $url\n"; Anybody have a leaner solution? -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (606)258-7164 -- (800)333-9764 From sungo at earthling.net Fri Mar 10 21:06:17 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi Message-ID: i'm converting a site done in non-mod_perl to mod_perl. the main script that drives the index uses dbi. without mod_perl, this script closed database connections (mysql) properly. now under mod_perl i'm getting all sorts of database connections left open. using Apache::DBI keeps that down to one connection per page load but that's still nasty. disconnect is being called on the sock before script close. any thoughts anyone? thanks all. --------------------- Matt Cashner sungo@earthling.net --------------------- "Attitudes are contagious. Mine might kill you." From rbowen at rcbowen.com Sat Mar 11 19:56:45 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi References: Message-ID: <38CAF95D.12D8C479@rcbowen.com> Matt Cashner wrote: > > i'm converting a site done in non-mod_perl to mod_perl. the main script > that drives the index uses dbi. without mod_perl, this script closed > database connections (mysql) properly. now under mod_perl i'm getting all > sorts of database connections left open. using Apache::DBI keeps that down > to one connection per page load but that's still nasty. disconnect is > being called on the sock before script close. any thoughts anyone? thanks > all. That's correct behavior for mod_perl - it's supposed to ignore disconnect calls. That's one of the major advantages of using mod_perl - that you don't have to open connections to the database, but that you can use the persistent connection, and so save time. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Sat Mar 11 19:58:51 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: RegEx quiz! References: <200003072126.QAA20465@interlock2.lexmark.com> <4.3.2.20000310152510.04dcff00@mail.ket.org> Message-ID: <38CAF9DB.FFF5FE9C@rcbowen.com> David Hempy wrote: > > Okay, all you macho RegEx wizards... > > I want to turn a file path into a URL. I want to allow filenames like > "../images/logo.gif". I will then prepend the project folder, so you get > something like: "/www/mydepartment/myproject/../images/logo.gif". Works > fine for file access, but parent references ("../") do not work in > URL's. I need to reduce this to "/www/mydepartment/images/logo.gif". > > I thought I had it licked in a single regex, but it balked when you had > grandparent references ("../../"): > > $url =~ s|/.?/\.\.(?=/)||g; > > In the end, I resorted to putting the regex in a loop...seems to work, but > pains my ego: > > $url = "/a/b/c/u/../v/../d/e/w/../x/y/z/9/../../../../f/index.html"; > print "Start with $url\n"; > while ($url =~ s|/.?/\.\.(?=/)||g) { > print " Then make $url\n"; > } > print " End with $url\n"; > > Anybody have a leaner solution? Seems to me that this is about the best way to do it. At least, I can't come up with a better one. If you really want to get something better, I'd suggest asking on the Fun With Perl mailing list. I'm sure that someone there will hvae something entertaining. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Sat Mar 11 20:00:40 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Monday's meeting Message-ID: <38CAFA48.DA8DF247@rcbowen.com> As I mentioned earlier, I will not have time to pull together a meeting by Monday. Well, here it is, almost Monday, and it appears that nothing has been done. I just came back from Orlando, and, although I could tell you about ApacheCon, if anyone was really interested, I did not attend many of the Perl-related things there, except for Stas Bekman's mod_perl talk, which I've attended 3 times now, and always learned something useful. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From sungo at earthling.net Sun Mar 12 10:21:37 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi In-Reply-To: <38CAF95D.12D8C479@rcbowen.com> Message-ID: On Sat, 11 Mar 2000, Rich Bowen wrote: > That's correct behavior for mod_perl - it's supposed to ignore > disconnect calls. That's one of the major advantages of using mod_perl - > that you don't have to open connections to the database, but that you > can use the persistent connection, and so save time. any documentation on the 'net someplace that i can hork? i'm pretty sure i have everything configured right; i'm starting up Apache::DBI as recommended and all that but i'm still getting new mysql connections opened... --------------------- Matt Cashner sungo@earthling.net --------------------- "Hard work often pays off after time, but laziness always pays off now." From fprice at mis.net Sun Mar 12 10:27:26 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Monday's meeting In-Reply-To: <38CAFA48.DA8DF247@rcbowen.com> Message-ID: On Sat, 11 Mar 2000, Rich Bowen wrote: # As I mentioned earlier, I will not have time to pull together a meeting # by Monday. Well, here it is, almost Monday, and it appears that nothing # has been done. I just came back from Orlando, and, although I could tell # you about ApacheCon, if anyone was really interested, I did not attend # many of the Perl-related things there, except for Stas Bekman's mod_perl # talk, which I've attended 3 times now, and always learned something # useful. Umm, does that mean no meeting on Monday? I could still ramble on about the debugger if there's no other topic... -Frank. From marek at cs.uky.edu Sun Mar 12 10:40:21 2000 From: marek at cs.uky.edu (Victor Marek) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi In-Reply-To: Matt Cashner "Re: LPM: dbi" (Mar 12, 11:21am) Message-ID: <200003121640.LAA31331@mostowski.cs.engr.uky.edu> There is a book on Perl DBI, it is good not only because of examples, but generally their perspective on DB connectivity is excellent. It is from O`reilly. Victor -- Victor W. Marek Department of Computer Science marek@cs.uky.edu University of Kentucky marek@cs.engr.uky.edu Lexington, KY 40506 606-257-3496 (office) 606-257-3961 (Dept) http://www.cs.engr.uky.edu/~marek 606-323-1971 (FAX) From rbowen at rcbowen.com Sun Mar 12 13:49:56 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Monday's meeting References: Message-ID: <38CBF4E4.14098258@rcbowen.com> Frank Price wrote: > > On Sat, 11 Mar 2000, Rich Bowen wrote: > > # As I mentioned earlier, I will not have time to pull together a meeting > # by Monday. Well, here it is, almost Monday, and it appears that nothing > # has been done. I just came back from Orlando, and, although I could tell > # you about ApacheCon, if anyone was really interested, I did not attend > # many of the Perl-related things there, except for Stas Bekman's mod_perl > # talk, which I've attended 3 times now, and always learned something > # useful. > > Umm, does that mean no meeting on Monday? I could still ramble on > about the debugger if there's no other topic... Did I miss something? If you volunteered to talk about the debugger (I do seem to remember something about that) and people were expecting to come and hear that, I'll retract all my statements, and come along to listen as well. I just did not remember. It was a very full week. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Sun Mar 12 13:52:38 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi References: <200003121640.LAA31331@mostowski.cs.engr.uky.edu> Message-ID: <38CBF586.E97B70F1@rcbowen.com> Victor Marek wrote: > > There is a book on Perl DBI, it is good not only because of examples, > but generally their perspective on DB connectivity is excellent. > It is from O`reilly. Every review that I have read suggests that you're better off just reading the DBI documentation than shelling out the $30 for the DBI book. The guys that wrote it are, of course, the people that are the most qualified to write such a book, being the two lead developers on the DBI project since day 0, but it's just not any better than the free documentation, which is exceptional. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From fprice at mis.net Sun Mar 12 15:04:05 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Monday's meeting In-Reply-To: <38CBF4E4.14098258@rcbowen.com> Message-ID: On Sun, 12 Mar 2000, Rich Bowen wrote: # Frank Price wrote: # > # > On Sat, 11 Mar 2000, Rich Bowen wrote: # > # > # As I mentioned earlier, I will not have time to pull together a meeting # > # by Monday. Well, here it is, almost Monday, and it appears that nothing # > # has been done. I just came back from Orlando, and, although I could tell # > # you about ApacheCon, if anyone was really interested, I did not attend # > # many of the Perl-related things there, except for Stas Bekman's mod_perl # > # talk, which I've attended 3 times now, and always learned something # > # useful. # > # > Umm, does that mean no meeting on Monday? I could still ramble on # > about the debugger if there's no other topic... # # Did I miss something? If you volunteered to talk about the debugger (I # do seem to remember something about that) and people were expecting to # come and hear that, I'll retract all my statements, and come along to # listen as well. I just did not remember. It was a very full week. I did and and do volunteer, but maybe not loudly enough :-) But it's whatever the list wants to do. If I don't hear to the contrary, I'll show up tomorrow. -Frank. -- Frank Price fprice@mis.net E Pluribus Unix | Why not go mad? From janine.ladick at fetterprinting.com Mon Mar 13 08:37:31 2000 From: janine.ladick at fetterprinting.com (Janine Ladick) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi In-Reply-To: <38CBF586.E97B70F1@rcbowen.com> Message-ID: <200003131435.JAA09858@sidewinder.fetterprinting.com> > > There is a book on Perl DBI, it is good not only because of examples, > > but generally their perspective on DB connectivity is excellent. > > It is from O`reilly. > > Every review that I have read suggests that you're better off just > reading the DBI documentation than shelling out the $30 for the DBI > book. The guys that wrote it are, of course, the people that are the > most qualified to write such a book, being the two lead developers on > the DBI project since day 0, but it's just not any better than the free > documentation, which is exceptional. Hmm. I ordered a copy of this from bookpool and it should arrive early this week. (Mental Note: read book reviews *before* making purchases.) Janine ------- Janine Ladick Manager, Data Processing Fetter Printing Company 502-634-4771 x. 310 From rbowen at rcbowen.com Mon Mar 13 08:50:55 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: dbi References: <200003131435.JAA09858@sidewinder.fetterprinting.com> Message-ID: <38CD004F.902A6D83@rcbowen.com> Janine Ladick wrote: > > > > There is a book on Perl DBI, it is good not only because of examples, > > > but generally their perspective on DB connectivity is excellent. > > > It is from O`reilly. > > > > Every review that I have read suggests that you're better off just > > reading the DBI documentation than shelling out the $30 for the DBI > > book. The guys that wrote it are, of course, the people that are the > > most qualified to write such a book, being the two lead developers on > > the DBI project since day 0, but it's just not any better than the free > > documentation, which is exceptional. > > Hmm. I ordered a copy of this from bookpool and it should arrive > early this week. (Mental Note: read book reviews *before* making > purchases.) I expect that I'll eventually buy it, but I suspect that it will be one of those books that I buy and then only use one reference section of, if I ever open it at all. I just find the DBI documentation so good that I can't imagine getting anything more out of the book. Which is basically what the reviews said. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From booberry at io.com Mon Mar 13 08:59:35 2000 From: booberry at io.com (0x29A [B.Vandgrift]) Date: Thu Aug 5 00:05:42 2004 Subject: Perl DBI Book (was: Re: LPM: dbi) In-Reply-To: <38CD004F.902A6D83@rcbowen.com> Message-ID: On Mon, 13 Mar 2000, Rich Bowen wrote: =>I expect that I'll eventually buy it, but I suspect that it will be one =>of those books that I buy and then only use one reference section of, if =>I ever open it at all. I just find the DBI documentation so good that I =>can't imagine getting anything more out of the book. Which is basically =>what the reviews said. >From the point of view of someone who's not very good at databases in general, and less that well-versed in DBI, I found the book most helpful. It gave me enough background and exampling that my handle is now a little more firm. *shrug* I liked it. --ben -- Ben Vandgrift http://www.io.com/~booberry ________________________________________________________________________ "I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has inteded for us to forego their use." --Galileo From rbowen at rcbowen.com Tue Mar 21 22:55:05 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Email attachments Message-ID: <38D85229.F989B004@rcbowen.com> Any of you guys aware of a module that handles email attachments simply? I don't really want to have to use something like MIME::Lite to build the message myself, but I suppose I could. I was hoping that there was a Mail::Something module that would just let me do something like: $mail = new Mail::Something; $mail->attach("/path/to/file"); $mail->recipient('rbowen@rcbowen.com'); $mail->send; Or something along those lines. Any suggestions? Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From repett0 at sac.uky.edu Wed Mar 22 00:06:42 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: wyswyg In-Reply-To: <38D85229.F989B004@rcbowen.com> Message-ID: I probably spelled that wrong, but anyways,.... does anyone know of a perl script that does html editing. No this is the kicker, this script is for pages already made, and can be modified without knowing html. like you should be able to highlight text and click something to make it bold. Thanks Ron From oneiros at dcr.net Wed Mar 22 08:14:37 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Email attachments In-Reply-To: <38D85229.F989B004@rcbowen.com> Message-ID: On Tue, 21 Mar 2000, Rich Bowen wrote: > Any of you guys aware of a module that handles email attachments simply? > I don't really want to have to use something like MIME::Lite to build > the message myself, but I suppose I could. I was hoping that there was a > Mail::Something module that would just let me do something like: > > $mail = new Mail::Something; > $mail->attach("/path/to/file"); > $mail->recipient('rbowen@rcbowen.com'); > $mail->send; > > Or something along those lines. > > Any suggestions? Well, my normal method if digging isn't pretty... ftp://ftp@ftp.cpan.org/pub/CPAN/modules/by-module/Mail/ (and looking through the readmes in there...) The only one that I haven't disproven to be helpful is Mail::Mailtools, and that's only because they don't have a very detailed readme. If that one doesn't do it, MIME::Lite looks like the way to go. ----- Joe Hourcle From rbowen at rcbowen.com Wed Mar 22 08:24:08 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: wyswyg References: Message-ID: <38D8D788.9FE567F0@rcbowen.com> repett0@sac.uky.edu wrote: > > I probably spelled that wrong, but anyways,.... does anyone know of a perl > script that does html editing. No this is the kicker, this script is for > pages already made, and can be modified without knowing html. like you > should be able to highlight text and click something to make it bold. So, you're looking for a WYSIWYG HTML editor? Why does it need to be written in Perl? There are a number of WYSIWYG HTML editors out there. Perl is really not what I would choose for an application of this nature. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From oneiros at dcr.net Wed Mar 22 09:03:53 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: wyswyg In-Reply-To: Message-ID: On Wed, 22 Mar 2000 repett0@sac.uky.edu wrote: > > I probably spelled that wrong, but anyways,.... does anyone know of a perl > script that does html editing. No this is the kicker, this script is for > pages already made, and can be modified without knowing html. like you > should be able to highlight text and click something to make it bold. You're trying to handle this all through a GUI, I assume, as you mentioned 'highlight' and 'click' Perl may not be the best way to handle this sort of thing... I've seen Java programs that do really rudimentary HTML, but in the long run, it's almost easier to open a file in MSWord, change the file and do 'save as HTML' (or WordPerfect, whatever your prefered word processor is) The only thing that I can think of that may even give you a basis to start from is HTML::FromText (which I've never used), which is supposed to build HTML from text files... ----- Joe Hourcle From tom at squarefish.com Wed Mar 22 11:46:50 2000 From: tom at squarefish.com (Tom Scanlan) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: wyswyg References: Message-ID: <000d01bf9426$9a648410$60a4a8c0@openreach.com> Although, writing one in Perl/TK would be fun... -tom ----- Original Message ----- From: Joe Hourcle To: perl mongers Sent: Wednesday, March 22, 2000 9:03 AM Subject: Re: LPM: wyswyg > > > On Wed, 22 Mar 2000 repett0@sac.uky.edu wrote: > > > > > I probably spelled that wrong, but anyways,.... does anyone know of a perl > > script that does html editing. No this is the kicker, this script is for > > pages already made, and can be modified without knowing html. like you > > should be able to highlight text and click something to make it bold. > > You're trying to handle this all through a GUI, I assume, as you mentioned > 'highlight' and 'click' > Perl may not be the best way to handle this sort of thing... > I've seen Java programs that do really rudimentary HTML, but in the long > run, it's almost easier to open a file in MSWord, change the file and do > 'save as HTML' (or WordPerfect, whatever your prefered word processor is) > > The only thing that I can think of that may even give you a basis to start > from is HTML::FromText (which I've never used), which is supposed to build > HTML from text files... > > ----- > Joe Hourcle > > > From repett0 at sac.uky.edu Wed Mar 22 10:46:06 2000 From: repett0 at sac.uky.edu (repett0@sac.uky.edu) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: wyswyg In-Reply-To: <38D8D788.9FE567F0@rcbowen.com> Message-ID: well, the problem is we can't use java. So personally I can't think of anything else that does it. I tried to get php on our maching but noone listens to me... Ron On Wed, 22 Mar 2000, Rich Bowen wrote: > repett0@sac.uky.edu wrote: > > > > I probably spelled that wrong, but anyways,.... does anyone know of a perl > > script that does html editing. No this is the kicker, this script is for > > pages already made, and can be modified without knowing html. like you > > should be able to highlight text and click something to make it bold. > > So, you're looking for a WYSIWYG HTML editor? Why does it need to be > written in Perl? There are a number of WYSIWYG HTML editors out there. > Perl is really not what I would choose for an application of this > nature. > > Rich > -- > http://www.ApacheUnleashed.com/ > Lexington Perl Mongers - http://lexington.pm.org/ > PGP Key - http://www.rcbowen.com/pgp.txt > From sml at zfx.com Wed Mar 22 13:44:03 2000 From: sml at zfx.com (Steve Lane) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Email attachments References: <38D85229.F989B004@rcbowen.com> Message-ID: <38D92283.2781@zfx.com> Rich Bowen wrote: > > Any of you guys aware of a module that handles email attachments simply? > I don't really want to have to use something like MIME::Lite to build > the message myself, but I suppose I could. I was hoping that there was a > Mail::Something module that would just let me do something like: > > $mail = new Mail::Something; > $mail->attach("/path/to/file"); > $mail->recipient('rbowen@rcbowen.com'); > $mail->send; > > Or something along those lines. > > Any suggestions? i've had great luck with MIME::Entity. here's a complete example of a message with some text and an optional attachment: use MIME::Entity; my $mail = build MIME::Entity ( From => $from, To => $to, Bcc => $bcc, Subject => param('subject'), Data => $data, ); # add the attachment, if present if (my $file = param('file')) { my $filename = (split m|[/\\]|, $file)[-1]; my($data, $buffer); while (read($file, $buffer, 1024)) { $data .= $buffer } $mail->attach(Data => [$data], Type => upload_mimetype('file'), Filename => $filename, Encoding => '-SUGGEST'); } # mail the message open MAIL, "|/usr/sbin/sendmail -oi -t" or die "can't open sendmail: $!"; $mail->print(\*MAIL); close MAIL or die "can't close sendmail: $!"; this was built for a webpage form; i'm sure the 'attach' method accepts filenames as well as core data. one other note: i had to twiddle the 'Encoding' param several times before it worked; the details are in the MIME::Entity manpage, but they're less-than-clear (last time i looked). good luck, Steve -- Steve Lane From rbowen at rcbowen.com Wed Mar 22 14:05:49 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Email attachments References: <38D85229.F989B004@rcbowen.com> <38D92283.2781@zfx.com> Message-ID: <38D9279D.B289940E@rcbowen.com> > # mail the message > open MAIL, "|/usr/sbin/sendmail -oi -t" or die "can't open sendmail: > $!"; > $mail->print(\*MAIL); > close MAIL or die "can't close sendmail: $!"; Thanks. Sample code is nice. I'm wondering if I can use something other than sendmail to actually send the mail. I use Mail::Sendmail because 1) it does not require spawning another process and 2) it works on NT. I'll have to play with this to see if I can send the mssage to Mail::Sendmail instead of sendmail. Or, perhaps I'll just have to write a module that inherits from those two modules, and just does what I need. Thanks for the code, though. That helps. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From sml at zfx.com Wed Mar 22 14:32:04 2000 From: sml at zfx.com (Steve Lane) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Email attachments References: <38D85229.F989B004@rcbowen.com> <38D92283.2781@zfx.com> <38D9279D.B289940E@rcbowen.com> Message-ID: <38D92DC4.446B@zfx.com> Rich Bowen wrote: > > > # mail the message > > open MAIL, "|/usr/sbin/sendmail -oi -t" or die "can't open sendmail: > > $!"; > > $mail->print(\*MAIL); > > close MAIL or die "can't close sendmail: $!"; > > Thanks. Sample code is nice. > I'm wondering if I can use something other than sendmail to actually > send the mail. I use Mail::Sendmail because 1) it does not require > spawning another process and 2) it works on NT. I'll have to play with > this to see if I can send the mssage to Mail::Sendmail instead of > sendmail. Or, perhaps I'll just have to write a module that inherits > from those two modules, and just does what I need. i've never used Mail::Sendmail, so i don't know if it expects a raw blob of data, but you may be able to use the $mail->as_string (or $mail->header_as_string or $mail->body_as_string) methods of MIME::Entity to get the message as a string. i would look at the MIME::Entity source to see what you can do. -- Steve Lane From gcasillo at ket.org Wed Mar 22 16:15:46 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Checking HTML syntax? References: <38D85229.F989B004@rcbowen.com> <38D92283.2781@zfx.com> <38D9279D.B289940E@rcbowen.com> <38D92DC4.446B@zfx.com> Message-ID: <38D94612.90E8232E@ket.org> Does anyone know of a module or other means to check HTML syntax with Perl? I'm working on a web page publishing system that checks links, document weight, and hopefully HTML syntax of web pages. The syntax validation would be something in the mold of W3C's Tidy program (http://www.w3.org/People/Raggett/tidy/). If there are serious HTML mistakes/errors, I want to catch them and report them to the people submitting publishing requests (that is, those folks who submit URLs to my publishing/checking script. Thanks, Gregg Casillo KET Web Programmer gcasillo@ket.org From rbowen at rcbowen.com Wed Mar 22 19:19:29 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Checking HTML syntax? References: <38D85229.F989B004@rcbowen.com> <38D92283.2781@zfx.com> <38D9279D.B289940E@rcbowen.com> <38D92DC4.446B@zfx.com> <38D94612.90E8232E@ket.org> Message-ID: <38D97121.BBA0054C@rcbowen.com> Gregg Casillo wrote: > > Does anyone know of a module or other means to check HTML syntax with Perl? > I'm working on a web page publishing system that checks links, document > weight, and hopefully HTML syntax of web pages. The syntax validation would be > something in the mold of W3C's Tidy program > (http://www.w3.org/People/Raggett/tidy/). > > If there are serious HTML mistakes/errors, I want to catch them and report > them to the people submitting publishing requests (that is, those folks who > submit URLs to my publishing/checking script. There's HTML::QuickCheck (very lightweight - perhaps what you need) and HTML::Validator, which is more robust and picky. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From hempy at ket.org Thu Mar 23 22:38:48 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Testing for File Trustworthiness on NT Message-ID: <4.3.2.20000323201523.00c37680@mail.ket.org> Here's some food for thought: From the Cookbook... >8.17. Testing a File for Trustworthiness > >Problem > >You want to read from a file, perhaps because it has configuration >information. You only want to use the file if it can't be written to (or >perhaps not even be read from) by anyone else than its owner. [...] If the >file is writable by someone other than the owner or is owned by someone >other than the current user or the superuser, it shouldn't be trusted. I have a slight variation. I am generating web pages in a perl program. I do not want to stomp on someone's handcrafted pride and joy that might have the same name (such as index.html). This is a certain eventuality in our environment of cohabitating generated and manually-created web pages. Fortunately, the solution is the same. Unfortunately, the Cookbook's solution doesn't work under NT, with its vision beyond user-group-world. My solution: I use the same mentality of Cookbook 8:17, using Win32::FileSecurity. After generating the file I set the permissions such that I (Win32::LoginName, to be precise) have full access, and Everyone has Read access: >## Takes one parameter, a file name. >## Grants FULL access to the file for the current user. >## Changes permissions for any others listed to READ access. >## Returns true on success. >sub MakeFileSafe { > my $file = shift; > > return 0 unless -e $file; > > my $me = Win32::DomainName . '\\' . Win32::LoginName; > my (%perms, $name, $mask); > my $readonly_access = Win32::FileSecurity::MakeMask( qw( READ > ) ); > my $full_access = Win32::FileSecurity::MakeMask( qw( FULL > ) ); > > > unless (Win32::FileSecurity::Get($file, \%perms) ) { > warn "Can't Win32::FileSecurity::Get($file)\n
\n"; > return 0; > } > > > foreach my $user (keys %perms) { > $perms{$user} = $readonly_access; > } > > $perms{$me} = $full_access; > > unless (Win32::FileSecurity::Set($file, \%perms) ) { > warn "Can't Win32::FileSecurity::Set($file)\n
\n"; > return 0; > } > > > return 1; >} When testing to see if I can overwrite an existing file, I check to see that these permissions are still set. If so, I can be reasonably sure that I am only overwriting my own work. If not, I complain and ask the user to move or delete the offending file if they really want the target file generated. >## Returns true if no other users can write to a file. >## Takes one parameter, a file name. >## note: Returns true if the file does not exist. >sub FileIsSafe { > my $file = shift; > > return 1 unless -e $file; ## No File is a Safe File. > > my $me = Win32::DomainName . '\\' . Win32::LoginName; > my (%perms, $name, $mask); > my $readonly_access = Win32::FileSecurity::MakeMask( qw( READ > ) ); > my $full_access = Win32::FileSecurity::MakeMask( qw( FULL > ) ); > > Win32::FileSecurity::Get( $file, \%perms ) ; > > while( ($name, $mask) = each %perms ) { > #print "\n$name: $mask\n\t"; > #print "Read Rights\n\t" if ($mask == > $readonly_access); > #print "Full Rights\n\t" if ($mask == > $full_access); > > unless > ( $mask == $readonly_access > || $name eq $me > || $name =~ /\bUnknown\b/ ### This > appears some times with access...not sure why. > ) { > #print "HEY! $name has more than > read-only access!\n"; > #Win32::FileSecurity::EnumerateRights( > $mask, \@rights ) ; > #print join( "\n\t", @rights ), "\n"; > return 0; > }#else { > # print "Cool... $name has appropriate > access!\n"; > #} > > } > > return 1; >} One benefit of this (the inspiration for it, actually) is that users cannot (readily) edit the generated html files. If they ever *think* they do, they actually need to: 1. Edit the source data, 2. Edit the template, or 3. Con me into fixing a bug/featurelack in the program. "Editing the generated file" will never belong on this list. Doing so will cause headaches for the user the next time the file is generated. When they come to me asking permission to edit the output file, I will direct them to the appropriate action from the list above. ;-) -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (606)258-7164 -- (800)333-9764 From hempy at ket.org Thu Mar 23 23:50:47 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:42 2004 Subject: LPM: Many Monkeys - conditional use Message-ID: <4.3.2.20000324004208.00c49b60@mail.ket.org> This question has nothing to do with Win32, so don't get scared off just yet... Okay, feeling pretty smug about my Win32::FileSecurity solution, I synched up my programs on my laptop (Win98) with the server (WinNT). No big surprise that Win32::FileSecurity doesn't work on Win98, right? So I added the following at the top of my subs that use those routines: > unless (Win32::FsType() =~ /NTFS/) { > #print "Can't do permissions here...it's as safe > as its going to get.\n "; > return 1; > } Figure this covers me if I'm on Win9x, as well as if it runs under WinNT on a FAT partition. Also groovy if Win200x uses NTFS. Well, I still get the following error: >C:\ket\cgi-ket\cds>perl -c genpage.pl >The Win32::FileSecurity module works only on Windows NT at genpage.pl line 28 >BEGIN failed--compilation aborted at genpage.pl line 28. Well, here's line 28: >use Win32::FileSecurity; So, I changed it to: >if (Win32::IsWinNT()) { > use Win32::FileSecurity; >} ...so that it won't even try to use it if we're not running on WinNT. Still get the same error. (grr...) I don't really want/need to get into makefiles and such, as it will only ever run on our server for real...I just like to write code on the beach, so it's got to run on the laptop. So, any ideas? -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (606)258-7164 -- (800)333-9764 From rbowen at rcbowen.com Fri Mar 24 07:08:45 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: Many Monkeys - conditional use References: <4.3.2.20000324004208.00c49b60@mail.ket.org> Message-ID: <38DB68DD.E7109C90@rcbowen.com> David Hempy wrote: > > This question has nothing to do with Win32, so don't get scared off just yet... ... > >if (Win32::IsWinNT()) { > > use Win32::FileSecurity; > >} Oooh, I know! use statement get executed first. Always. So your if is ignored. You need to require it, or do some fancy magic in BEGIN blocks. Perhaps ... BEGIN { unless (Win32::FsType() =~ /NTFS/) { print "Can't do permissions here...it's as safe as its going to get.\n "; exit(0); } use Win32::FileSecurity; The BEGIN block gets done before the use. Or, if you use require, and then call import() to get the functions that you want ... which is sort of what use does anyway. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From hempy at ket.org Fri Mar 24 13:10:30 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: Many Monkeys - conditional use In-Reply-To: <38DB68DD.E7109C90@rcbowen.com> References: <4.3.2.20000324004208.00c49b60@mail.ket.org> Message-ID: <4.3.2.20000324122353.00ca5f00@mail.ket.org> At 08:08 AM 3/24/00 -0500, Rich Bowen wrote: >Oooh, I know! >use statement get executed first. Always. So your if is ignored. You >need to require it, or do some fancy magic in BEGIN blocks. Perhaps ... > > >BEGIN { > unless (Win32::FsType() =~ /NTFS/) { > print "Can't do permissions here...it's as safe > as its going to get.\n "; > exit(0); >} >use Win32::FileSecurity; > >The BEGIN block gets done before the use. > >Or, if you use require, and then call import() to get the functions that >you want ... which is sort of what use does anyway. > >Rich Hmm... I'll have to read up on BEGIN blocks. Sounds like its got a lot of potential. This isn't exactly what I'm looking for. I'd still like to run my program on Win98, but just have it skip the file permission parts it can't handle. I've got the skip part working (at least, it looks like it should work), but the program never gets executed due to the compiler error. Any other ideas? Is there anything like C's preprocessor commands I could connive into working? (time passes in the R&D department...) Okay...I found a functional way of doing it. require appears to be a runtime thing, as opposed to use which is handled early in the compilation. (As Rich explained) This gives two advantages: you can employ a variable with require, where you cannot with use; you can call require conditionally, where use is called regardless. Programming Perlm, pp. 285-6 says that: use Module LIST is exactly equivalent to: require "Module.pm"; Module->import(LIST); So, I changed my faulty OS-detecting code from: if (Win32::IsWinNT()) { use Win32::FileSecurity; } ...to the following, which actually works: $package = "Win32\\FileSecurity.pm"; if (Win32::IsWinNT()) { print "We're on NT! Let's require $package!\n"; require $package ; Win32::FileSecurity->import(qw(MakeMask Set Get)); } else { print "We're NOT on NT! Let's NOT require $package!\n"; } ## lots of interesting code goes here. if (Win32::FsType() =~ /NTFS/) { $readonly_access = MakeMask( qw( READ ) ); print "Successfully set up a mask.\n"; } else { print "Can't do permissions on a FAT partition. Sorry.\n "; } Hope this helps someone some day. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (606)258-7164 -- (800)333-9764 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/lexington-pm/attachments/20000324/60e76eb3/attachment.htm From fprice at mis.net Mon Mar 27 17:23:12 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released Message-ID: I'm sure this many of you are aware of this, but perl 5.6 was released a few days ago. Should be on CPAN and most mirrors. This is the update to 5.005. Haven't downloaded it yet -- anyone have comments or Cool Things to report? -Frank. -- Frank Price fprice@mis.net -- E Pluribus Unix | Why not go mad? -- From janine.ladick at fetterprinting.com Mon Mar 27 17:44:22 2000 From: janine.ladick at fetterprinting.com (Janine Ladick) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released In-Reply-To: Message-ID: <200003272342.SAA08690@sidewinder.fetterprinting.com> Yay! Is this the release that will have a compiler? Janine Date sent: Mon, 27 Mar 2000 18:23:12 -0500 (EST) From: Frank Price To: lexington-pm-list@happyfunball.pm.org Subject: LPM: perl 5.6 released Send reply to: lexington-pm-list@happyfunball.pm.org > I'm sure this many of you are aware of this, but perl 5.6 was released > a few days ago. Should be on CPAN and most mirrors. This is the > update to 5.005. > > Haven't downloaded it yet -- anyone have comments or Cool Things to > report? > > -Frank. > -- > Frank Price fprice@mis.net > -- E Pluribus Unix | Why not go mad? -- > ------- Janine Ladick Manager, Data Processing Fetter Printing Company 502-634-4771 x. 310 From rbowen at rcbowen.com Mon Mar 27 18:00:18 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: Message-ID: <38DFF612.DAF2FA88@rcbowen.com> Frank Price wrote: > > I'm sure this many of you are aware of this, but perl 5.6 was released > a few days ago. Should be on CPAN and most mirrors. This is the > update to 5.005. > > Haven't downloaded it yet -- anyone have comments or Cool Things to > report? I've been watching P5P for a while, and there are still a lot of bug reports going by. I expect that I will wait for at least another release before I put it on anything other than my second machine at work. For the Windows users, ActiveState has a 5.6 also, but I've not tried that yet. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 06:53:34 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: Message-ID: <38E0AB4E.62BD130@rcbowen.com> Frank Price wrote: > > I'm sure this many of you are aware of this, but perl 5.6 was released > a few days ago. Should be on CPAN and most mirrors. This is the > update to 5.005. Last night's mirror changed latest.tar.gz to point to 5.6.0. Meanwhile P5P is still arguing over the phrasing of the release announcement. Is it "the newest major release in over 20 months", or is it the "newest release - the product of nearly 2 years of development"? Only time will tell. Next week, on "As the Perl Turns." Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 09:48:54 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: [Fwd: Perl v5.6.0 released] Message-ID: <38E0D466.E983B4D3@rcbowen.com> Here's the official announcement, just posted to P5P a few minutes ago. -------- Original Message -------- Subject: Perl v5.6.0 released Date: Tue, 28 Mar 2000 07:46:13 -0800 From: Gurusamy Sarathy To: clpa@stonehenge.com, perl-release-announce@perl.org CC: perl5-porters@perl.org, vmsperl@newman.upenn.edu,macperl-porters@macperl.org, perl-win32-porters@perl.org After almost two years of intense deliberation, patching, troubleshooting, and testing, the Perl Porters are proud to bring you the newest major release of Perl. Welcome to Perl v5.6.0! Perl v5.6.0 is a major release that incorporates all maintenance and development changes since the last major release, 5.005. As you may have noticed, the version numbering has changed. Releases will henceforth be numbered as revision.version.subversion triples. Maintenance releases will have an even version component, while the version component for development releases will be odd. For example, the next maintenance update of Perl 5.6.0 will be v5.6.1, and the development series will begin life at v5.7.0. There is much more to Perl v5.6.0 than just the fancy version number. A brief summary of the significant changes and known issues is included at the end. A more expansive overview of these changes can be found in the file "pod/perldelta.pod". Specific logs are in the "Changes" file. You can find Perl v5.6.0 from any of the Comprehensive Perl Archive Network (CPAN) sites worldwide. For example: http://www.cpan.org/src/perl-5.6.0.tar.gz and also: http://www.cpan.org/authors/id/GSAR/perl-5.6.0.tar.gz Perl continues to build and run on a vast number of platforms. Virtually all known and current Unix derivatives are supported, as are VMS, DOS, OS/2, Windows, QNX, BeOS, and Darwin. (But see below for platforms that use the EBCDIC character set.) There is a full list of supported platforms in the file "pod/perlport.pod". If you find that your platform is unsupported, do let us know. To build and install Perl, read the "INSTALL" document for Unix-like platforms, and the port-specific "README.xxx" files for others. If everything went well, and all the tests passed, "make ok" will mail us a report of your build configuration. If not, run "make nok" and describe your problems in detail. Those two make targets run the "perlbug" utility, located at "utils/perlbug". If "perlbug" cannot determine how to send mail from your system, you may have to let it save the report to a file, and mail it to us at . The "perlbug" program obviously cannot be used if you were unable to build perl by the suggested methods. If this is the case, please include the output of the "myconfig" script, along with a detailed summary of what went wrong, and send it to . If Perl can be built fine, but you have been unable to install it properly, "perlbug" can also be run as "./perl -Ilib utils/perlbug". Run it with the "-h" option to see a short usage summary, and see the detailed documentation within the program itself for more information on sending well-formed bug reports. If after having successfully installed Perl, you find any bugs or incompatibilities that aren't already mentioned in the documentation, please use "perlbug" to report the problem. Once again, be sure to read the "README.xxx", "INSTALL", and "pod/perldelta.pod" files for important information about this release. Share and Enjoy! --The Perl Porters ---------------------------------------------------------------------------- Short Summary of Changes ---------------------------------------------------------------------------- Here's a list of the significant changes since the 5.005 release. If you are running a Perl release older than 5.005, be sure to read through the "pod/perl5005delta.pod" file for other important changes that are not listed here. For a more detailed overview of these changes, see "pod/perldelta.pod" in the source distribution. Incompatibilities and other known issues are summarized further down. + Several experimental features, including: support for Unicode, fork() emulation on Windows, 64-bit support, lvalue subroutines, weak references, and new regular expression constructs. See below for the full list. + Standard internal representation for strings is UTF-8. (EBCDIC support has been discontinued because of this.) + Better support for interpreter concurrency. + Lexically scoped warning categories. + "our" declarations for global variables. + String literals can be written using character ordinals. For example, v102.111.111 is the same as "foo". + New syntax for subroutine attributes. (The attrs pragma is now deprecated.) + Filehandles can be autovivified. For example: open my $foo, $file or die; + open() may be called with three arguments to avoid magic behavior. + Support for large files, where available (will be enabled by default.) + CHECK blocks. These are like END blocks, but will be called when the compilation of the main program ends. + POSIX character class syntax supported, e.g. /[[:alpha:]]/ + pack() and unpack() support null-terminated strings, native data types, counted strings, and comments in templates + Support for binary numbers. + exists() and delete() work on array elements. Existence of a subroutine (as opposed to its defined-ness) may also be checked with exists(&sub)). + Where possible, Perl does the sane thing to deal with buffered data automatically. + binmode() can be used to set :crlf and :raw modes on dosish platforms. The open pragma does the same in the lexical scope, allowing the mode to be set for backticks. + Many modules now come standard, including Devel::DProf, Devel::Peek, and Pod::Parser. + Many modules have been substantially revised or rewritten. + The JPL ("Java Perl Lingo") distribution comes bundled with Perl. + Most platform ports have improved functionality. Support for EBCDIC platforms has been withdrawn due to standardization on UTF-8. + Much new documentation in the form of tutorials and reference information has been added. + Plenty of bug fixes. The following features are considered experimental. Their interfaces and implementation are subject to change in future versions. Some of these are new features, and others were experimental features in earlier releases that haven't yet made the grade. + Support for Unicode. This is still incomplete, and has known bugs and limitations. + Support for threading, and the fork() emulation on Windows. The new "interpreter threads" support is not yet user-visible (except for the fork() emulation). The 5.005 model of threads may be eventually deprecated. + 64-bit support. Mileage may vary among individual platforms. + The B Compiler suite, and the perlcc utility. + Lvalue subroutines. Behavior of array and hash return values is undefined. + Weak references. This isn't user-visible unless you get the WeakRef extension from CPAN. + The pseudo-hash data type. This has improved much, but changes are still to be expected. + Internal implementation of file globbing via the File::Glob extension. Changes to improve compatibility with the older, external csh glob may yet occur. + The DB module for access to the source level debugging API. + The regular expression constructs (?{ CODE }) and (??{ CODE }). ---------------------------------------------------------------------------- Tested Platforms ---------------------------------------------------------------------------- This release is known to build and pass all tests (with some expected exceptions) on the following platforms: ARCHNAME OSVER CC NOTES ------------------------------------------------------------------------ alpha-dec_osf 4.0 cc alpha-dec_osf 4.0 gcc 2.95.1 lib/sdbm fails alpha-dec_osf-thread 4.0 cc aix 4.1.5.0 cc aix 4.3.1.0 cc aix-64all 4.3.2.0 cc CRAY_T3E-unicosmk 2.0.5.24 cc cygwin 1.1.0 gcc 2.95.2 dos-djgpp DOS gcc 2.95.2 posix.t#4 fails i386-AT386-gnu 0.2 gcc 2.95.2 warnings.t#370 fails i386-freebsd 5.0-cur gcc 2.95.2 i386-freebsd 4.0-cur gcc 2.95.2 i386-freebsd 4.0-sta gcc 2.95.2 i386-freebsd 3.3-sta gcc 2.7.2.3 i386-freebsd 3.4-sta gcc 2.7.2.3 i386-freebsd 3.2-sta gcc 2.7.2.1 i386-freebsd-thread 5.0-cur gcc 2.95.2 thr5005.t#19 fails i386-freebsd-thread 4.0-sta gcc 2.95.2 thr5005.t#19 fails i386-freebsd-thread 3.4-sta gcc 2.7.2.3 thr5005.t#19 fails i386-freebsd-thread 3.3-sta gcc 2.7.2.3 thr5005.t#19 fails i386-freebsd-thread 3.2-sta gcc 2.7.2.1 thr5005.t#19 fails i386-freebsd-thread-multi 5.0-cur gcc 2.95.2 i386-freebsd-thread-multi 4.0-sta gcc 2.95.2 i386-freebsd-thread-multi 3.4-sta gcc 2.7.2.3 i386-freebsd-thread-multi 3.3-sta gcc 2.7.2.3 i386-freebsd-thread-multi 3.2-sta gcc 2.7.2.1 i386-linux 2.2.12-20 egcs 2.91.66 i386-lynxos-coff 3.1.0 gcc 2.9-gnupro-98r2 i586-linux 2.2.4 egcs 2.91.60 i686-linux 2.2.5-15 egcs 2.91.66 i686-linux 2.2.13 egcs 2.91.66 i686-linux 2.0.36 gcc 2.7.2.3 i686-linux 2.2.14 gcc 2.95.2 i686-linux-64int 2.2.14 gcc 2.7.2.3 i686-linux-multi 2.2.5 egcs 2.91.66 i686-linux-thread 2.2.14 gcc 2.95.2 i686-linux-thread-multi 2.2.5-15 egcs 2.91.66 i686-linux-thread-multi 2.0.36 gcc 2.7.2.3 i686-linux-thread-64int 2.2.14 gcc 2.95.2 i86pc-solaris 2.7 gcc 2.95.1 IP27-irix 6.5 cc -n32 IP27-irix-64bit 6.5 cc -n32 IP27-irix-64all 6.5 cc -64 MSWin32-x86 NT4.0 Borland C 5.02 MSWin32-x86 NT4.0 gcc 2.95.2 io_xs.t may fail MSWin32-x86 NT4.0 Visual C 6.0 MSWin32-x86-multi NT4.0 Borland C 5.02 MSWin32-x86-multi NT4.0 gcc 2.95.2 io_xs.t may fail MSWin32-x86-multi NT4.0 Visual C 6.0 MSWin32-x86-thread NT4.0 Borland C 5.02 thr5005.t#19 fails MSWin32-x86-thread NT4.0 gcc 2.95.2 thr5005.t#19, io_xs.t may fail MSWin32-x86-thread NT4.0 Visual C 6.0 thr5005.t#19 fails MSWin32-x86-multi-thread NT4.0 Borland C 5.02 MSWin32-x86-multi-thread NT4.0 gcc 2.95.2 io_xs.t may fail MSWin32-x86-multi-thread NT4.0 Visual C 6.0 os2 2.30 gcc 2.8.1 ppc-linux 2.2.14 gcc 2.95.2 ppc-linux 2.2.15p3 gcc 2.95.2 ppc-linux-64int 2.2.15p3 gcc 2.95.2 ppc-linux-thread-multi 2.2.15p3 gcc 2.95.2 ppc-linux-thread-multi-64int 2.2.15p3 gcc 2.95.2 ppc-powerux 4.3 ec powerpc-machten 4.1.4 gcc 2.8.1 warnings.t#257 fails PA-RISC1.1 10.20 gcc 2.95.2 PA-RISC1.1 11.00 gcc 2.95.2 PA-RISC1.1 11.00 cc lib/odbm fails PA-RISC2.0 10.20 gcc 2.95.2 PA-RISC2.0 11.00 cc PA-RISC2.0-64bitall 11.00 cc lib/io_multihomed may hang RM600-svr4 5.42 cc sun4-solaris 2.8 gcc 2.8.1 sun4-solaris 2.7 gcc 2.8.1 sun4-solaris 2.7 gcc 2.95.2 sun4-solaris 2.6 cc sun4-solaris 2.6 gcc 2.7.2.3 sun4-solaris 2.6 gcc 2.8.1 sun4-solaris-64bit 2.6 gcc 2.8.1 sun4-solaris-64int 2.7 gcc 2.95.1 sun4-solaris-multi 2.6 gcc 2.7.2.3 sun4-solaris-thread 2.6 gcc 2.7.2.3 thr5005.t#19 fails sun4-solaris-thread-multi 2.6 gcc 2.7.2.3 sun4-solaris 2.5.1 gcc 2.95.2 x86-qnx 424 cc ---------------------------------------------------------------------------- Incompatibilities ---------------------------------------------------------------------------- Note that any new warnings that have been introduced are not considered incompatibilities. For details and potential workarounds, see "pod/perldelta.pod". + Compatibility macros for global variables are not available by default, to control namespace pollution. If older extensions don't build because of missing symbols, try "perl Makefile.PL POLLUTE=1" first. + Subroutines named CHECK are considered special, and will be automatically executed when the compilation of the main program ends. Rename such functions to lower/mixed case. + $English::PERL_VERSION is now an alias for $^V (a string) rather than $] (a number). You may need to use the "%vd" sprintf format to display this correctly. + Literals of the form 1.2.3 parse as C rather than as C<"1.2" . 3>. + rand() may yield a different (but usually more random) sequence due to internal changes. + Iterating over hashes may yield a different order than before due to changes in the hashing function used. + The C operator raises an exception when applied to read-only values. + The close-on-exec bit is now set on pipe and socket handles as well, if you set $^F high enough. + C<"$$1"> always means C<"${$1}" now, rather than C<$$ . "1"> (which was deprecated in 5.004). + delete(), each(), values() and \(%h) operate on aliases to values, instead of on copies. You may need to copy the values explicitly where needed. + vec() will raise an exception if the BITS argument is not a power-of-two integer. + C followed by parentheses behaves like a list operator. This allows C to work as expected, but also changes C to mean C<(not(1,2,3))[0]> instead of C. + The semantics of the bareword prototype (*) has changed to make it possible to pass barewords, as in many builtins. + Bitwise operators on 64-bit platforms operate on the entire native width rather than just the lower 32 bits. (You must mask off the excess bits if you don't want them.) + More builtins taint their results due to higher security paranoia. Run Configure with -Accflags=-DINCOMPLETE_TAINTS if you don't want the excess tainting behaviors. + Specifying one of usemultiplicity, usethreads or any of the 64-bit support options to Configure will build a perl that will not be binary compatible with 5.005. You will need to recompile all extensions if you do this. Accepting all the Configure defaults should generally provide binary compatibility with a perl 5.005 built in the same way. + If you have a perl installation older than 5.005, note that 5.6.0 won't be binary compatible with it. You will need to recompile all extensions when upgrading from installations older than 5.005. ---------------------------------------------------------------------------- Known Issues ---------------------------------------------------------------------------- The following issues have come to our attention at the time of writing, and since the 5.6.0 release. They will be addressed in a future maintenance version of Perl. + UNIVERSAL::isa() may report a bogus value after the base pragma has been used. This is due to a bug in the caching done by UNIVERSAL::isa() that also exists in 5.005_0x. The problem is now tickled by the new version of base.pm, which happens to use UNIVERSAL::isa() internally. + Unicode support still has various known bugs. * join() misinterprets its first argument as bytes even if the bytes pragma has not been enabled. (This only impacts results if the first argument is Unicode.) * $str1 eq $str2 may not compare correctly if only one of the arguments came from a Unicode source. * A literal such as v2000 may be incorrectly parsed as a bareword rather than as a Unicode character if Perl is expecting to read a statement. Use +v2000 if you hit this bug. + Results of building Perl on AIX (in particular, 4.2.x) have been mixed. Disabling compiler optimizations seems to build a working perl. From rbowen at rcbowen.com Tue Mar 28 10:07:43 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl -v Message-ID: <38E0D8CF.F35449FC@rcbowen.com> Well, I did it. The main problem appears to be that any module installed for Perl 5.005 might not be visible to 5.6. You may end up reinstalling a lot of modules. Not a huge deal, but could be irritating if you have as many modules installed as I do. [rbowen@localhost rbowen]$ perl -v This is perl, version 5.005_03 built for i386-linux Copyright 1987-1999, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. [rbowen@localhost rbowen]$ perl -v This is perl, v5.6.0 built for i586-linux Copyright 1987-2000, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 12:34:05 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> Message-ID: <38E0FB1D.9F0C6A59@rcbowen.com> Janine Ladick wrote: > > Yay! > > Is this the release that will have a compiler? Um, sort of ... [rbowen@localhost /tmp]$ cat test.pl #!/usr/bin/perl print "Hello World\n"; [rbowen@localhost /tmp]$ perl test.pl Hello World (so far, so good) [rbowen@localhost /tmp]$ perlcc test.pl -------------------------------------------------------------------------------- Compiling test.pl: -------------------------------------------------------------------------------- Making C(test.pl.c) for test.pl! perl -I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0 -I/usr /local/lib/perl5/site_perl/5.6.0/i586-linux -I/usr/local/lib/perl5/site_perl/5.6 .0 -I/usr/local/lib/perl5/site_perl -I. -MB::Stash -c test.pl perl -I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0 -I/usr /local/lib/perl5/site_perl/5.6.0/i586-linux -I/usr/local/lib/perl5/site_perl/5.6 .0 -I/usr/local/lib/perl5/site_perl -I. -MO=C,-umain,-uattributes,-uDB test.pl Starting compile Walking tree Prescan Saving methods Bootstrap attributes test.pl Writing output Loaded B Loaded IO Loaded Fcntl test.pl syntax OK Compiling C(test) for test.pl! perl -I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0 -I/usr /local/lib/perl5/site_perl/5.6.0/i586-linux -I/usr/local/lib/perl5/site_perl/5.6 .0 -I/usr/local/lib/perl5/site_perl -I. /tmp/test.pl.tst cc -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local /lib/perl5/5.6.0/i586-linux/CORE -o test test.pl.c -L/usr/local/lib -L/usr/loc al/lib/perl5/5.6.0/i586-linux/CORE -lperl -lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt /usr/local/lib/perl5/5.6.0/i586-linux/auto/IO/IO.so /usr/local/l ib/perl5/5.6.0/i586-linux/auto/Fcntl/Fcntl.so /tmp/ccRdBXSU.o: In function `xs_init': /tmp/ccRdBXSU.o(.text+0x3279): undefined reference to `boot_DynaLoader' ERROR: In compiling code for test.pl.c ! Um ... huh? test.pl is 40bytes. The generated test.pl.c is about 35k. But I'm a little lost as to what's going on in the compile stage there, and why it failed. Apparently I'm not the only one. Tom Christiansen posted a similar example to P5P a few days ago, wondering why it did not work. Perhaps we'll see some progress on this in the next few days. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From gcasillo at ket.org Tue Mar 28 12:31:37 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: Topic for next meeting? References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> Message-ID: <38E0FA89.C6708EA6@ket.org> I'm not sure if an agenda has been set for the next meeting, but I'd like to discuss mod_perl and/or Apache modules if possible. I'm sure someone here has installed mod_perl. Can anyone point me to good documentation for installing and using mod_perl? Thanks, Gregg Casillo From sml at zfx.com Tue Mar 28 12:35:28 2000 From: sml at zfx.com (Steve Lane) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> Message-ID: <38E0FB70.59E2@zfx.com> Rich Bowen wrote: > [rbowen@localhost /tmp]$ perlcc test.pl > > Um ... huh? > test.pl is 40bytes. The generated test.pl.c is about 35k. But I'm a > little lost as to what's going on in the compile stage there, and why it > failed. Apparently I'm not the only one. Tom Christiansen posted a > similar example to P5P a few days ago, wondering why it did not work. > Perhaps we'll see some progress on this in the next few days. imo, Tom's posts on p5p about the compiler are some of the most entertaining i've seen on that list in awhile :). let's hope it gets working. -- Steve Lane From rbowen at rcbowen.com Tue Mar 28 12:46:46 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> Message-ID: <38E0FE16.755A552C@rcbowen.com> Rich Bowen wrote: > > Janine Ladick wrote: > > > > Yay! > > > > Is this the release that will have a compiler? > > Um, sort of ... > .... > /tmp/ccRdBXSU.o(.text+0x3279): undefined reference to `boot_DynaLoader' > ERROR: In compiling code for test.pl.c ! > > Um ... huh? > test.pl is 40bytes. The generated test.pl.c is about 35k. But I'm a > little lost as to what's going on in the compile stage there, and why it > failed. Apparently I'm not the only one. Tom Christiansen posted a > similar example to P5P a few days ago, wondering why it did not work. > Perhaps we'll see some progress on this in the next few days. OK, thanks to Tom Christiansen, we have the following work around. Seems that perlcc is forgetting to load DynaLoader.a, and that it needs it during the compile stage. You can make it remember to load DynaLoader by adding a use DynaLoader; to your Perl script. Now, test.pl compiles, and gives me a 938K executable called test, which, when run, gives me [rbowen@localhost /tmp]$ ./test Hello World Now, to see if it works on Windows. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 12:53:45 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: Topic for next meeting? References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> <38E0FA89.C6708EA6@ket.org> Message-ID: <38E0FFB9.3361E0E6@rcbowen.com> Gregg Casillo wrote: > > I'm not sure if an agenda has been set for the next meeting, but I'd like to discuss > mod_perl and/or Apache modules if possible. I'm sure someone here has installed > mod_perl. Can anyone point me to good documentation for installing and using > mod_perl? The very best that I've come across is anything written by Stas Bekman. He is VERY verbose, but very good. I attended every talk he gave at 3 different conferences. He always runs at least 30 minutes over, and skips about 200 pages of his notes (no joke!) and I always learn something new. I don't have it installed anywhere at the moment, but I could talk briefly about some of the things that Stas has said. At the very least, I could bring his notes. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From pstackhouse at ket.org Tue Mar 28 13:05:56 2000 From: pstackhouse at ket.org (Paul Stackhouse) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> <38E0FE16.755A552C@rcbowen.com> Message-ID: <38E10294.CDA99116@ket.org> Rich Bowen wrote: > > Rich Bowen wrote: > > > > Janine Ladick wrote: > > > > > > Yay! > > > > > > Is this the release that will have a compiler? > > > > Um, sort of ... > > > .... 938 K? Almost a Megabyte? I'd like to see some speed benchmarks. > Now, test.pl compiles, and gives me a 938K executable called test, > which, when run, gives me > > [rbowen@localhost /tmp]$ ./test > Hello World > > Now, to see if it works on Windows. > > Rich -- Paul M. Stackhouse, Jr. Webmaster / Technology Manager Kentucky Educational Television Voice: 606.258.7135 600 Cooper Drive Fax: 606.258.7435 Lexington, KY 40502 Net: http://www.ket.org From rbowen at rcbowen.com Tue Mar 28 13:15:35 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> <38E0FE16.755A552C@rcbowen.com> <38E10294.CDA99116@ket.org> Message-ID: <38E104D7.7A4B181@rcbowen.com> Paul Stackhouse wrote: ... > 938 K? Almost a Megabyte? I'd like to see some speed > benchmarks. It prints "Hello World". How fast does it need to be? :-) But seriously ... Benchmarks indicate that it runs just a smidgen faster than running "perl first.pl". There's one less file to load (actually, several, if you use any modules) and you drop the compile and interpreter phases. Remember also that perl itself is amost 800K, and you've got the whole Perl runtime in the compiled program. I think. That's the way I've heard it talked about. I've yet to try this with anything non trivial. I expect that I'll play with that some once I've tried it on Windows. Ah. The download is finally complete. More later. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 13:33:18 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> <38E0FE16.755A552C@rcbowen.com> <38E10294.CDA99116@ket.org> <38E104D7.7A4B181@rcbowen.com> Message-ID: <38E108FE.CBDD6CD5@rcbowen.com> Rich Bowen wrote: > ... > I've yet to try this with anything non trivial. I expect that I'll play > with that some once I've tried it on Windows. ... Different errors on Windows: test.pl syntax OK Compiling C(test) for test.pl! C:\usr\bin\Perl.exe -IC:/usr/lib -IC:/usr/site/lib -I. C:\WINNT\Profiles\rbowen\ LOCALS~1\Temp/test.pl.tst bowenocals~1temp/test.pl.vals cl.exe -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL _IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -IC:\usr\lib/CORE - o test test.pl.c /link -nologo -nodefaultlib -release -libpath:"C:\usr\lib\COR E" -machine:x86 -libpath:C:\usr\lib/CORE C:\usr\lib\CORE\perl56.lib oldnames. lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib sh ell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winm m.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib 'cl.exe' is not recognized as an internal or external command, operable program or batch file. ERROR: In compiling code for test.pl.c ! Searching for cl.exe does not find it anywhere. I don't know if that's a typo, or just a file missing from the distribution. It sure will be nice if/when this works. OK, I'll quit bugging you for today. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From rbowen at rcbowen.com Tue Mar 28 14:10:22 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl 5.6 released References: <200003272342.SAA08690@sidewinder.fetterprinting.com> <38E0FB1D.9F0C6A59@rcbowen.com> <38E0FE16.755A552C@rcbowen.com> <38E10294.CDA99116@ket.org> Message-ID: <38E111AE.63E74905@rcbowen.com> Paul Stackhouse wrote: > ... > 938 K? Almost a Megabyte? I'd like to see some speed > benchmarks. OK, I know I said I would not bug you any more today, but I thought that this was worth passing along. Benchmark: timing 1000 iterations of cooked, raw... cooked: 34 wallclock secs ( 0.25 usr 1.10 sys + 21.87 cusr 10.48 csys = 33. 70 CPU) @ 740.74/s (n=1000) raw: 70 wallclock secs ( 0.19 usr 1.11 sys + 58.81 cusr 10.48 csys = 70. 59 CPU) @ 769.23/s (n=1000) As you can see, the cooked version (that is, the compiled version) runs in less than half the time of the raw version. This is a simple one-line "Hello World" program. I have no inkling of whether this would improve, or get worse, with more complicated programs. Perhaps I'll be able to tell you more later in the week. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From sungo at earthling.net Wed Mar 29 12:04:18 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:43 2004 Subject: No subject Message-ID: --------------------- Matt Cashner sungo@earthling.net --------------------- "It could be that the purpose of your life is only to serve as a warning to others." From sungo at earthling.net Wed Mar 29 12:08:22 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perlcc 5.6 Message-ID: i've been playing with perlcc with 5.6 a bit. i've gotten it to work pretty well on short things that dont need many modules. It doesnt seem to like LWP::UserAgent one bit though. it may be that LWP::UserAgent requires everything but the kitchen sink to run... but the script runs fine raw but cooked, the functions that use LWP dont work. any thoughts anyone? this is just for fun so dont waste too many precious brain cycles on it. :P --------------------- Matt Cashner sungo@earthling.net --------------------- "Every dark cloud has a silver lining, but lightning kills hundreds of people each year who try to find it." From rbowen at rcbowen.com Wed Mar 29 12:19:03 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perlcc 5.6 References: Message-ID: <38E24917.735A2CF4@rcbowen.com> Matt Cashner wrote: > > i've been playing with perlcc with 5.6 a bit. i've gotten it to work > pretty well on short things that dont need many modules. It doesnt seem to > like LWP::UserAgent one bit though. it may be that LWP::UserAgent requires > everything but the kitchen sink to run... but the script runs fine raw but > cooked, the functions that use LWP dont work. any thoughts anyone? this is > just for fun so dont waste too many precious brain cycles on it. :P It seems that things that I read about the compiler (pre 5.6) indicated that you might want to explicitly 'use' every module that LWP::UserAgent uses. Which includes many of the LWP::* modules. You can use the debugger to give you a list of all the modules that are loaded, I think. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt From sml at zfx.com Thu Mar 30 12:05:54 2000 From: sml at zfx.com (Steve Lane) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perlcc 5.6 References: <38E24917.735A2CF4@rcbowen.com> Message-ID: <38E39782.7DE1@zfx.com> Rich Bowen wrote: > It seems that things that I read about the compiler (pre 5.6) indicated > that you might want to explicitly 'use' every module that LWP::UserAgent > uses. Which includes many of the LWP::* modules. You can use the > debugger to give you a list of all the modules that are loaded, I think. or just use it and then print out %INC: $ perl -e 'use LWP::UserAgent; foreach (sort keys %INC) { printf "%-20s: $INC{$_} \n", $_ }' AutoLoader.pm : /usr/lib/perl5/AutoLoader.pm Carp.pm : /usr/lib/perl5/Carp.pm Exporter.pm : /usr/lib/perl5/Exporter.pm HTML/Entities.pm : /usr/lib/perl5/site_perl/HTML/Entities.pm HTML/HeadParser.pm : /usr/lib/perl5/site_perl/HTML/HeadParser.pm HTML/Parser.pm : /usr/lib/perl5/site_perl/HTML/Parser.pm HTTP/Date.pm : /usr/lib/perl5/site_perl/HTTP/Date.pm HTTP/Headers.pm : /usr/lib/perl5/site_perl/HTTP/Headers.pm HTTP/Message.pm : /usr/lib/perl5/site_perl/HTTP/Message.pm HTTP/Request.pm : /usr/lib/perl5/site_perl/HTTP/Request.pm HTTP/Response.pm : /usr/lib/perl5/site_perl/HTTP/Response.pm HTTP/Status.pm : /usr/lib/perl5/site_perl/HTTP/Status.pm LWP.pm : /usr/lib/perl5/site_perl/LWP.pm LWP/Debug.pm : /usr/lib/perl5/site_perl/LWP/Debug.pm LWP/MemberMixin.pm : /usr/lib/perl5/site_perl/LWP/MemberMixin.pm LWP/Protocol.pm : /usr/lib/perl5/site_perl/LWP/Protocol.pm LWP/UserAgent.pm : /usr/lib/perl5/site_perl/LWP/UserAgent.pm Time/Local.pm : /usr/lib/perl5/Time/Local.pm URI.pm : /usr/lib/perl5/site_perl/URI.pm URI/Escape.pm : /usr/lib/perl5/site_perl/URI/Escape.pm URI/URL.pm : /usr/lib/perl5/site_perl/URI/URL.pm URI/WithBase.pm : /usr/lib/perl5/site_perl/URI/WithBase.pm overload.pm : /usr/lib/perl5/i386-linux/5.00404/overload.pm strict.pm : /usr/lib/perl5/strict.pm vars.pm : /usr/lib/perl5/vars.pm -- Steve Lane From oneiros at dcr.net Fri Mar 31 11:21:09 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: lightweight TCP client In-Reply-To: <38E39782.7DE1@zfx.com> Message-ID: I was wondering if anyone had any good recomendations for a lightweight TCP client? For way too many years, I've been using hacks, (well, probably because I learned to do it that way), and making calls to 'lynx' or 'wget' to handle snarfing files through HTTP, but I want to correct my bad habits, and I wanted to know what other people suggested. Net::libnet comes close, as it implements SMTP, NNTP, FTP, etc, but not HTTP. [not that I really need it to be fully aware, as I'll be generating te headers required, and handling the parsing myself.] (I hacked up MIT's http-get years ago, so it'd handle URI formated locations, and I'd not have to pass it individual arguments, etc, but as that's based on code from 1994, I'm guessing there's better stuff out there to use these days.... and I think Mike told me that in glancing over it, there was a big vs little endian problem with how it was handling the connection) ----- Joe Hourcle From sungo at earthling.net Fri Mar 31 11:41:54 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: lightweight TCP client In-Reply-To: Message-ID: On Fri, 31 Mar 2000, Joe Hourcle wrote: > For way too many years, I've been using hacks, (well, probably because I > learned to do it that way), and making calls to 'lynx' or 'wget' to handle > snarfing files through HTTP, but I want to correct my bad habits, and I > wanted to know what other people suggested. > > Net::libnet comes close, as it implements SMTP, NNTP, FTP, etc, but not > HTTP. [not that I really need it to be fully aware, as I'll be generating > te headers required, and handling the parsing myself.] If you're trying to get web pages, LWP will probably do what you want. use LWP::Simple; my $page = get('http://slashdot.org'); cant get much easier than that :P as i recall LWP is part of the libwww package. --------------------- Matt Cashner sungo@earthling.net --------------------- "That which does not kill me postpones the inevitable." From sungo at earthling.net Fri Mar 31 16:04:58 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl5.6 documentation Message-ID: I'm looking for some documentation on syntax and other such language changes in 5.6. anyone know of such a thing, if it exists yet? i'm curious as to what i need to start doing differently :P --------------------- Matt Cashner sungo@earthling.net --------------------- "For every winner, there are dozens of losers. Odds are you're one of them." From rbowen at rcbowen.com Fri Mar 31 19:31:21 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:43 2004 Subject: LPM: perl5.6 documentation References: Message-ID: <38E55169.387B88C8@rcbowen.com> Matt Cashner wrote: > > I'm looking for some documentation on syntax and other such language > changes in 5.6. anyone know of such a thing, if it exists yet? i'm curious > as to what i need to start doing differently :P The document you need to read is perldelta. After you install Perl, just 'perldoc perldelta' and read that. I don't have 5.6 installed here, so I am not sure if that's actually been updated in the distribution. The 5.005 version is still up on CPAN. Rich -- http://www.ApacheUnleashed.com/ Lexington Perl Mongers - http://lexington.pm.org/ PGP Key - http://www.rcbowen.com/pgp.txt