From rdm at cfcl.com Sat Jul 2 09:14:35 2005 From: rdm at cfcl.com (Rich Morin) Date: Sat, 2 Jul 2005 09:14:35 -0700 Subject: [sf-perl] Fwd: Re: a recent incident Message-ID: --- Begin Forward --- From: "Tim O'Reilly" Subject: Re: a recent incident Date: Sat, 2 Jul 2005 08:49:48 -0700 To: Rich Morin That is too bad. Odd, though, as there were a lot of people in t-shirts at the conference! We'll look into it. FWIW, we'd originally envisioned this as more of a business conference, and took a techie turn as the techie interest in this area heated up with google maps. My apologies to the group. On Jul 2, 2005, at 8:43 AM, Rich Morin wrote: > I realize that the choice of conference venues is rather limited, > but some venues are simply dysfunctional. Specifically... > > After a recent meeting of SFPUG (sf.pm.org), several Perlies walked > over to the Westin St. Francis, hoping to meet and chat with some > conference attendees, etc. The "greeter" at the bar area informed > them that they were not suitably attired and directed them elsewhere. > (One member of the group -- a founder of the group -- was wearing a > T-shirt and a leather jacket). > > The group then wandered back to a very nice bar which had no problems > in accepting their attire or trade... May I suggest that you look > for venues that are a bit more friendly to techies? > > -r --- End Forward --- -- email: rdm at cfcl.com; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. From extasia at extasia.org Mon Jul 4 17:30:23 2005 From: extasia at extasia.org (David Alban) Date: Mon, 4 Jul 2005 17:30:23 -0700 Subject: [sf-perl] [sig-beer-west] Saturday 7/09 at 18:00 in San Francisco Message-ID: <20050705003023.GA4371@gerasimov.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 sig-beer-west[1] Saturday, July 09, 2005 at 18:00[2] San Francisco Bay area Beer. Mental stimulation. Please note that SBW events are moving to the second Saturday of each month beginning July 2005. [1] http://extasia.org/sig-beer-west/ [2] http://www.spacearchive.info/military.htm This event: * Saturday, 7/09/2005, 18:00, at The Crow Bar[3], San Francisco (North Beach) [3] http://tinyurl.com/8dzne Coming events (second Saturdays): * Saturday, 08/13/2005, 18:00, Jupiter, Berkeley * Saturday, 09/10/2005, 18:00, location to be determined * Saturday, 10/08/2004, 18:00, location to be determined The San Francisco Bay area's next social event for techies and their friends, sig-beer-west, will take place at 18:00 on Saturday, July 09, 2005 at The Crow Bar, 401 Broadway, San Francisco. Phone: 415-788-2769. Map: http://tinyurl.com/73vlm The Crow Bar on the web: Citysearch - Giancarlo Davis[4] North Beach's token black sheep plays host to rock-and-rollers, bikers and other roustabouts looking to avoid trendy cocktail lounges. Editorial Rating: Recommended The Scene: Crow Bar is dark, a bit dingy and hardly self-conscious. Barflies here would rather sit around listening to the Descendants, Kiss or the Clash than succumb to boogie fever at one of the various neighboring dance clubs. If the bar's too full (usually on weekends), challenge any of the rugged denizens to a game of pool in the back. The Draw: Those who swill beer, bourbon or any beverage beginning with the word "Glen" will find the extensive drink menu delightful. The friendly bartenders are willing to share their extensive knowledge of various Scotch and Irish potables, and are even happier to get you drunk on the stuff. The jukebox is first rate. Know Before You Go: This cash-only bar has an in-house ATM machine. ::un.official.guide::[5] Crow Bar is most accurately described as a biker bar that attempts to fend off the North Beach yuppies. Still, you will like the pool tables and abundance of seats. SF Gate - Josh Wilson [6] Located at the perplexing intersection between North Beach's legacy of jazz and poetry and its present reality of fine dining and strip clubs, the Crow Bar is a real oasis, combining a casual demeanor with just the right amount of grunge and exotica. Just what you'd expect from a good neighborhood bar that's right around the corner from both Vesuvio's and the Lusty Lady. Numerous tables make it a fine spot for huddling with pals, with two pool tables and a very rockin' jukebox to round things out. San Francisco Bay Guardian - Marke B.[7] Friendly and down-to-earth, the Crow Bar offers young, no-frills locals a safe haven from the stuffy North Beach fine-dining scene as well as the flashing lights of the bar's Broadway strip-club neighbors. The lighting is dim, the prices are reasonable, and it's worth visiting solely for the amazing selection of punk rock on the jukebox. There are plenty of tables to hang out at and plenty of people congregating around the pool tables. Meanwhile, the lone air hockey table overlooks the whole bar from an elevated platform, its blue surface glimmering beneath the giant crow outlined on the wall. The crow is the new symbol for the air hockey revolution. Everyone is welcome at this event. We mean it! Please feel free to forward this information and to invite friends, cow-orkers[8], and others (of legal drinking age) who might enjoy lifting a glass with interesting folks from all over the place. Can't come this month? Mark your calendar for next month. (Do it now before you forget!) sig-beer-west occurs on the second Saturday of each month. Want to suggest a venue? Suggestions for new places to sip and gab are always welcome. Have questions, comments, or other ideas concerning sig-beer-west? Send all correspondence to the current sig-beer-west Instigator. The Instigator's handle is extasia. The Instigator's email address is <*the handle*> at <*the handle*> dot <*org*>. A subject beginning with "sbw: " will increase the chances that the Instigator's spam filters don't block your message. [4] http://sanfrancisco.citysearch.com/profile/917792/san_francisco_ca/crow_bar.html [5] http://techdev.stanford.edu:8080/unofficial/town.html [6] http://sfgate.com/eguide/music/barguide/neighborhood.shtml [7] http://www.sfbg.com/39/10/cover_bars_new_clubs_list.html [8] http://en.wikipedia.org/wiki/Cow-orker sig-beer-west FAQ 1. Q: Your announcement says "techies and their friends". How do I know if I'm a techie, or a friend of one? A: Well, actually, you don't have to be a techie to attend. You just have to be able to find the sig-beer-west sign at this month's event. That's it. Simple, huh? 2. Q: I'm not really a beer person. In fact I'm interested in hanging out, but not in drinking. Would I be welcome? A: Absolutely! The point is to hang out with fun, interesting folks. Please do join us. 3. Q: I've been thinking about attending sig-beer-west for some time now. Maybe I should start with this event? A: Yes!! ______________________________________________________________________ sig-beer-west was started in February 2002 when a couple Washington, D.C. based systems administrators who moved to the San Francisco Bay area wanted to continue a dc-sage tradition[9], SIG-beer, which is described in sig-beer.NET[10] web space as: SIG-beer, n., origin lost to intoxication: 1. Special Interest Group - Beer! 2. An Interprocessor Communications (IPC) signal that should be implemented in every O/S kernel. Semantics are left to the hardware driver for the Robotic Drinks Server. Expected behavior is that kill -beer 3. A standing monthly gathering of systems administrators, past/present/future, and their ilk in Washington, DC. and other worldwide locations. These gathering consists of a friendly gathering of people who enjoy tasting/drinking interesting beer and chatting about computers, life, and how to implement the SIG-beer into their systems. It started with a group of dc.sage[11] sysadmins some time in 1997. [9] http://www.dc-sage.org/ [10] http://www.sig-beer.net/ [11] http://www.dc-sage.org/ ______________________________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFCyc8xPh0M9c/OpdARAmkyAJ944HlDI3v69WCjikMZSCGep1+tvQCeKHSQ 0F1gHNC/rx1VYgzxKngPjhw= =k4kD -----END PGP SIGNATURE----- From vlb at cfcl.com Wed Jul 6 13:09:46 2005 From: vlb at cfcl.com (Vicki Brown) Date: Wed, 6 Jul 2005 13:09:46 -0700 Subject: [sf-perl] Can't use an undefined value as filehandle reference Message-ID: I am trying to run tmail.pl http://pugetsoundsoftware.com/tmail.html for The Job. The Company still runs Perl 5.005_03. (Don't get me started). I get an error running the script: Can't use an undefined value as filehandle reference at tmail.pl line 149. No error with newer Perl (5.8.5 on my desktop). Here's the relevant code. The error is on line 5 in the example. #!/usr/bin/perl $szForm = "/www/private/nonexistent.txt"; DisplayError ("tmail: template form [$szForm] could not be opened") if (!open ($file, "<$szForm")); # This line faults sub DisplayError { print @_, "\n"; } Perl 5.8.5 runs successfully and prints tmail: template form [/www/private/nonexistent.txt] could not be opened Perl 5.00503 shows Can't use an undefined value as filehandle reference at foo.pl line 5 How can I work around the problem? Please don't suggest that I try to convince IT to upgrade Perl. :-( That's not going to happen. My other choice is to use a phenomenally ugly hunk of PHP code. So if you can save me from that... Heeeeeeeeelllllllpppp! -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://heatercats.com From gregc at cnet.com Wed Jul 6 13:22:34 2005 From: gregc at cnet.com (greg lee coleman [1482]) Date: Wed, 6 Jul 2005 13:22:34 -0700 (PDT) Subject: [sf-perl] Can't use an undefined value as filehandle reference In-Reply-To: Message-ID: # this has worked for me in the past: my %fh = (); if (-f $file and ! $fh{$file} ) { open($fh{$file}, "<$file") || DisplayError(); # coolness ensues... } # be sure to close' those FH on the way out... -gleeco ________________________________________________________________ On Wed, 6 Jul 2005, Vicki Brown wrote: > I am trying to run tmail.pl > http://pugetsoundsoftware.com/tmail.html > for The Job. The Company still runs Perl 5.005_03. (Don't get me started). > > I get an error running the script: > Can't use an undefined value as filehandle reference at tmail.pl line 149. > > No error with newer Perl (5.8.5 on my desktop). > > Here's the relevant code. The error is on line 5 in the example. > > #!/usr/bin/perl > > $szForm = "/www/private/nonexistent.txt"; > > DisplayError ("tmail: template form [$szForm] could not be opened") > if (!open ($file, "<$szForm")); # This line faults > > sub DisplayError { > print @_, "\n"; > } > > > Perl 5.8.5 runs successfully and prints > tmail: template form [/www/private/nonexistent.txt] could not be opened > > Perl 5.00503 shows > Can't use an undefined value as filehandle reference at foo.pl line 5 > > > How can I work around the problem? > > Please don't suggest that I try to convince IT to upgrade Perl. :-( > That's not going to happen. > > My other choice is to use a phenomenally ugly hunk of PHP code. > So if you can save me from that... Heeeeeeeeelllllllpppp! > > -- > - Vicki > > ZZZ > zzZ San Francisco Bay Area, CA > z |\ _,,,---,,_ Books, Cats, Tech > zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb > |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog > '---''(_/--' `-'\_) http://heatercats.com > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From david at fetter.org Wed Jul 6 13:56:09 2005 From: david at fetter.org (David Fetter) Date: Wed, 6 Jul 2005 13:56:09 -0700 Subject: [sf-perl] Can't use an undefined value as filehandle reference In-Reply-To: References: Message-ID: <20050706205609.GA28792@fetter.org> On Wed, Jul 06, 2005 at 01:22:34PM -0700, greg lee coleman [1482] wrote: > > # this has worked for me in the past: > > my %fh = (); > if (-f $file and ! $fh{$file} ) { > open($fh{$file}, "<$file") || DisplayError(); > # coolness ensues... > } Does Perl 5.005.paleolithic have 3-argument open()? Cheers, D -- David Fetter david at fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From moseley at hank.org Wed Jul 6 15:01:46 2005 From: moseley at hank.org (Bill Moseley) Date: Wed, 6 Jul 2005 15:01:46 -0700 Subject: [sf-perl] Can't use an undefined value as filehandle reference In-Reply-To: References: Message-ID: <20050706220146.GA17437@hank.org> On Wed, Jul 06, 2005 at 01:09:46PM -0700, Vicki Brown wrote: > No error with newer Perl (5.8.5 on my desktop). Because in 5.8 If FILEHANDLE is an undefined scalar variable (or array or hash element) the vari- able is assigned a reference to a new anonymous filehandle I doubt that's true in 5.005. > > Here's the relevant code. The error is on line 5 in the example. > > #!/usr/bin/perl > > $szForm = "/www/private/nonexistent.txt"; > > DisplayError ("tmail: template form [$szForm] could not be opened") > if (!open ($file, "<$szForm")); # This line faults That script starts out like: #!/usr/bin/perl print "Content-Type: text/html\n\n"; not a good sign. use strict might be fun. Why not rewrite as: die "tmail: template form [$szForm] could not be opened: $!" unless open FORM, "<$szForm"; Really, I'd dump that script. -- Bill Moseley moseley at hank.org From vlb at cfcl.com Wed Jul 6 21:01:57 2005 From: vlb at cfcl.com (Vicki Brown) Date: Wed, 6 Jul 2005 21:01:57 -0700 Subject: [sf-perl] Can't use an undefined value as filehandle reference In-Reply-To: <20050706220146.GA17437@hank.org> References: <20050706220146.GA17437@hank.org> Message-ID: At 15:01 -0700 07/06/2005, Bill Moseley wrote: >Really, I'd dump that script. Really I'd rather not ;-) At 15:01 -0700 07/06/2005, Bill Moseley wrote: >That script starts out like: > > #!/usr/bin/perl > print "Content-Type: text/html\n\n"; > >not a good sign. You have something against Really Simple SeeGeeEye? The script works quite well for what I need. I would actually recommend it. (I did recommend it; that's how it got installed at work so I wouldn't have to rassle with PHP). What doesn't work so well, as David points out, is Perl 5.005.paleolithic.* Happily, the script didn't use the scalar value in any special way, just open, read, close, so I substituted a plain old vanilla FH and everything is working. * not as bad as a former company that was still using 4.18 when I got there in late 1997. Shudder. -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://heatercats.com From moseley at hank.org Thu Jul 7 00:22:53 2005 From: moseley at hank.org (Bill Moseley) Date: Thu, 7 Jul 2005 00:22:53 -0700 Subject: [sf-perl] Can't use an undefined value as filehandle reference In-Reply-To: References: <20050706220146.GA17437@hank.org> Message-ID: <20050707072253.GA2600@hank.org> On Wed, Jul 06, 2005 at 09:01:57PM -0700, Vicki Brown wrote: > At 15:01 -0700 07/06/2005, Bill Moseley wrote: > >Really, I'd dump that script. > > Really I'd rather not ;-) > > At 15:01 -0700 07/06/2005, Bill Moseley wrote: > >That script starts out like: > > > > #!/usr/bin/perl > > print "Content-Type: text/html\n\n"; > > > >not a good sign. > > You have something against Really Simple SeeGeeEye? Simple is ok. Poorly written and insecure is something else. If you find a script without "use strict" then how do you know they don't have typos or worse in the code? That script doesn't have strict or warnings enabled. It won't run with those, in fact. Does anyone with any perl experience not use strict? Try enabling taint mode for fun, too. The first thing the script does is send a content-type header. So that means it can't die and generate a 500 error. Something goes wrong and the user gets a blank page. The author doesn't use the standard CGI.pm package for processing the form. Bad sign. The author has created yet another templating system. I guess everyone has to do this at some point. The script sends mail with sendmail directly instead of using one of the many mail modules on CPAN. The script fails to check for errors when closing the pipe to sendmail. Also, the envelope sender will be the web server user -- probably not what you want at all. The script sends errors to the browser. Bad form IMO. Have a nice 500 ErrorDocument if you like, but leave the errors in the error log for someone that gives a hoot. The script uses user input in system calls without validation. Unacceptable. You can set template to /etc/password and it will likely get mailed (bounced) to the user that the web server runs as. Do you really want a web form to be able to cause the script to attempt to read any file on the machine (and pass it to sendmail) by just submitting a web form? Hum, I wonder if one could point it at a mbox file and have it send the entire mailbox to the lucky recipients on the first message. Probably. The template is relative to where the script is located (at least for apache that chdir's to where the cgi script is). Why would templates be in the web space? The template form variable should be a index to a pre-defined set of templates in some far off data directory or at least validated and constrained in some reasonable way. Will this be publicly available? If so you will likely find that someone runs a bot against it and end up sending thousands of email messages. Kind of an open relay. My mail forms require that the client first fetches the form which includes a hidden, encrypted variable. The form must be submitted with this variable and it's only valid one time after a few seconds and then only for a few minutes. Keeps bots from just submitting the form over and over. It will happen if publicly available. People will know you are using tmail.pl, too, and look for exploits. I'm sure you can find something better. Didn't London PM write a bunch of replacements for Matt's Script Archive scripts? Oh, ya: http://nms-cgi.sourceforge.net/ There's a replacement FormMail and also something called TFMail, whatever that is. Or write your own script that does exactly what you want. -- Bill Moseley moseley at hank.org From the_shift8 at yahoo.com Wed Jul 13 15:39:41 2005 From: the_shift8 at yahoo.com (shift8) Date: Wed, 13 Jul 2005 15:39:41 -0700 (PDT) Subject: [sf-perl] win32 headache Message-ID: <20050713223942.56837.qmail@web34208.mail.mud.yahoo.com> hi all - so, i have the misfortune of programming under win32 w/ activestate perl 5.8.6 and am trying to create a forking tcp server. windows craps out after 64ish threads and gives the "resource temporarily unavailible" and i'm haveing a tuff time getting around this. any ideas? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From the_shift8 at yahoo.com Wed Jul 13 16:48:53 2005 From: the_shift8 at yahoo.com (shift8) Date: Wed, 13 Jul 2005 16:48:53 -0700 (PDT) Subject: [sf-perl] win32 headache In-Reply-To: <20050713223942.56837.qmail@web34208.mail.mud.yahoo.com> Message-ID: <20050713234853.42332.qmail@web34212.mail.mud.yahoo.com> never mind.... use Thread seems to be stable enough. if you know better, please help a brother out. -star --- shift8 wrote: > hi all - so, i have the misfortune of programming under win32 w/ activestate > perl 5.8.6 and am trying to create a forking tcp server. windows craps out > after 64ish threads and gives the "resource temporarily unavailible" and i'm > haveing a tuff time getting around this. any ideas? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html From mcdonald.jeffrey at gene.com Tue Jul 19 13:56:03 2005 From: mcdonald.jeffrey at gene.com (Jeffrey McDonald) Date: Tue, 19 Jul 2005 13:56:03 -0700 Subject: [sf-perl] "Printer Friendly" versions - PDF? Message-ID: <200507192056.j6JKu35g013868@meitner.gene.com> I work at Genentech and support a large number of Perl applications that provide employees with Stock Purchase and Stock Option information. I am being asked to develop "Printer Friendly" versions of these pages. The only solution I can think of is to generate PDF's that tightly control the layout of the document. On CPAN I am able to find many modules - just don't know which ones might be best. I was wondering if anyone has recommendations/experience with any of them. One module I saw was able to take an HTML document and turn it into a PDF - would really like to see how that might work. I was thinking that I would have to generate the document line by line just as I do the HTML. Thanks Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20050719/fed4994e/attachment.html From herbr at pfinders.com Tue Jul 19 14:41:32 2005 From: herbr at pfinders.com (Herb Rubin) Date: Tue, 19 Jul 2005 14:41:32 -0700 Subject: [sf-perl] "Printer Friendly" versions - PDF? In-Reply-To: <200507192056.j6JKu35g013868@meitner.gene.com> References: <200507192056.j6JKu35g013868@meitner.gene.com> Message-ID: <1121809292.7173.624.camel@fred.sf.pfinders.com> I use enscript and create my own templates. Enscript comes with Linux. I can draw lines and insert eps (encapsulated postscript) images. (gif2eps works well). Herb On Tue, 2005-07-19 at 13:56, Jeffrey McDonald wrote: > I work at Genentech and support a large number of Perl applications > that provide employees with Stock Purchase and Stock Option > information. > > I am being asked to develop ?Printer Friendly? versions of these > pages. > > > > The only solution I can think of is to generate PDF?s that tightly > control the layout of the document. > > > > On CPAN I am able to find many modules ? just don?t know which ones > might be best. > > I was wondering if anyone has recommendations/experience with any of > them. > > > > One module I saw was able to take an HTML document and turn it into a > PDF ? would really like to see how that might work. > > I was thinking that I would have to generate the document line by line > just as I do the HTML. > > > > Thanks > > Jeff > > > > > > > > > > ______________________________________________________________________ > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- Herb Rubin Pathfinders Software herbr at pfinders.com http://www.pfinders.com phone: 650-343-4571 fax: 650-343-4675 From joshnjillwait at yahoo.com Wed Jul 20 00:37:47 2005 From: joshnjillwait at yahoo.com (Joshua Wait) Date: Wed, 20 Jul 2005 00:37:47 -0700 (PDT) Subject: [sf-perl] "Printer Friendly" versions - PDF? In-Reply-To: <1121809292.7173.624.camel@fred.sf.pfinders.com> Message-ID: <20050720073747.68881.qmail@web53704.mail.yahoo.com> Strange you should mention PDF. I just spent the better part of my day banging my head against creating PDFs in Perl. Definitely go for PDF::API2. Some of the other modules work okay, but don't provide the same feature set. The documentation is absolutely horrible though. I highly recommend this tutorial http://www.printaform.com.au/clients/pdfapi2/ It made it work for me. --JOSHUA --- Herb Rubin wrote: > I use enscript and create my own templates. Enscript > comes with Linux. > > I can draw lines and insert eps (encapsulated > postscript) images. > (gif2eps works well). > > Herb > > > On Tue, 2005-07-19 at 13:56, Jeffrey McDonald wrote: > > I work at Genentech and support a large number of > Perl applications > > that provide employees with Stock Purchase and > Stock Option > > information. > > > > I am being asked to develop ???Printer Friendly??? > versions of these > > pages. > > > > > > > > The only solution I can think of is to generate > PDF???s that tightly > > control the layout of the document. > > > > > > > > On CPAN I am able to find many modules ??? just > don???t know which ones > > might be best. > > > > I was wondering if anyone has > recommendations/experience with any of > > them. > > > > > > > > One module I saw was able to take an HTML document > and turn it into a > > PDF ??? would really like to see how that might > work. > > > > I was thinking that I would have to generate the > document line by line > > just as I do the HTML. > > > > > > > > Thanks > > > > Jeff > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________________ > > _______________________________________________ > > SanFrancisco-pm mailing list > > SanFrancisco-pm at pm.org > > > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -- > Herb Rubin Pathfinders Software > herbr at pfinders.com http://www.pfinders.com > phone: 650-343-4571 fax: 650-343-4675 > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From garth at perijove.com Wed Jul 20 08:19:32 2005 From: garth at perijove.com (Garth Webb) Date: Wed, 20 Jul 2005 08:19:32 -0700 Subject: [sf-perl] "Printer Friendly" versions - PDF? In-Reply-To: <20050720073747.68881.qmail@web53704.mail.yahoo.com> References: <20050720073747.68881.qmail@web53704.mail.yahoo.com> Message-ID: <1121872772.4421.10.camel@localhost.localdomain> If all you want to do is add variable text and you have the full version of acrobat (the one that lets you create new documents), there is an easier way to create PDFs. Use acrobat to make the form look how you want it and then in place of where the text should go, (ie, an employees name) put something like #NAME#. This is unlikely to appear naturally in the PDF file and allows you to use the PDF as a template: $pdf_tmpl =~ s/#([A-Z]+)#/$my_values{$1}/ge; I've done this with PDFs and a few other binary formats that store the text data as plain text and it works great. Of course this assumes you want to use PDFs... Garth On Wed, 2005-07-20 at 00:37 -0700, Joshua Wait wrote: > Strange you should mention PDF. I just spent the > better part of my day banging my head against creating > PDFs in Perl. > > Definitely go for PDF::API2. Some of the other modules > work okay, but don't provide the same feature set. The > documentation is absolutely horrible though. > > I highly recommend this tutorial > > http://www.printaform.com.au/clients/pdfapi2/ > > It made it work for me. > > --JOSHUA > > --- Herb Rubin wrote: > > > I use enscript and create my own templates. Enscript > > comes with Linux. > > > > I can draw lines and insert eps (encapsulated > > postscript) images. > > (gif2eps works well). > > > > Herb > > > > > > On Tue, 2005-07-19 at 13:56, Jeffrey McDonald wrote: > > > I work at Genentech and support a large number of > > Perl applications > > > that provide employees with Stock Purchase and > > Stock Option > > > information. > > > > > > I am being asked to develop ???Printer Friendly??? > > versions of these > > > pages. > > > > > > > > > > > > The only solution I can think of is to generate > > PDF???s that tightly > > > control the layout of the document. > > > > > > > > > > > > On CPAN I am able to find many modules ??? just > > don???t know which ones > > > might be best. > > > > > > I was wondering if anyone has > > recommendations/experience with any of > > > them. > > > > > > > > > > > > One module I saw was able to take an HTML document > > and turn it into a > > > PDF ??? would really like to see how that might > > work. > > > > > > I was thinking that I would have to generate the > > document line by line > > > just as I do the HTML. > > > > > > > > > > > > Thanks > > > > > > Jeff > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________________ > > > _______________________________________________ > > > SanFrancisco-pm mailing list > > > SanFrancisco-pm at pm.org > > > > > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > -- > > Herb Rubin Pathfinders Software > > herbr at pfinders.com http://www.pfinders.com > > phone: 650-343-4571 fax: 650-343-4675 > > > > > > _______________________________________________ > > SanFrancisco-pm mailing list > > SanFrancisco-pm at pm.org > > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From qw at sf.pm.org Wed Jul 20 11:40:56 2005 From: qw at sf.pm.org (Quinn Weaver) Date: Wed, 20 Jul 2005 11:40:56 -0700 Subject: [sf-perl] "Printer Friendly" versions - PDF? In-Reply-To: <1121872772.4421.10.camel@localhost.localdomain> References: <20050720073747.68881.qmail@web53704.mail.yahoo.com> <1121872772.4421.10.camel@localhost.localdomain> Message-ID: <20050720184056.GA14015@cfcl.com> On Wed, Jul 20, 2005 at 08:19:32AM -0700, Garth Webb wrote: > If all you want to do is add variable text and you have the full version > of acrobat (the one that lets you create new documents), there is an > easier way to create PDFs. Use acrobat to make the form look how you > want it and then in place of where the text should go, (ie, an employees > name) put something like #NAME#. > > This is unlikely to appear naturally in the PDF file and allows you to > use the PDF as a template: > > $pdf_tmpl =~ s/#([A-Z]+)#/$my_values{$1}/ge; Good hack. :) While we're on the topic, does anyone know a good cross-platform way to actually fire up the printer and print a document? This seems to be one of those really platform-specific things... -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From the_shift8 at yahoo.com Wed Jul 20 12:10:13 2005 From: the_shift8 at yahoo.com (shift8) Date: Wed, 20 Jul 2005 12:10:13 -0700 (PDT) Subject: [sf-perl] "Printer Friendly" versions - PDF? In-Reply-To: <200507192056.j6JKu35g013868@meitner.gene.com> Message-ID: <20050720191013.15796.qmail@web34203.mail.mud.yahoo.com> you may not need pdf at all: http://www.w3.org/TR/CSS21/page.html --- Jeffrey McDonald wrote: > I work at Genentech and support a large number of Perl applications that > provide employees with Stock Purchase and Stock Option information. > > I am being asked to develop "Printer Friendly" versions of these pages. > > > > The only solution I can think of is to generate PDF's that tightly control > the layout of the document. > > > > On CPAN I am able to find many modules - just don't know which ones might be > best. > > I was wondering if anyone has recommendations/experience with any of them. > > > > One module I saw was able to take an HTML document and turn it into a PDF - > would really like to see how that might work. > > I was thinking that I would have to generate the document line by line just > as I do the HTML. > > > > Thanks > > Jeff > > > > > > > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From rdm at cfcl.com Thu Jul 21 14:49:21 2005 From: rdm at cfcl.com (Rich Morin) Date: Thu, 21 Jul 2005 14:49:21 -0700 Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 25) Message-ID: RSVP: None is necessary. Just show up. :) Date: Tuesday, July 25, 2005 Time: 8:00 p.m. Place: Long Island Chinese Cuisine 1689 Church Street; SF, CA 415 695-767[89] http://maps.yahoo.com/maps_result?ed=C0Rlcup_0TqfYKxs1PXScMQrbWA2EPAT&csz=San+Francisco%2C+CA&country=us&new=1 Food: Economical Chinese, with some Japanese influences Driving: Parking is not TOO bad in this neighborhood, but you may have to search a bit. The metered parking out front on Church will be up for grabs around then, and there's a bunch of diagonal parking on 29th right next to St. Paul's, which is across the street from the place. You'll have better luck scoping for parking on the west side of Church. Peninsula: Take I280 North to the San Jose Avenue exit. (Watch it, this is one of the first exits for SF and it comes up sooner than you would think). Move rapidly over to the left-hand lane and turn left (North) onto Dolores St, using the left-turn lane that is just after the first light. A few blocks later you can turn left onto 29th, and then one block later you'll be at Church, which is your destination. Check for parking on Church as you drive through the intersection, then look for parking on your right on 29th. East Bay: Take 101 South to the Chavez exit, take Chavez to Guerrero/San Jose and make a left there (it's hard *not* to make a left there; they give you three left turn lanes). Then you need to get over to the right pretty quickly, to make a right onto 29th street about five blocks later (right after Mitchell's, which will probably have a crowd on the sidewalk, cold Tuesday night or no.) Mass Transit: Be prepared for a bit of a crowd, as this is the end of the prime commute time. All instructions given below are approximate and subject to the whims of the transit gods. BART (East Bay, Downtown): Transfer to Muni at a lower Market St. station. Within the station, exit BART, enter MUNI, and catch the J Church (outbound). Get off at 29th St; walk back (North) a bit. BART (Peninsula): Transfer to the J Church (inbound) at the Glen Park station. Get off at 29th St; walk forward (North) a bit. Caltrain: (Don't take Caltrain if you can avoid it. Trains run back at 10:00 p.m. and 11:59 p.m. only!) From the station, take the N to a lower Market St. station, then transfer to the J (outbound). Get off at 29th St; walk back (North) a bit. Muni: Take the J Church. Get off at 29th St; walk North a bit. -- email: rdm at cfcl.com; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. From matt at cloudfactory.org Thu Jul 21 15:51:44 2005 From: matt at cloudfactory.org (Matthew Lanier) Date: Thu, 21 Jul 2005 15:51:44 -0700 (PDT) Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 25) In-Reply-To: Message-ID: hey rich- is this the place that serves chinese food like it was a japanese restaurant? m@ On Thu, 21 Jul 2005, Rich Morin wrote: > RSVP: None is necessary. Just show up. :) > > Date: Tuesday, July 25, 2005 > > Time: 8:00 p.m. > > Place: Long Island Chinese Cuisine > 1689 Church Street; SF, CA > 415 695-767[89] > m@ From rdm at cfcl.com Thu Jul 21 16:08:23 2005 From: rdm at cfcl.com (Rich Morin) Date: Thu, 21 Jul 2005 16:08:23 -0700 Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 25) In-Reply-To: References: Message-ID: At 3:51 PM -0700 7/21/05, Matthew Lanier wrote: >is this the place that serves chinese food like it was a japanese >restaurant? Pretty much. The food is Chinese, but the presentation has some Japanese touches. They appear to do a lot of take-out, but the restaurant itself stays pretty empty, so they're fine with some Perlies taking up a long table for a couple of hours... -r -- email: rdm at cfcl.com; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. From qw at sf.pm.org Thu Jul 21 20:16:53 2005 From: qw at sf.pm.org (Quinn Weaver) Date: Thu, 21 Jul 2005 20:16:53 -0700 Subject: [sf-perl] Fuzzy mod_perl memory requirements super fun question Message-ID: <20050722031653.GA58845@cfcl.com> OK, I have a kind of silly question. It's been so long since I've had to run my own web server that I don't know the answer. (Half an hour of Googling hasn't turned up anything, either. :/ ) The question is, how much RAM do you need to run mod_perl reasonably these days? I mean mod_perl 2.0. Likely I'll be running some big stuff like Mason on top, which could add a lot. Actually, let's throw in PostgreSQL; I'm using it too. This is for a dynamic page server, i.e. all static page requests will be handled by a separate box via reverse proxying. Hence network latency shouldn't be the limiting factor. I don't expect CPU speed to be a limiting factor, either, but I'll ask just in case. What is the oldest CPU I can get away with using? These are all fuzzy questions, I know, and I don't expect studies or graphs. Just an anecdotal "well, this system worked for me under such-and-such conditions" would be fabulous. Many thanks, -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From doom at kzsu.stanford.edu Thu Jul 21 22:35:38 2005 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Thu, 21 Jul 2005 22:35:38 -0700 Subject: [sf-perl] Fuzzy mod_perl memory requirements super fun question In-Reply-To: <20050722031653.GA58845@cfcl.com> References: <20050722031653.GA58845@cfcl.com> Message-ID: <200507220535.j6M5ZcP20476@mail0.rawbw.com> Quinn Weaver wrote: > The question is, how much RAM do you need to run mod_perl reasonably > these days? I mean mod_perl 2.0. Likely I'll be running some big > stuff like Mason on top, which could add a lot. Actually, let's throw > in PostgreSQL; I'm using it too. > > This is for a dynamic page server, i.e. all static page requests will > be handled by a separate box via reverse proxying. Hence network > latency shouldn't be the limiting factor. I don't expect CPU speed to > be a limiting factor, either, but I'll ask just in case. What is the > oldest CPU I can get away with using? > > These are all fuzzy questions, I know, and I don't expect studies or > graphs. Just an anecdotal "well, this system worked for me under > such-and-such conditions" would be fabulous. I think my anecdotal evidence may be even fuzzier than your questions, but let me get things started. How much memory should you get? As much as you can afford. How much memory could you get away with? Probably less than you think. At home I often mess around with original Pentium boxes with only about 640 Mb (hardware manufacturers don't make a lot of money off of me). A box like this is ancient by today's standards, and they do huff and puff a bit on occasion, but then I'm often running X windows on them as well. I would guess you should shoot for a gigabyte of memory or more, and an AMD/Intel [1] architecture processor from a generation or two back. Oh, and while you can probably live with IDE disk drives, my guess is you're still much better off with SCSI, despite what you hear from slash-kids these days. And plan on getting a second, similar box at some point if that one starts hitting a wall: it's not that difficult to run Postgresql on another box. [1] Preferably AMD. Remember what Intel did to Randall Schwartz. From doom at kzsu.stanford.edu Thu Jul 21 22:35:38 2005 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Thu, 21 Jul 2005 22:35:38 -0700 Subject: [sf-perl] Fuzzy mod_perl memory requirements super fun question In-Reply-To: <20050722031653.GA58845@cfcl.com> References: <20050722031653.GA58845@cfcl.com> Message-ID: <200507220535.j6M5ZcP20476@mail0.rawbw.com> Quinn Weaver wrote: > The question is, how much RAM do you need to run mod_perl reasonably > these days? I mean mod_perl 2.0. Likely I'll be running some big > stuff like Mason on top, which could add a lot. Actually, let's throw > in PostgreSQL; I'm using it too. > > This is for a dynamic page server, i.e. all static page requests will > be handled by a separate box via reverse proxying. Hence network > latency shouldn't be the limiting factor. I don't expect CPU speed to > be a limiting factor, either, but I'll ask just in case. What is the > oldest CPU I can get away with using? > > These are all fuzzy questions, I know, and I don't expect studies or > graphs. Just an anecdotal "well, this system worked for me under > such-and-such conditions" would be fabulous. I think my anecdotal evidence may be even fuzzier than your questions, but let me get things started. How much memory should you get? As much as you can afford. How much memory could you get away with? Probably less than you think. At home I often mess around with original Pentium boxes with only about 640 Mb (hardware manufacturers don't make a lot of money off of me). A box like this is ancient by today's standards, and they do huff and puff a bit on occasion, but then I'm often running X windows on them as well. I would guess you should shoot for a gigabyte of memory or more, and an AMD/Intel [1] architecture processor from a generation or two back. Oh, and while you can probably live with IDE disk drives, my guess is you're still much better off with SCSI, despite what you hear from slash-kids these days. And plan on getting a second, similar box at some point if that one starts hitting a wall: it's not that difficult to run Postgresql on another box. [1] Preferably AMD. Remember what Intel did to Randall Schwartz. From chris at noncombatant.org Fri Jul 22 12:25:46 2005 From: chris at noncombatant.org (Chris Palmer) Date: Fri, 22 Jul 2005 12:25:46 -0700 Subject: [sf-perl] Fuzzy mod_perl memory requirements super fun question In-Reply-To: <200507220535.j6M5ZcP20476@mail0.rawbw.com> References: <20050722031653.GA58845@cfcl.com> <200507220535.j6M5ZcP20476@mail0.rawbw.com> Message-ID: <20050722192546.GK19909@nodewarrior.org> RAM is so cheap there's no real reason not to max out, or get at least 1 or 2 GB. SCSI vs. ATAPI: depends on the work load. A normal web server shouldn't be hitting the disk much at all once it's been up for a while; all the files should be in the kernel's cache in RAM. And you'll have plenty of RAM, right? A database server should also ideally have the entire database in RAM, if you can afford it, but of course you'll want fast writes. Spreading the load over a SCSI RAID is a good idea here. Getting the stripe size right for your database is one of the big performance tweakables. As has been mentioned, you can always put DB and web server on different machines if your project grows that large. -- print pack'c*',map{$sum+=$_} 106,11,-2,1,-84,65,13, 1,5,-12,-3,13,-82,80,- 11,13,-6,-76,72,-7,2,8 ,-6,13,-104 From Paul.Makepeace at realprogrammers.com Fri Jul 22 16:54:53 2005 From: Paul.Makepeace at realprogrammers.com (Paul Makepeace) Date: Sat, 23 Jul 2005 00:54:53 +0100 Subject: [sf-perl] Fuzzy mod_perl memory requirements super fun question In-Reply-To: <20050722031653.GA58845@cfcl.com> References: <20050722031653.GA58845@cfcl.com> Message-ID: <20050722235453.GH10065@mythix.realprogrammers.com> Je 2005-07-22 04:16:53 +0100, Quinn Weaver skribis: > OK, I have a kind of silly question. It's been so long since I've had > to run my own web server that I don't know the answer. (Half an hour of > Googling hasn't turned up anything, either. :/ ) > > The question is, how much RAM do you need to run mod_perl reasonably > these days? realprogrammers.com hosts 130+ sites some running mod_perl, some PHP (which can get RAM hungry too,) all in a big fat monolithic apache 1.3. There is also MySQL and Pg and spamassassin 3, all working reasonably hard. It all used to run in 512MB and now is a little more comfortable in a gig. Apache did in the last day: httpdlog=> select count(urlpath), sum(bytes) from requests where now()-timeserved < '1 day'::interval; count | sum -------+------------ 77015 | 1103050771 (1 row) Its load is around 0.3 most of the time. RAID 0 7200rpm IDE drives, Debian + 2.6 kernel. Intel 1.8GHz. HTH a bit :) Paul -- Paul Makepeace .............................. http://paulm.com/inchoate/ "What is harry Potter? It can only be street-cleaning." -- http://paulm.com/toys/surrealism/ From chris at noncombatant.org Sat Jul 23 16:10:34 2005 From: chris at noncombatant.org (Chris Palmer) Date: Sat, 23 Jul 2005 16:10:34 -0700 Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 25) In-Reply-To: References: Message-ID: <20050723231034.GP19909@nodewarrior.org> Rich Morin writes: > Date: Tuesday, July 25, 2005 The 25th is a Monday. -- print pack'c*',map{$sum+=$_} 106,11,-2,1,-84,65,13, 1,5,-12,-3,13,-82,80,- 11,13,-6,-76,72,-7,2,8 ,-6,13,-104 From rdm at cfcl.com Sat Jul 23 18:13:55 2005 From: rdm at cfcl.com (Rich Morin) Date: Sat, 23 Jul 2005 18:13:55 -0700 Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 26) In-Reply-To: <20050723231034.GP19909@nodewarrior.org> References: <20050723231034.GP19909@nodewarrior.org> Message-ID: >The 25th is a Monday. Sigh. Yep, and the SIG meets on Tuesday the 26th. -r -- email: rdm at cfcl.com; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. From rdm at cfcl.com Tue Jul 26 10:41:31 2005 From: rdm at cfcl.com (Rich Morin) Date: Tue, 26 Jul 2005 10:41:31 -0700 Subject: [sf-perl] Beer and Egg Roll SIG (8 pm, July 26) Message-ID: Just a last-minute reminder... -r RSVP: None is necessary. Just show up. :) Date: Tuesday, July 26, 2005 Time: 8:00 p.m. Place: Long Island Chinese Cuisine 1689 Church Street; SF, CA 415 695-767[89] http://maps.yahoo.com/maps_result?ed=C0Rlcup_0TqfYKxs1PXScMQrbWA2EPAT&csz=San+Francisco%2C+CA&country=us&new=1 Food: Economical Chinese, with some Japanese influences Driving: Parking is not TOO bad in this neighborhood, but you may have to search a bit. The metered parking out front on Church will be up for grabs around then, and there's a bunch of diagonal parking on 29th right next to St. Paul's, which is across the street from the place. You'll have better luck scoping for parking on the west side of Church. Peninsula: Take I280 North to the San Jose Avenue exit. (Watch it, this is one of the first exits for SF and it comes up sooner than you would think). Move rapidly over to the left-hand lane and turn left (North) onto Dolores St, using the left-turn lane that is just after the first light. A few blocks later you can turn left onto 29th, and then one block later you'll be at Church, which is your destination. Check for parking on Church as you drive through the intersection, then look for parking on your right on 29th. East Bay: Take 101 South to the Chavez exit, take Chavez to Guerrero/San Jose and make a left there (it's hard *not* to make a left there; they give you three left turn lanes). Then you need to get over to the right pretty quickly, to make a right onto 29th street about five blocks later (right after Mitchell's, which will probably have a crowd on the sidewalk, cold Tuesday night or no.) Mass Transit: Be prepared for a bit of a crowd, as this is the end of the prime commute time. All instructions given below are approximate and subject to the whims of the transit gods. BART (East Bay, Downtown): Transfer to Muni at a lower Market St. station. Within the station, exit BART, enter MUNI, and catch the J Church (outbound). Get off at 29th St; walk back (North) a bit. BART (Peninsula): Transfer to the J Church (inbound) at the Glen Park station. Get off at 29th St; walk forward (North) a bit. Caltrain: (Don't take Caltrain if you can avoid it. Trains run back at 10:00 p.m. and 11:59 p.m. only!) From the station, take the N to a lower Market St. station, then transfer to the J (outbound). Get off at 29th St; walk back (North) a bit. Muni: Take the J Church. Get off at 29th St; walk North a bit. -- email: rdm at cfcl.com; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. From parallax99 at hotmail.com Tue Jul 26 12:00:48 2005 From: parallax99 at hotmail.com (S A) Date: Tue, 26 Jul 2005 12:00:48 -0700 Subject: [sf-perl] LWP::UserAgent question In-Reply-To: Message-ID: Hi All, I've been asked to include some search functionality in a perl CGI program that I'm writing. Fortunately, this functionality is already available on the same server as a separate CGI program. Thus, I decided to leverage this by using LWP::UserAgent to make a request and then do nifty things with the response. The server was recently switched over to LDAP authentication, and both my program and the search program fall under the realm where authentication is necessary before getting a successful response, but the same username/password should be valid for both. The user is logged in if they're inside my CGI program, but I've been struggling with setting up the proper credentials for the call to the search program. Specifically, I don't know how to fetch the username and password. I need to make the call invisible to the user, so I need to somehow get the user/pwd that's currently being used and supply them as credentials to the request I'm composing. Without it, the request keeps giving a 401 Authentication error. Can anyone tell me how to fetch these two items? Is there some simple API that I can use? I'm sure I'm not the first person to try this.... Thanks! /S - Stefan Amshey parallax99 at hotmail.com