From rbowen at rcbowen.com Mon Aug 7 20:09:55 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday Message-ID: <398F5DE3.C1FA4B9A@rcbowen.com> One more try. Anyone willing to speak about something Perl-related on Monday? Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From fprice at mis.net Tue Aug 8 17:04:06 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: <398F5DE3.C1FA4B9A@rcbowen.com>; from Rich Bowen on Mon, Aug 07, 2000 at 09:09:55PM -0400 References: <398F5DE3.C1FA4B9A@rcbowen.com> Message-ID: <20000808180406.A21067@localhost.localdomain> On Mon, Aug 07, 2000 at 09:09:55PM -0400, Rich Bowen wrote: > One more try. Anyone willing to speak about something Perl-related on > Monday? Assuming that we're talking about *next* Monday (Aug. 14) ... it's probably the most boring topic on earth, but I've been playing with Term::ReadLine and would be happy to spout off about it. It lets you do neat user-interface things like tab-completion and other command line editing tricks. -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From hempy at ket.org Tue Aug 8 18:40:36 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: <20000808180406.A21067@localhost.localdomain> References: <398F5DE3.C1FA4B9A@rcbowen.com> <398F5DE3.C1FA4B9A@rcbowen.com> Message-ID: <4.3.2.7.2.20000808194010.02d1f218@mail.ket.org> Works for me, Frank. At 06:04 PM 8/8/2000 -0400, you wrote: >Assuming that we're talking about *next* Monday (Aug. 14) ... it's >probably the most boring topic on earth, but I've been playing with >Term::ReadLine and would be happy to spout off about it. It lets you >do neat user-interface things like tab-completion and other command >line editing tricks. > >-Frank. -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From sungo at earthling.net Tue Aug 8 19:28:55 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: <20000808180406.A21067@localhost.localdomain> Message-ID: On Tue, 8 Aug 2000, Frank Price wrote: > On Mon, Aug 07, 2000 at 09:09:55PM -0400, Rich Bowen wrote: > > One more try. Anyone willing to speak about something Perl-related on > > Monday? > > Assuming that we're talking about *next* Monday (Aug. 14) ... it's > probably the most boring topic on earth, but I've been playing with > Term::ReadLine and would be happy to spout off about it. It lets you > do neat user-interface things like tab-completion and other command > line editing tricks. cool beans. Term::ReadLine is pretty nifty and, um, feature-full :) can be tricky too. i look forward to it. as for being the most boring thing on earth, no, i think that would be us sitting around the table and staring at each other waiting for someone to say something interesting :) ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From rbowen at rcbowen.com Tue Aug 8 20:11:15 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday References: <398F5DE3.C1FA4B9A@rcbowen.com> <20000808180406.A21067@localhost.localdomain> Message-ID: <3990AFB3.42BB1C8D@rcbowen.com> Frank Price wrote: > > On Mon, Aug 07, 2000 at 09:09:55PM -0400, Rich Bowen wrote: > > One more try. Anyone willing to speak about something Perl-related on > > Monday? > > Assuming that we're talking about *next* Monday (Aug. 14) ... it's > probably the most boring topic on earth, but I've been playing with > Term::ReadLine and would be happy to spout off about it. It lets you > do neat user-interface things like tab-completion and other command > line editing tricks. Sounds great to me. I was about to recommend cancelling. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From rbowen at rcbowen.com Tue Aug 8 20:12:02 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday Message-ID: <3990AFE2.94700AFD@rcbowen.com> A bounced message ... -------- Original Message -------- Subject: BOUNCE lexington-pm-list@pm.org: Non-member submission from [Ronald Edward Petty ] ... From: Ronald Edward Petty To: Perl Mongers Subject: Re: LPM: Monday ... Is anyone here doing anything network and graphic related with perl. I dont much about perl but I would to hear and see what it (alone) can do. And how it interacts with other languages... since school is out I can swing to the next few meetings... Ron On Mon, 7 Aug 2000, Rich Bowen wrote: > One more try. Anyone willing to speak about something Perl-related on > Monday? > > Rich > -- > Rich@cre8tivegroup.com > Director of Web Application Development - The Creative Group > http://www.cre8tivegroup.com/ > Author - Apache Server Unleashed - http://apacheunleashed.com/ > From dpitts at mk.net Tue Aug 8 21:27:47 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday References: <3990AFE2.94700AFD@rcbowen.com> Message-ID: <00a601c001a9$68a94b40$7801a8c0@adverb.com> I am doing a number of thing with GD that is graphics related. Also, doing a number of things CGI related... I could talk on GD at some point if there was interest. Thanks, David David Pitts President, Pitts Technical Resources, Inc (859) 971-2255 www.dpitts.com dpitts@mk.net ----- Original Message ----- From: "Rich Bowen" To: "Perl Mongers" Sent: Tuesday, August 08, 2000 9:12 PM Subject: Re: LPM: Monday > A bounced message ... > > -------- Original Message -------- > Subject: BOUNCE lexington-pm-list@pm.org: Non-member submission from > [Ronald Edward Petty ] > ... > From: Ronald Edward Petty > To: Perl Mongers > Subject: Re: LPM: Monday > ... > > Is anyone here doing anything network and graphic related with perl. I > dont much about perl but I would to hear and see what it (alone) can do. > And how it interacts with other languages... since school is out I can > swing to the next few meetings... > > Ron > > On Mon, 7 Aug 2000, Rich Bowen wrote: > > > One more try. Anyone willing to speak about something Perl-related on > > Monday? > > > > Rich > > -- > > Rich@cre8tivegroup.com > > Director of Web Application Development - The Creative Group > > http://www.cre8tivegroup.com/ > > Author - Apache Server Unleashed - http://apacheunleashed.com/ > > From hempy at ket.org Tue Aug 8 22:25:48 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Killing a runaway CGI perl program in NT? Message-ID: <4.3.2.7.2.20000808232231.01767668@mail.ket.org> Can it be done? I've tried stopping and starting the web server service, and killing the process in Task Manager, with no luck. To date, rebooting is my only useful weapon. Aside from not writing programs with infinite loops, does anyone have any defensive coding strategies that would alleviate the problem? -dave (start|shut down|restart) hempy -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From sungo at earthling.net Tue Aug 8 22:40:08 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Killing a runaway CGI perl program in NT? In-Reply-To: <4.3.2.7.2.20000808232231.01767668@mail.ket.org> Message-ID: On Tue, 8 Aug 2000, David Hempy wrote: > Aside from not writing programs with infinite loops, does anyone have any > defensive coding strategies that would alleviate the problem? yeah, somewhere out there, you can get various unix utils for nt. they include ps and kill. get the pid number and kill it by hand ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From gcasillo at ket.org Wed Aug 9 09:44:27 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Killing a runaway CGI perl program in NT? References: Message-ID: <39916E4B.1614A90D@ket.org> Would this be AINTX? I downloaded these for a useful cron daemon for NT (the only I could find) a while back. Good stuff, especially for those given to the ways of Unix. If so, I have this on one of our servers, Dave. Gregg Matt Cashner wrote: > On Tue, 8 Aug 2000, David Hempy wrote: > > > Aside from not writing programs with infinite loops, does anyone have any > > defensive coding strategies that would alleviate the problem? > > yeah, somewhere out there, you can get various unix utils for nt. they > include ps and kill. get the pid number and kill it by hand > > ------ > Matt Cashner > Web Applications Developer > Creative Group (http://www.cre8tivegroup.com) > sungo@earthling.net | Codito, ergo sum From janine at emazing.com Wed Aug 9 11:51:12 2000 From: janine at emazing.com (Janine) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: <00a601c001a9$68a94b40$7801a8c0@adverb.com> Message-ID: Uh...what's GD? Janine > -----Original Message----- > From: owner-lexington-pm-list@pm.org > [mailto:owner-lexington-pm-list@pm.org]On Behalf Of David Pitts > Sent: Tuesday, August 08, 2000 10:28 PM > To: lexington-pm-list@happyfunball.pm.org > Subject: Re: LPM: Monday > > > I am doing a number of thing with GD that is graphics related. Also, doing > a number of things CGI related... I could talk on GD at some point if there > was interest. > > > Thanks, > > David > David Pitts > President, Pitts Technical Resources, Inc > (859) 971-2255 > www.dpitts.com > dpitts@mk.net > ----- Original Message ----- > From: "Rich Bowen" > To: "Perl Mongers" > Sent: Tuesday, August 08, 2000 9:12 PM > Subject: Re: LPM: Monday > > > > A bounced message ... > > > > -------- Original Message -------- > > Subject: BOUNCE lexington-pm-list@pm.org: Non-member submission from > > [Ronald Edward Petty ] > > ... > > From: Ronald Edward Petty > > To: Perl Mongers > > Subject: Re: LPM: Monday > > ... > > > > Is anyone here doing anything network and graphic related with perl. I > > dont much about perl but I would to hear and see what it (alone) can do. > > And how it interacts with other languages... since school is out I can > > swing to the next few meetings... > > > > Ron > > > > On Mon, 7 Aug 2000, Rich Bowen wrote: > > > > > One more try. Anyone willing to speak about something Perl-related on > > > Monday? > > > > > > Rich > > > -- > > > Rich@cre8tivegroup.com > > > Director of Web Application Development - The Creative Group > > > http://www.cre8tivegroup.com/ > > > Author - Apache Server Unleashed - http://apacheunleashed.com/ > > > > > From oneiros at dcr.net Wed Aug 9 12:45:06 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: Message-ID: On Wed, 9 Aug 2000, Janine wrote: > Uh...what's GD? No idea what is stands for, but it used to make GIFs, it now makes PNGs. [well, it still makes GIFs, if you run older versions, before that whole GIF patent whining happened] um.... ftp://ftp.cpan.org/CPAN/modules/by-category/18_Images_Pixmaps_Bitmaps/GD/GD-1.30.readme -Joe From dpitts at mk.net Wed Aug 9 17:26:16 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday References: Message-ID: <005701c00250$e1a68600$7801a8c0@adverb.com> GD is Tom Boutell's (www.boutell.com) graphic designer package. Lincoln Stein worked with Tom on porting it to Perl many moons ago. Version 1.1.9 is the last version to support GIF images - which is still available at CPAN and at Tom's site. Since then, it uses PNG's and probably some other formats. I use it to make graphics on the fly. Thanks, David David Pitts President, Pitts Technical Resources, Inc (859) 971-2255 www.dpitts.com dpitts@mk.net ----- Original Message ----- From: "Joe Hourcle" To: Sent: Wednesday, August 09, 2000 1:45 PM Subject: RE: LPM: Monday > > > On Wed, 9 Aug 2000, Janine wrote: > > > Uh...what's GD? > > > No idea what is stands for, but it used to make GIFs, it now makes PNGs. > [well, it still makes GIFs, if you run older versions, before that whole > GIF patent whining happened] > > um.... > > ftp://ftp.cpan.org/CPAN/modules/by-category/18_Images_Pixmaps_Bitmaps/GD/GD- 1.30.readme > > > -Joe > > From oneiros at dcr.net Thu Aug 10 11:14:36 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday In-Reply-To: <005701c00250$e1a68600$7801a8c0@adverb.com> Message-ID: On Wed, 9 Aug 2000, David Pitts wrote: > GD is Tom Boutell's (www.boutell.com) graphic designer package. Lincoln > Stein worked with Tom on porting it to Perl many moons ago. Version 1.1.9 > is the last version to support GIF images - which is still available at CPAN > and at Tom's site. Since then, it uses PNG's and probably some other > formats. I use it to make graphics on the fly. Yeah, it's really handy for making graphics from text... (I hear it's good for graphing, too.) For an example of it in use (makes a picture of an entry from the fortune file): http://www.annoying.org/cgi/oneiros/fortune.pl -Joe From hempy at ket.org Fri Aug 11 12:28:14 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday's meeting Message-ID: <4.3.2.7.2.20000811130632.01bb14f8@mail.ket.org> Two questions... I'm starting on a project for KET's TV schedule. Dates and times are clearly a huge part of this. This project will have clients in several time zones. (Well, at least two...) I'm a little fuzzy on gmtime and localtime, how to store times that will be used globally later, etc. I'm sure there are issues I haven't even thought of yet. Anyone been through this before? I would love to talk with others about this on Monday. Now for the important question... How about wings this time? There is a new wing delivery place I've been eager to try: http://www.wingzone.com/ They're in Imperial Plaza, near KET, and will deliver to KET. Is this better than pizza? -d -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From rbowen at rcbowen.com Fri Aug 11 12:46:29 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday's meeting References: <4.3.2.7.2.20000811130632.01bb14f8@mail.ket.org> Message-ID: <39943BF5.7DCEC9BB@rcbowen.com> David Hempy wrote: > > Two questions... > > I'm starting on a project for KET's TV schedule. Dates and times are > clearly a huge part of this. This project will have clients in several > time zones. (Well, at least two...) I'm a little fuzzy on gmtime and > localtime, how to store times that will be used globally later, etc. I'm > sure there are issues I haven't even thought of yet. > > Anyone been through this before? I would love to talk with others about > this on Monday. I've worked a little with dates and times. Perhaps I can muddy the waters a little. > Now for the important question... How about wings this time? There is a > new wing delivery place I've been eager to > try: http://www.wingzone.com/ They're in Imperial Plaza, near KET, and > will deliver to KET. Is this better than pizza? wings++ Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From janine at emazing.com Fri Aug 11 13:01:22 2000 From: janine at emazing.com (Janine) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: RE: Monday's meeting In-Reply-To: <4.3.2.7.2.20000811130632.01bb14f8@mail.ket.org> Message-ID: Working with dates is big stuff at EMAZING. I can probably help Rich muddy the waters if the discussion turns in this direction. Janine P.S. Date::Manip will do cool things if your dates are in varied formats. > -----Original Message----- > From: owner-lexington-pm-list@pm.org > [mailto:owner-lexington-pm-list@pm.org]On Behalf Of David Hempy > Sent: Friday, August 11, 2000 1:28 PM > To: Perl Geeks > Subject: LPM: Monday's meeting > > > > Two questions... > > I'm starting on a project for KET's TV schedule. Dates and times are > clearly a huge part of this. This project will have clients in several > time zones. (Well, at least two...) I'm a little fuzzy on gmtime and > localtime, how to store times that will be used globally later, etc. I'm > sure there are issues I haven't even thought of yet. > > Anyone been through this before? I would love to talk with others about > this on Monday. > > > Now for the important question... How about wings this time? There is a > new wing delivery place I've been eager to > try: http://www.wingzone.com/ They're in Imperial Plaza, near KET, and > will deliver to KET. Is this better than pizza? > > -d > > -- > David Hempy > Internet Database Administrator > Kentucky Educational Television > -- (859)258-7164 -- (800)333-9764 > > > From dpitts at mk.net Fri Aug 11 16:11:07 2000 From: dpitts at mk.net (David Pitts) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Monday's meeting References: <4.3.2.7.2.20000811130632.01bb14f8@mail.ket.org> <39943BF5.7DCEC9BB@rcbowen.com> Message-ID: <003e01c003d8$aaec3540$7801a8c0@adverb.com> > wings++ ditto From sungo at earthling.net Sun Aug 13 13:10:13 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: import question Message-ID: all right, you wizards gurus and other unsavory types, here's a question for you. i'm sort of reinventing the wheel here a bit. what i'm trying to do is to require a series of modules and hand-run import on them but pass into the import sub an event handler. i'm hoping i can get the modules to load subs into the event handler. at run-time, the main driver runs a readdir on the modules dir and uses that to form the require list. so all i know is a file name; package names could be anything. i've gotten this to work if the modules dont declare a package (duh). but i'm having some troubles with different package names. any thoughts anyone? thanks all. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From rbowen at rcbowen.com Sun Aug 13 15:41:04 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: import question References: Message-ID: <399707E0.DCF313F2@rcbowen.com> Matt Cashner wrote: > > all right, you wizards gurus and other unsavory types, here's a question > for you. i'm sort of reinventing the wheel here a bit. what i'm trying to > do is to require a series of modules and hand-run import on them but pass > into the import sub an event handler. i'm hoping i can get the modules to > load subs into the event handler. at run-time, the main driver runs a > readdir on the modules dir and uses that to form the require list. so all > i know is a file name; package names could be anything. > > i've gotten this to work if the modules dont declare a package (duh). but > i'm having some troubles with different package names. any thoughts > anyone? thanks all. Seems clunky, but I suppose you could actually read in the files and look for package declarations. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From sungo at earthling.net Sun Aug 13 15:48:07 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: import question In-Reply-To: <399707E0.DCF313F2@rcbowen.com> Message-ID: On Sun, 13 Aug 2000, Rich Bowen wrote: > Seems clunky, but I suppose you could actually read in the files and > look for package declarations. i was hoping to find a better way than that. :) ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From fprice at mis.net Sun Aug 13 17:32:05 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: import question In-Reply-To: ; from Matt Cashner on Sun, Aug 13, 2000 at 04:48:07PM -0400 References: <399707E0.DCF313F2@rcbowen.com> Message-ID: <20000813183205.B7399@localhost.localdomain> On Sun, Aug 13, 2000 at 04:48:07PM -0400, Matt Cashner wrote: > On Sun, 13 Aug 2000, Rich Bowen wrote: > > > Seems clunky, but I suppose you could actually read in the files and > > look for package declarations. > > i was hoping to find a better way than that. :) What if you required the package names to be the same as the filename, or some other regular convention like that? My guess is you don't have that option, but just thought I'd make sure. -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From sungo at earthling.net Sun Aug 13 17:41:22 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: import question In-Reply-To: <20000813183205.B7399@localhost.localdomain> Message-ID: On Sun, 13 Aug 2000, Frank Price wrote: > What if you required the package names to be the same as the filename, > or some other regular convention like that? My guess is you don't > have that option, but just thought I'd make sure. i've got whatever option i wnat :) this is the proof of concept for an open source project i'll be starting soon (nothing terribly interesting for most folks) so i can make any requirements i need to :) and package doesnt like periods apparently. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From hempy at ket.org Mon Aug 14 11:31:57 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Wings it is. Message-ID: <4.3.2.7.2.20000814122951.02ce1610@mail.ket.org> With three votes in, we'll be ordering wings tonight. I'll put the order in promptly at 6:10 PM, to get them there around 7. If you're running late, call me at 351-2363 before 6 to add to the order. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From rbowen at rcbowen.com Tue Aug 15 09:28:19 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:50 2004 Subject: LPM: Meeting summary Message-ID: <39995382.54857BBB@rcbowen.com> We had a really good meeting last night. Here's what we talked about. Frank told us about Term::ReadLine, which does (amoung other things) tab line-completion, a la bash. Very cool. Matt and I talked about Date::Discordian, a wonderful new module for calculating dates in everyone's favorite imaginary calendar. Now available at a CPAN near you. We ate chicken wings. Some were rather hot. Some of us are still suffering. There were two guys there from the UK LUG, which was very nice. We talked briefly about how we might do something cool like a joint mini-conference on a variety of OSS topics. This is something that had been discussed before - a mini Perl conference. I think that expanding it to Linux, Apache, and perhaps some other technologies, would expand our potential audience, and increase our chances that it would not be a complete failure. More on this as we have a chance to discuss it more. We talked briefly about Perlix and PPT, which were mentioned in the latest Perl Journal. They were discussed in the context of being really cool projects to get involved in, if one was interested in learning more about Perl. And the Perl shell could perhaps be added to this list. Perlix is ftp://othersideofthe.earth.li/pub/perl PPT is http://language.perl.com/ppt Perl Shell is http://www.focusresearch.com/gregor/psh Did I miss anything? Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From fprice at mis.net Tue Aug 15 17:15:55 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: getopts *elp Message-ID: <20000815181555.A9368@localhost.localdomain> Hi LexPM, I'm trying to use Getopt::Std and it isn't working as I'd like. Thought I'd post here before digging deeper :-) I want to use an option, -s, which takes an optional argument. If the argument is given, I want to use that argument. If just the option is given, I want to use a default value. If the option isn't given, I don't want to use any value at all. For example, you could say '-s 100', '-s', or omit it entirely. Here's what I thought would work. It doesn't though: if I don't specify the argument, $opt{'s'} is set to zero. use Getopt::Std; getopts('s:', \%opt); my $sleep = 0; if ($opt{'s'}) { print "opt_s = $opt{'s'}\n"; $sleep = ($opt{'s'} == 1) ? 3600 : $opt{'s'}; } print "sleep = $sleep\n"; I think Getopt::Long will really do optional numeric args like I want -- anyone know if I can do this with Std options? Thanks, -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From rbowen at rcbowen.com Wed Aug 16 06:34:01 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: getopts *elp Message-ID: <399A7C29.294911A7@rcbowen.com> Apparently Ken sent this from the wrong address. Frank Price wrote: > > > ---------- > > From: Frank Price[SMTP:FPRICE@MIS.NET] > > Sent: Tuesday, August 15, 2000 6:15:55 PM > > To: lexington-pm-list@happyfunball.pm.org > > Subject: LPM: getopts *elp > > Auto forwarded by a Rule > > > Hi LexPM, > > I'm trying to use Getopt::Std and it isn't working as I'd like. > Thought I'd post here before digging deeper :-) > > I want to use an option, -s, which takes an optional argument. If the > argument is given, I want to use that argument. If just the option is > given, I want to use a default value. If the option isn't given, I > don't want to use any value at all. For example, you could say '-s > 100', '-s', or omit it entirely. > > Here's what I thought would work. It doesn't though: if I don't > specify the argument, $opt{'s'} is set to zero. > > use Getopt::Std; > > getopts('s:', \%opt); > my $sleep = 0; > > if ($opt{'s'}) { > print "opt_s = $opt{'s'}\n"; > $sleep = ($opt{'s'} == 1) ? 3600 : $opt{'s'}; > } > > print "sleep = $sleep\n"; > > I think Getopt::Long will really do optional numeric args like I want > -- anyone know if I can do this with Std options? > I don't know Getopt::Std, but I think I can get you what you want. You can scrap the comments later, of course. ================ use Getopt::Std; # I assume the colon is syntax Getopt::Std uses getopts('s:', \%opt); my $sleep = 0; # Define the default value before getting to the # next statements. $default_s = 100; # "exists" prevents giving $opt{s} a value if it is undefined; # autovivifying can clobber you here! if exists ($opt{s}) { # This puts in a default value when "s" is a key, but its # value is undef. $opt{s} = $default_s unless defined($opt{s}); } ================== Hope that helps. -- Ken From hempy at ket.org Wed Aug 16 12:18:45 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Succussfully inserting long text fields. Message-ID: <4.3.2.7.2.20000816131426.02d20028@mail.ket.org> After upgrading perl and DBI to the most recent version with no success, I upgraded the SQL Server ODBC driver from 3.60 to 3.70, our problems (nearly) went away. Our 255-ish character limit has been expanded to 8000-ish characters...enough to keep us amused for a while. Rich - I would still like to see the code you mentioned to get around this kind of problem -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From rbowen at rcbowen.com Wed Aug 16 15:29:33 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: [Fwd: O'Reilly Needs Guinea Pigs...Any Volunteers?] Message-ID: <399AF9AD.7E961A47@rcbowen.com> FYI -------- Original Message -------- Subject: O'Reilly Needs Guinea Pigs...Any Volunteers? Date: Wed, 16 Aug 2000 13:04:35 -0700 (PDT) From: Denise Olliffe To: rbowen@rcbowen.com What technologies are your group members excited about? Where do they smell vaporware? We want you or members of your group to tell us all about it. We invite you to join O'Reilly's new email survey research panel, and give us your two cents. You can sign up at http://www.survey.com/orpanel.html -- it only takes a few minutes. As a thank you for your time and insight, we'll give you a 25% discount on all O'Reilly books purchased through the O'Reilly Web site for one year (5% more than the regular UG discount), plus enter you in a drawing for one of 200 "Official O'Reilly Guinea Pig" T-shirts. A few important details: After you register for the panel, you'll receive short email invitations to participate in surveys, either from O'Reilly & Associates or Survey.com, our partner in this endeavor. When you enroll, you choose how often you're interested in hearing from us. Membership and participation is entirely voluntary, and you may leave the panel at any time. There's also no obligation to participate in any particular survey. We promise that all information you submit will be kept confidential. We will never sell or rent your personal information. If you order books directly from us, we'll send you our book catalog three or four times a year (if you don't want it, just ask us not to send it). If you feel your members would be interested in particpating, please pass this invitation on to them. --Denise :) From fprice at mis.net Wed Aug 16 15:30:42 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: getopts *elp In-Reply-To: <399A7C29.294911A7@rcbowen.com>; from Rich Bowen on Wed, Aug 16, 2000 at 07:34:01AM -0400 References: <399A7C29.294911A7@rcbowen.com> Message-ID: <20000816163042.A9756@localhost.localdomain> > I don't know Getopt::Std, but I think I can get you what you want. > You can scrap the comments later, of course. [snip] > # I assume the colon is syntax Getopt::Std uses > getopts('s:', \%opt); > my $sleep = 0; The colon means that the s flag takes a mandatory argument. > # "exists" prevents giving $opt{s} a value if it is undefined; > # autovivifying can clobber you here! > if exists ($opt{s}) { > > # This puts in a default value when "s" is a key, but its > # value is undef. > $opt{s} = $default_s unless defined($opt{s}); Works like a charm! Thanks Ken... -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From fprice at mis.net Wed Aug 16 15:34:10 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: [Fwd: O'Reilly Needs Guinea Pigs...Any Volunteers?] In-Reply-To: <399AF9AD.7E961A47@rcbowen.com>; from Rich Bowen on Wed, Aug 16, 2000 at 04:29:33PM -0400 References: <399AF9AD.7E961A47@rcbowen.com> Message-ID: <20000816163410.B9756@localhost.localdomain> On Wed, Aug 16, 2000 at 04:29:33PM -0400, Rich Bowen wrote: > FYI > > As a thank you for your time and insight, we'll give you a 25% discount > on all O'Reilly books purchased through the O'Reilly Web site for one > year (5% more than the regular UG discount), plus enter you in a drawing > for one of 200 "Official O'Reilly Guinea Pig" T-shirts. So I'm not really interested in taking this survey, but the 20% off for UGs caught my eye. Do we, as individual members, get this, and if so how do you go about it? Longing for Perl for Sysadmins book, -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From janine at emazing.com Wed Aug 16 15:42:39 2000 From: janine at emazing.com (Janine) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: [Fwd: O'Reilly Needs Guinea Pigs...Any Volunteers?] In-Reply-To: <20000816163410.B9756@localhost.localdomain> Message-ID: Don't do it, Frank. Get your books from www.bookpool.com. O'Reilly books are routinely 35% off at Bookpool, and they feature a different publisher every few months for 44% off. Janine > -----Original Message----- > From: owner-lexington-pm-list@pm.org > [mailto:owner-lexington-pm-list@pm.org]On Behalf Of Frank Price > Sent: Wednesday, August 16, 2000 4:34 PM > To: lexington-pm-list@happyfunball.pm.org > Subject: Re: LPM: [Fwd: O'Reilly Needs Guinea Pigs...Any Volunteers?] > > > On Wed, Aug 16, 2000 at 04:29:33PM -0400, Rich Bowen wrote: > > FYI > > > > As a thank you for your time and insight, we'll give you a 25% discount > > on all O'Reilly books purchased through the O'Reilly Web site for one > > year (5% more than the regular UG discount), plus enter you in a drawing > > for one of 200 "Official O'Reilly Guinea Pig" T-shirts. > > So I'm not really interested in taking this survey, but the 20% off > for UGs caught my eye. Do we, as individual members, get this, and if > so how do you go about it? > > Longing for Perl for Sysadmins book, > > -Frank. > -- > Frank Price | fprice@mis.net | www.sxse.org/fprice/ > GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix > > From fprice at mis.net Wed Aug 23 17:47:48 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: <20000823184748.A20680@latitude.lexington.ibm.com> Hi LexPM, At the last meeting we batted around the idea of doing a module reading group. I'm sending this to gauge interest and brainstorm about how to do it. Here's my take: a module reading group is like a regular (print book) reading group, except we do a close reading of Perl modules. Each module would probably have a leader/moderator. We could meet either on the list or before/during/after the physical meeting. Each time, we take a chunk of the module and figure out what it does, how to use it, problems, limitations, interesting things about it, etc. And we'd welcome and encourage both "advanced" users and newbies. As for a starting module, well... seems like we'd need something complex enough that it isn't immediately comprehensible but yet accessible to many different people. I'd suggest something like CGI, DBD, or POSIX (gulp). What do y'all think? -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From sungo at earthling.net Wed Aug 23 18:17:39 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group In-Reply-To: <20000823184748.A20680@latitude.lexington.ibm.com> Message-ID: On Wed, 23 Aug 2000, Frank Price wrote: > Here's my take: a module reading group is like a regular (print book) > reading group, except we do a close reading of Perl modules. Each > module would probably have a leader/moderator. We could meet either > on the list or before/during/after the physical meeting. Each time, > we take a chunk of the module and figure out what it does, how to use > it, problems, limitations, interesting things about it, etc. happy happy > And we'd welcome and encourage both "advanced" users and newbies. > > As for a starting module, well... seems like we'd need something > complex enough that it isn't immediately comprehensible but yet > accessible to many different people. I'd suggest something like CGI, > DBD, or POSIX (gulp). i'd advise against DBD and POSIX. DBI and the DBDs tend to be in XS and C which is going to be tough for those of perl bigots to discuss. :) POSIX also is extremly unixcentric and as i recall our only access at KET is to win boxen so it would hard to test things using the module or demonstrate example code. CGI.pm or CGI_Lite would make good starting points. CGI.pm is probably preferrable between the two because it is standard issue and we wont have to do a "how to install modules" talk for the uber-newbies. though maybe that's something we'll want to cover too. I've just been looking at the standard set for 5.6.0 and while there's some nifty stuff in there, there's not a lot that would be good for a first meeting. at least, imnho. but yeah, lets do this. there are some pretty advanced modules i've been meaning to troll through (rich, i give you one guess) if want an advanced session at some point. but yeah.. very cool. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From hempy at ket.org Wed Aug 23 18:26:53 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Perl Mongers Meetings In-Reply-To: References: <20000823184748.A20680@latitude.lexington.ibm.com> Message-ID: <4.3.2.7.2.20000823192407.02ae0210@mail.ket.org> I regret that I won't be able to attend the meetings for the next four months, and as such cannot host the Perl Mongers meetings at KET. I have mentioned this to fellow KET employee Gregg Casillo, and I expect he will step forward and host the meetings. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From fprice at mis.net Wed Aug 23 19:13:01 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group In-Reply-To: ; from Matt Cashner on Wed, Aug 23, 2000 at 07:17:39PM -0400 References: <20000823184748.A20680@latitude.lexington.ibm.com> Message-ID: <20000823201301.D20680@latitude.lexington.ibm.com> On Wed, Aug 23, 2000 at 07:17:39PM -0400, Matt Cashner wrote: > On Wed, 23 Aug 2000, Frank Price wrote: > > > As for a starting module, well... seems like we'd need something > > complex enough that it isn't immediately comprehensible but yet > > accessible to many different people. I'd suggest something like CGI, > > DBD, or POSIX (gulp). > > i'd advise against DBD and POSIX. DBI and the DBDs tend to be in XS and C > which is going to be tough for those of perl bigots to discuss. :) POSIX > also is extremly unixcentric and as i recall our only access at KET is to > win boxen so it would hard to test things using the module or demonstrate > example code. OK, good point, although they might also be the ones that you'll understand best with group help. I will anyway :-) Maybe later. > CGI.pm or CGI_Lite would make good starting points. CGI.pm is probably > preferrable between the two because it is standard issue and we wont have > to do a "how to install modules" talk for the uber-newbies. though maybe > that's something we'll want to cover too. > > I've just been looking at the standard set for 5.6.0 and while there's > some nifty stuff in there, there's not a lot that would be good for a > first meeting. at least, imnho. How about some of the Net::* modules, like Net::Telnet? That works under WinX, right? Is it standard for 5.6? -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From pstackhouse at ket.org Wed Aug 23 20:27:33 2000 From: pstackhouse at ket.org (Paul Stackhouse) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group References: Message-ID: <39A47A05.CD4A243D@ket.org> Matt Cashner wrote: > > > as i recall our only access at KET is to > win boxen so it would hard to test things using the module or demonstrate > example code. Those of you at the last meeting found that we have rigged a "wire across the floor" for VGA access to the overhead Proxima. We have since run that wire under the floor with a disconnect; and now have notebook access from the conference room table to the projector. We still aren't using DHCP; so 'net access is limited to the WIN machine in the corner, or to a brave soul willing to mess with their network settings to a fixed IP/Mask/DNS, etc. -- Paul Stackhouse Webmaster Kentucky Educational TV Voice: 859-258-7135 600 Cooper Drive Fax: 859-258-7399 Lexington, KY 40502 http://www.ket.org From rbowen at rcbowen.com Wed Aug 23 21:41:35 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group References: <20000823184748.A20680@latitude.lexington.ibm.com> Message-ID: <39A48B5F.741421BC@rcbowen.com> Frank Price wrote: > ... > As for a starting module, well... seems like we'd need something > complex enough that it isn't immediately comprehensible but yet > accessible to many different people. I'd suggest something like CGI, > DBD, or POSIX (gulp). For a starting module, I would recommend a module that is all Perl. Stuff like DBD/DBI which is mostly in C would be a stretch for almost all of us. CGI might be a good place to start, and has the added advantage that we could probably keep going on it for the better part of a year. And that it contains stuff from a very beginner level to quite complex stuff. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From rbowen at rcbowen.com Wed Aug 23 21:43:06 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Non-member submission from ["Janine Ladick" ]] Message-ID: <39A48BBA.ED91CF93@rcbowen.com> Janine posted the following from an address that is not subscribed: > > Here's my take: a module reading group is like a regular (print book) > > reading group, except we do a close reading of Perl modules. Each > > module would probably have a leader/moderator. We could meet either > > on the list or before/during/after the physical meeting. Each time, > > we take a chunk of the module and figure out what it does, how to use > > it, problems, limitations, interesting things about it, etc. > > happy happy joy joy -Janine From rbowen at rcbowen.com Wed Aug 23 21:45:12 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group References: <20000823184748.A20680@latitude.lexington.ibm.com> <20000823201301.D20680@latitude.lexington.ibm.com> Message-ID: <39A48C38.9045EEF6@rcbowen.com> Frank Price wrote: > ... > How about some of the Net::* modules, like Net::Telnet? That works > under WinX, right? Is it standard for 5.6? Net::something would be kinda fun, as it would require some understanding of the underlying protocol, in addition to the Perl that implements it. Net::SNPP is kinda cool too. Not that I have any opportunity to use it any more, but it's a lot of fun. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From ken.rietz at asbury.edu Wed Aug 23 22:01:02 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C72@mail.asbury.edu> > > > ... > > As for a starting module, well... seems like we'd need something > > complex enough that it isn't immediately comprehensible but yet > > accessible to many different people. I'd suggest something > like CGI, > > DBD, or POSIX (gulp). > > For a starting module, I would recommend a module that is all Perl. > Stuff like DBD/DBI which is mostly in C would be a stretch for almost > all of us. CGI might be a good place to start, and has the added > advantage that we could probably keep going on it for the > better part of > a year. And that it contains stuff from a very beginner level to quite > complex stuff. A few comments: 1. This sounds like a great idea! It keeps Rich from having to drum up something new for each meeting, which wears really thin really fast. I'd say we make the LPM meetings this sort of thing, unless something else more important preempts it for a session. 2. I agree that DBD/DBI and POSIX both would seem very OS/CPU dependent. There is a good chance that the *nix port and the ActiveState ports are very different, making it hard to communicate cross-platform. I expect that Net::* could have similar problems. 3. CGI is clearly practical, but I haven't used CGI.pm (mainly due to the high level of static that Rich throws up about it). On the other hand, I do know enough about it to know that it is very sophisticated (having both subroutine and object-oriented interfaces, for one thing), and I am unlikely to try to wade through it myself. I'd vote for CGI.pm for starters. We are not likely to run out of modules to study in the foreseeable future, either. 4. Once we get used to this, we could also begin to think about writing some modules as a Perl Mongers group. -- Ken Rietz From rbowen at rcbowen.com Wed Aug 23 22:05:37 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group References: <23CBF54C1C42D411B2CA0004ACB8555F117C72@mail.asbury.edu> Message-ID: <39A49101.22164448@rcbowen.com> ken.rietz@asbury.edu wrote: ... > 2. I agree that DBD/DBI and POSIX both would seem very OS/CPU dependent. > There is a good chance that the *nix port and the ActiveState ports are > very different, making it hard to communicate cross-platform. I expect > that Net::* could have similar problems. All of the Net::* modules that I have worked with were, I think, pure Perl (no XS portion) and completely platform-independant. > 4. Once we get used to this, we could also begin to think about writing > some modules as a Perl Mongers group. I've been working on some Date:: modules for the last several weeks. And Matt has been working on some of them with me. And there are a plethora of others queued up to work on. These might be entertaining. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From sungo at earthling.net Wed Aug 23 22:17:00 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group In-Reply-To: <39A49101.22164448@rcbowen.com> Message-ID: On Wed, 23 Aug 2000, Rich Bowen wrote: > I've been working on some Date:: modules for the last several weeks. And > Matt has been working on some of them with me. And there are a plethora > of others queued up to work on. These might be entertaining. speaking of which, is there anyone listening who might be able to help me make perl sense out some vb and/or lisp algorithims? i've hoarked a slew of date algorithms off the 'net and frankly staring at these (the lisp especially) is making me cross-eyed :) thanks all. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From fprice at mis.net Thu Aug 24 18:19:03 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group In-Reply-To: <39A48B5F.741421BC@rcbowen.com>; from Rich Bowen on Wed, Aug 23, 2000 at 10:41:35PM -0400 References: <20000823184748.A20680@latitude.lexington.ibm.com> <39A48B5F.741421BC@rcbowen.com> Message-ID: <20000824191903.B21987@latitude.mis.net> On Wed, Aug 23, 2000 at 10:41:35PM -0400, Rich Bowen wrote: > > For a starting module, I would recommend a module that is all Perl. > Stuff like DBD/DBI which is mostly in C would be a stretch for almost > all of us. CGI might be a good place to start, and has the added > advantage that we could probably keep going on it for the better part of > a year. And that it contains stuff from a very beginner level to quite > complex stuff. Given the votes so far CGI is the winner. Unless there's a big outpouring for something else, let's do it. A few more details: - Do we want to do this at the meeting, in lieu of our other meeting activities (a presentation)? Seems there is support for this idea. - It's probably a good idea to have a pumpking. Volunteers? I'll be last resort but I really am not super-familiar with CGI. Or since CGI is so big, we could have a few pumpkings for different sections. Thoughts on how to divide it up, what to tackle first, etc? - The book reading groups I've known work like this: beforehand you decide what book/chapters to read, and then you read them before the meeting. The moderator usually brings a few questions/comments to get started, and then off you go. Do we want to do it like that or some other way? Thanks for caring, -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From ken.rietz at asbury.edu Fri Aug 25 11:11:08 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C73@mail.asbury.edu> > speaking of which, is there anyone listening who might be > able to help me > make perl sense out some vb and/or lisp algorithims? i've > hoarked a slew > of date algorithms off the 'net and frankly staring at these (the lisp > especially) is making me cross-eyed :) thanks all. I haven't worked with Lisp since the early 70's (i.e., before you were born), but I could give it a try. Just learn to work outward from the maze of parentheses, mainly. vb "ought" to be trivial.... Right. -- Ken From gcasillo at ket.org Fri Aug 25 11:13:00 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Perl Mongers Meetings References: <20000823184748.A20680@latitude.lexington.ibm.com> <4.3.2.7.2.20000823192407.02ae0210@mail.ket.org> Message-ID: <39A69B0C.E0C1FE55@ket.org> I will be happy to run the point for our Monday meetings at KET. Unless anyone wants to hold the meetings elsewhere. Then we can talk about alternative places for our meetings. As far as module reading goes, I'd like to examine the CGI module closer. Gregg David Hempy wrote: > I regret that I won't be able to attend the meetings for the next four > months, and as such cannot host the Perl Mongers meetings at KET. I have > mentioned this to fellow KET employee Gregg Casillo, and I expect he will > step forward and host the meetings. > > -dave > > -- > David Hempy > Internet Database Administrator > Kentucky Educational Television > -- (859)258-7164 -- (800)333-9764 From ken.rietz at asbury.edu Fri Aug 25 11:28:49 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C74@mail.asbury.edu> > Given the votes so far CGI is the winner. Unless there's a big > outpouring for something else, let's do it. > > A few more details: > > - Do we want to do this at the meeting, in lieu of our other meeting > activities (a presentation)? Seems there is support for this idea. That's what I was thinking. THe last thing I need is another, separate meeting. I really like Perl, but I wanna have a life, too. > - It's probably a good idea to have a pumpking. Volunteers? That's easy. I volunteer Rich. :-) (Told ya it was easy.) I'll volunteer to be under-pumpking ... pumpviceroy ... uhh, what *do* you call it? > I'll be > last resort but I really am not super-familiar with CGI. Or since > CGI is so big, we could have a few pumpkings for different > sections. Thoughts on how to divide it up, what to tackle first, > etc? I'm not familiar enough with the structure of CGI.pm to know. Ask the pumpking. :-) > - The book reading groups I've known work like this: beforehand you > decide what book/chapters to read, and then you read them before > the meeting. The moderator usually brings a few questions/comments > to get started, and then off you go. Do we want to do it like that > or some other way? Definitely, have everyone read about it first. Then, someone who has a good grasp of it (and that could change from meeting to meeting) give an overview. Then we all can jump in with questions and try to work out the rougher parts together. > Thanks for caring, Thanks for the idea! -- Ken Rietz From ken.rietz at asbury.edu Fri Aug 25 11:30:26 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Perl Mongers Meetings Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C75@mail.asbury.edu> > > I will be happy to run the point for our Monday meetings at > KET. Unless > anyone wants to hold the meetings elsewhere. Then we can talk about > alternative places for our meetings. Great. I operate by inertia. I'm liable to end up at KET even if we decided to meet at Joe Bologna's again. :-) -- Ken Rietz From rbowen at rcbowen.com Fri Aug 25 12:07:59 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group References: <23CBF54C1C42D411B2CA0004ACB8555F117C74@mail.asbury.edu> Message-ID: <39A6A7EF.E80BFCCF@rcbowen.com> ken.rietz@asbury.edu wrote: ... > > - It's probably a good idea to have a pumpking. Volunteers? > > That's easy. I volunteer Rich. :-) (Told ya it was easy.) Ho Ho. It is to laugh. > I'll volunteer to be under-pumpking ... pumpviceroy ... uhh, what *do* > you call it? Lackey > > I'll be > > last resort but I really am not super-familiar with CGI. Or since > > CGI is so big, we could have a few pumpkings for different > > sections. Thoughts on how to divide it up, what to tackle first, > > etc? > > I'm not familiar enough with the structure of CGI.pm to know. Ask the > pumpking. :-) First I suppose we should read the docs, and see what areas seem of most interest. There is so much crap in there that we can just pick the parts that interest us. Perhaps for this month, we can just peruse the docs, and decide what we want to talk about for future meetings. I'll take a look at the docs, and see what comes to mind. > Definitely, have everyone read about it first. Then, someone who has a > good grasp of it (and that could change from meeting to meeting) give an > overview. Then we all can jump in with questions and try to work out the > rougher parts together. I have Lincoln Stein's book about CGI.pm (signed, even!) but someone has borrowed it at the moment. If'When I get it back, perhaps I can make some comments about how Lincoln tackles a reading of the module. Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From llang at baywestpaper.com Fri Aug 25 12:34:03 2000 From: llang at baywestpaper.com (llang@baywestpaper.com) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: >ken.rietz@asbury.edu wrote: >> I'll volunteer to be under-pumpking ... pumpviceroy ... uhh, what *do* >> you call it? >Lackey Rats - You beat me to it! (That's what I get for going to lunch...) From ken.rietz at asbury.edu Fri Aug 25 13:14:09 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: module reading group Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C76@mail.asbury.edu> > > > - It's probably a good idea to have a pumpking. Volunteers? > > > > That's easy. I volunteer Rich. :-) (Told ya it was easy.) > > Ho Ho. It is to laugh. Great. Nothing better than a happy pumpking :-) > > I'll volunteer to be under-pumpking ... pumpviceroy ... > > uhh, what *do* > > you call it? > > Lackey I was thinking "drudge", but didn't want to say that, either. > > Definitely, have everyone read about it first. Then, > > someone who has a > > good grasp of it (and that could change from meeting to > > meeting) give an > > overview. Then we all can jump in with questions and try to > > work out the > > rougher parts together. > > I have Lincoln Stein's book about CGI.pm (signed, even!) but > someone has > borrowed it at the moment. If'When I get it back, perhaps I can make > some comments about how Lincoln tackles a reading of the module. Yeah, I'd say he understands it. Maybe whoever has the book could read/summarize for us the relevant sections (assuming someone in LPM has it). -- Ken From rbowen at rcbowen.com Sat Aug 26 20:36:52 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Brilliant article Message-ID: <39A870B4.E56B288F@rcbowen.com> Matt told me to read this on Thursday. I just got around to it. Great article. Damian is truly a treasure of the Perl community. http://www.perl.com/pub/2000/08/conway.html Rich -- Rich@cre8tivegroup.com Director of Web Application Development - The Creative Group http://www.cre8tivegroup.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From fprice at mis.net Sun Aug 27 10:19:23 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors Message-ID: <20000827111923.A447@localhost.localdomain> Ho LexPM, I'm tired of always forgetting the little details of error trapping. There doesn't seem to be any POD for it, so I'm gonna write one. Anyone want to join me? -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From rbowen at rcbowen.com Sun Aug 27 22:05:05 2000 From: rbowen at rcbowen.com (Rich Bowen) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors References: <20000827111923.A447@localhost.localdomain> Message-ID: <39A9D6E1.1A96652C@rcbowen.com> Frank Price wrote: > > Ho LexPM, > > I'm tired of always forgetting the little details of error trapping. > There doesn't seem to be any POD for it, so I'm gonna write one. > Anyone want to join me? Hmm. I'm not even sure what you're talking about. But I'm one of the strange folks that enjoys documentation. I'd be glad to help in some way. What kind of error trapping are you talking about? Rich -- rbowen@rcbowen.com Come hear me at ApacheCon! - http://www.apachecon.com/ Author - Apache Server Unleashed - http://apacheunleashed.com/ From ken.rietz at asbury.edu Mon Aug 28 11:13:03 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: RE: Brilliant article Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C78@moses.asbury.edu> > Matt told me to read this on Thursday. I just got around to it. Great > article. Damian is truly a treasure of the Perl community. > > http://www.perl.com/pub/2000/08/conway.html I had it marked to read when I received the www.perl.com article Wednesday. I still haven't gotten to it, but am lookign forward to it. -- Ken From gcasillo at ket.org Mon Aug 28 11:39:03 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Brilliant article References: <39A870B4.E56B288F@rcbowen.com> Message-ID: <39AA95A7.3EF15975@ket.org> This was a great read! It's no wonder why Perl and Perl hacks are terrific to work with. Gregg Rich Bowen wrote: > Matt told me to read this on Thursday. I just got around to it. Great > article. Damian is truly a treasure of the Perl community. > > http://www.perl.com/pub/2000/08/conway.html > > Rich > -- > Rich@cre8tivegroup.com > Director of Web Application Development - The Creative Group > http://www.cre8tivegroup.com/ > Author - Apache Server Unleashed - http://apacheunleashed.com/ From fprice at mis.net Mon Aug 28 11:56:02 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <39A9D6E1.1A96652C@rcbowen.com>; from rbowen@rcbowen.com on Sun, Aug 27, 2000 at 11:05:05PM -0400 References: <20000827111923.A447@localhost.localdomain> <39A9D6E1.1A96652C@rcbowen.com> Message-ID: <20000828125602.A915@localhost.localdomain> On Sun, Aug 27, 2000 at 11:05:05PM -0400, Rich Bowen wrote: > Frank Price wrote: > > > > Ho LexPM, > > > > I'm tired of always forgetting the little details of error trapping. > > There doesn't seem to be any POD for it, so I'm gonna write one. > > Anyone want to join me? > > Hmm. I'm not even sure what you're talking about. But I'm one of the > strange folks that enjoys documentation. I'd be glad to help in some > way. What kind of error trapping are you talking about? Well, essentially all the various ways to make sure that your code functions as you want it to. Now this was a very half-baked note I fired off, but what I had in mind is detailing things like: - details of using die() and warn(). - catching or ignoring signals. - throwing an error from within a module (back to the calling module). - Carp:: - how system() returns 0 on success. And whatever else. Maybe this is documented well enough and I'm just not a good researcher, I don't know :-) -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From ken.rietz at asbury.edu Mon Aug 28 13:49:50 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C7C@moses.asbury.edu> > On Sun, Aug 27, 2000 at 11:05:05PM -0400, Rich Bowen wrote: > > Frank Price wrote: > > > > > > Ho LexPM, > > > > > > I'm tired of always forgetting the little details of > error trapping. > > > There doesn't seem to be any POD for it, so I'm gonna write one. > > > Anyone want to join me? > > > > Hmm. I'm not even sure what you're talking about. But I'm one of the > > strange folks that enjoys documentation. I'd be glad to help in some > > way. What kind of error trapping are you talking about? > > Well, essentially all the various ways to make sure that your code > functions as you want it to. Now this was a very half-baked note I > fired off, but what I had in mind is detailing things like: > > - details of using die() and warn(). And don't forget eval() to trap errors. > - catching or ignoring signals. This is OS-dependent, but it is most often used on Unix. > - throwing an error from within a module (back to the calling > module). > - Carp:: And Coy. I like haiku. :-) > - how system() returns 0 on success. This is supposed to change in Perl 6, so don't get too into it. > And whatever else. Maybe this is documented well enough and I'm just > not a good researcher, I don't know :-) It seems that the perlfunc and perlvar man pages are as much as you will find easily. You can also check out the docs for the Fatal module (included with 5.6 at least). But there isn't much in one spot that I have found. -- Ken From sungo at earthling.net Mon Aug 28 17:13:32 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <23CBF54C1C42D411B2CA0004ACB8555F117C7C@moses.asbury.edu> Message-ID: On Mon, 28 Aug 2000 ken.rietz@asbury.edu wrote: > > - how system() returns 0 on success. > > This is supposed to change in Perl 6, so don't get too into it. i say get into as much as you want. perl 6 is 2 years away from even pre-alpha release and even once perl 6 is out there, it will be another 4 years before the PHBs let their underlings upgrade. so go for it, write copious documentation. if for no other reason than the ability to one day look back on our perl 5 code and realize what we were thinking. :) ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From sungo at earthling.net Mon Aug 28 21:03:54 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: hehehe Message-ID: got a chuckle out of this. and i quote happypod CGI: BUGS This module has grown large and monolithic. Furthermore it's doing many things, such as handling URLs, parsing CGI input, writing HTML, etc., that are also done in the LWP modules. It should be discarded in favor of the CGI::* modules, but somehow I continue to work on it. Note that the code is truly contorted in order to avoid spurious warnings when programs are run with the -w switch. somehow i never got this far in the docs before :) ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From ken.rietz at asbury.edu Tue Aug 29 15:01:09 2000 From: ken.rietz at asbury.edu (ken.rietz@asbury.edu) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors Message-ID: <23CBF54C1C42D411B2CA0004ACB8555F117C7F@moses.asbury.edu> > On Mon, 28 Aug 2000 ken.rietz@asbury.edu wrote: > > > > - how system() returns 0 on success. > > > > This is supposed to change in Perl 6, so don't get too into it. > > i say get into as much as you want. perl 6 is 2 years away from even > pre-alpha release and even once perl 6 is out there, it will > be another 4 > years before the PHBs let their underlings upgrade. so go for > it, write > copious documentation. if for no other reason than the > ability to one day > look back on our perl 5 code and realize what we were thinking. :) I disagree, friend. It strikes me as unreasonably stubborn to stay with a procedure that you know will change, and in its change will break your code. How about a compromise? Create something like a header file that defines $SYSTEM_CALL_SUCCESS = 0; $SYSTEM_CALL_FAILURE = 1; for now, and use only the symbolic values in the code. Then change the header for Perl 6. -- Ken From hempy at ket.org Tue Aug 29 15:22:15 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <23CBF54C1C42D411B2CA0004ACB8555F117C7F@moses.asbury.edu> Message-ID: <4.3.2.7.2.20000829161947.02b6cf40@mail.ket.org> At 04:01 PM 8/29/2000 -0400, you wrote: >How about a compromise? Create something like a header file that defines >$SYSTEM_CALL_SUCCESS = 0; >$SYSTEM_CALL_FAILURE = 1; >for now, and use only the symbolic values in the code. Then change the >header for Perl 6. Echh...that would look about as graceful as a DOS batch file! `foo *.txt` or die "oops."; becomes: unless (`foo *.txt` == $SYSTEM_CALL_SUCCESS) {die "oops."} -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764 From fireston at lexmark.com Tue Aug 29 15:35:59 2000 From: fireston at lexmark.com (Mik Firestone) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <4.3.2.7.2.20000829161947.02b6cf40@mail.ket.org> Message-ID: <200008292036.QAA08007@interlock2.lexmark.com> Upgrading any script from perl5 to perl6 is going to be a sufficiently large job that a simple switch from unless() to if() is not likely to make any difference to my work load. Additionally, the release is far enough into the future that it is all subject to change - what may be an attempt at saving work now may be negated later. I wouldn't worry about it. Code perl now, code perl later. My simple 0.02 USD worth. Mik On Tue, 29 Aug 2000, David Hempy is rumored to have said: >At 04:01 PM 8/29/2000 -0400, you wrote: > >>How about a compromise? Create something like a header file that defines >>$SYSTEM_CALL_SUCCESS = 0; >>$SYSTEM_CALL_FAILURE = 1; >>for now, and use only the symbolic values in the code. Then change the >>header for Perl 6. > > >Echh...that would look about as graceful as a DOS batch file! > > >`foo *.txt` or die "oops."; > >becomes: > >unless (`foo *.txt` == $SYSTEM_CALL_SUCCESS) {die "oops."} > > > >-- >David Hempy >Internet Database Administrator >Kentucky Educational Television > -- (859)258-7164 -- (800)333-9764 > > > -- Mik Firestone fireston@lexmark.com When I become an Evil Overlord: When I've captured my adversary and he says, "Look, before you kill me, will you at least tell me what this is all about?" I'll shoot him, and then say "No". From sungo at earthling.net Tue Aug 29 16:51:48 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <23CBF54C1C42D411B2CA0004ACB8555F117C7F@moses.asbury.edu> Message-ID: On Tue, 29 Aug 2000 ken.rietz@asbury.edu wrote: > How about a compromise? Create something like a header file that defines > $SYSTEM_CALL_SUCCESS = 0; > $SYSTEM_CALL_FAILURE = 1; > for now, and use only the symbolic values in the code. Then change the > header for Perl 6. we are talking about documentation here arent we? i wasnt talking about writing code dependant on that feature but rather documenting this feature. because someone someday will be given a crap load of perl5 code that depends on system's return value and (if 6 changes this drastically) wonder what in the world their predessor (sp??) was thinking. (I speak from experience here but in relation to perl4-ish code.) so documentation of this feature might be nice. but yeah, i agree. dont write production code that is dependant on a feature you know will probably change in the next few years. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From fprice at mis.net Tue Aug 29 16:58:52 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: ; from sungo@earthling.net on Tue, Aug 29, 2000 at 05:51:48PM -0400 References: <23CBF54C1C42D411B2CA0004ACB8555F117C7F@moses.asbury.edu> Message-ID: <20000829175852.B915@localhost.localdomain> On Tue, Aug 29, 2000 at 05:51:48PM -0400, Matt Cashner wrote: > On Tue, 29 Aug 2000 ken.rietz@asbury.edu wrote: > > > How about a compromise? Create something like a header file that defines > > $SYSTEM_CALL_SUCCESS = 0; > > $SYSTEM_CALL_FAILURE = 1; > > for now, and use only the symbolic values in the code. Then change the > > header for Perl 6. > > we are talking about documentation here arent we? i wasnt talking about > writing code dependant on that feature but rather documenting this > feature. because someone someday will be given a crap load of perl5 code > that depends on system's return value and (if 6 changes this > drastically) wonder what in the world their predessor (sp??) was > thinking. (I speak from experience here but in relation to perl4-ish > code.) so documentation of this feature might be nice. Yes, I think we're just talking about documenting this feature, and as has been noted, a good "NB: this feature will reverse itself in perl6" is a good idea :-) > but yeah, i > agree. dont write production code that is dependant on a feature you know > will probably change in the next few years. Hmmm. What if you have to write that code now? Since perl5.6 currently returns 0 on success from a system() call, and given that checking that return is a good idea ... what other option do I have? I don't really want to get in a shouting match about this, just my thoughts. -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From sungo at earthling.net Tue Aug 29 17:06:59 2000 From: sungo at earthling.net (Matt Cashner) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: perldoc perlerrors In-Reply-To: <20000829175852.B915@localhost.localdomain> Message-ID: On Tue, 29 Aug 2000, Frank Price wrote: > Hmmm. What if you have to write that code now? Since perl5.6 > currently returns 0 on success from a system() call, and given that > checking that return is a good idea ... what other option do I have? > > I don't really want to get in a shouting match about this, just my > thoughts. i hear you man. the more i think about it, the more i think mik is right. go ahead and use it. that's why its there. there will be so many other changes to make when the upgrade to 6 comes around that this will seem rather minor, i think. ------ Matt Cashner Web Applications Developer Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From gcasillo at ket.org Wed Aug 30 16:34:41 2000 From: gcasillo at ket.org (Gregg Casillo) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files Message-ID: <39AD7DF1.44F28F62@ket.org> I've come up against this problem more and more recently: I use Text::Template to plug some data into an HTML page and spit it out to the browser. However, the static HTML page has several server-side includes (and sometimes these includes have more includes nested within them) in it which Text::Template does not seem to handle. Does anyone who uses Text::Template know of a way around this without getting rid of the server-side includes? Thanks, Gregg From fprice at mis.net Wed Aug 30 17:49:02 2000 From: fprice at mis.net (Frank Price) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: <39AD7DF1.44F28F62@ket.org>; from gcasillo@ket.org on Wed, Aug 30, 2000 at 05:34:41PM -0400 References: <39AD7DF1.44F28F62@ket.org> Message-ID: <20000830184902.B12379@latitude.mis.net> On Wed, Aug 30, 2000 at 05:34:41PM -0400, Gregg Casillo wrote: > I've come up against this problem more and more recently: I use > Text::Template to plug some data into an HTML page and spit it out to > the browser. However, the static HTML page has several server-side > includes (and sometimes these includes have more includes nested within > them) in it which Text::Template does not seem to handle. > > Does anyone who uses Text::Template know of a way around this without > getting rid of the server-side includes? I thought CGI-generated pages couldn't use SSIs as such b/c the page went directly to the browser without the httpd ever seeing it. So the web server never has a chance to expand the include. Or at least that's the rationale I dreamed up when I could never make it work. I've done my own cheap SSIs like this (from within the perl script): open(SSI, "header.ssi"); print $_ while (); close SSI; Would be interested to know if you find a better way... -Frank. -- Frank Price | fprice@mis.net | www.sxse.org/fprice/ GPG key: www.sxse.org/fprice/gpg.asc | E Pluribus Unix From oneiros at dcr.net Thu Aug 31 08:39:18 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: <20000830184902.B12379@latitude.mis.net> Message-ID: On Wed, 30 Aug 2000, Frank Price wrote: > On Wed, Aug 30, 2000 at 05:34:41PM -0400, Gregg Casillo wrote: > > I've come up against this problem more and more recently: I use > > Text::Template to plug some data into an HTML page and spit it out to > > the browser. However, the static HTML page has several server-side > > includes (and sometimes these includes have more includes nested within > > them) in it which Text::Template does not seem to handle. > > > > Does anyone who uses Text::Template know of a way around this without > > getting rid of the server-side includes? > > I thought CGI-generated pages couldn't use SSIs as such b/c the page > went directly to the browser without the httpd ever seeing it. So the > web server never has a chance to expand the include. Or at least > that's the rationale I dreamed up when I could never make it work. You are correct. SSIs only work when the server reads the page, not when the page is being generated by a CGI. > I've done my own cheap SSIs like this (from within the perl script): > open(SSI, "header.ssi"); > print $_ while (); > close SSI; > > Would be interested to know if you find a better way... Well, almost the same, but to avoid the while loop, you can either do: open (SSI, '< header.ssi'); print ; close SSI; or, as I think ModPerl allows you to keep persistant data: $/ = undef; my $header = &read_file('header.ssi'); my $footer = &read_file('footer.ssi'); my $blah = &read_file('blah.ssi'); sub read_file { open (TEMP, "< $ARGV[0]"); my $temp = ; close (TEMP); return $temp; } and then you can just print $header from Text::Template ----- Joe Hourcle From sungo at earthling.net Thu Aug 31 08:48:08 2000 From: sungo at earthling.net (sungo@earthling.net) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: Message-ID: On Thu, 31 Aug 2000, Joe Hourcle wrote: > > > Does anyone who uses Text::Template know of a way around this without > > > getting rid of the server-side includes? you can also throw the perl in your template and have it do a pseudo ssi. <% open BLAH, "header.html"; while() { $OUT .= $_ } close BLAH; $OUT %> -------- Matt Cashner Web Applications Developer The Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From oneiros at dcr.net Thu Aug 31 13:56:31 2000 From: oneiros at dcr.net (Joe Hourcle) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: Message-ID: On Thu, 31 Aug 2000 sungo@earthling.net wrote: > On Thu, 31 Aug 2000, Joe Hourcle wrote: > > > > > Does anyone who uses Text::Template know of a way around this without > > > > getting rid of the server-side includes? > > you can also throw the perl in your template and have it do a pseudo ssi. > > <% open BLAH, "header.html"; while() { $OUT .= $_ } close > BLAH; $OUT %> I don't know Text::Template myself, but I can still get rid of the while loop: <% open (BLAH, '< header.html'); my @blah = ; close (BLAH); join('',@blah) %> or <% open (BLAH, '< header.html'); my @blah = ; close (BLAH); "@blah" %> ----- Joe Hourcle From hempy at ket.org Thu Aug 31 13:32:24 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: <39AD7DF1.44F28F62@ket.org> Message-ID: <4.3.2.7.2.20000831141245.02754480@mail.ket.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/lexington-pm/attachments/20000831/52d226bb/attachment.htm From sungo at earthling.net Thu Aug 31 14:13:21 2000 From: sungo at earthling.net (sungo@earthling.net) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: <4.3.2.7.2.20000831141245.02754480@mail.ket.org> Message-ID: On Thu, 31 Aug 2000, David Hempy wrote: > I imagine the reason you can't get the server to do SSI's in a CGI > program is that you *should* be able to put anything you > want in there yourself, without needing the server to do it...in > theory, anyway. Pain in my ass is what it really is. the reason you cant do ssi in cgi is that ssi is parsed by the web server before the headers and what not are even sent out. in cgi stuff, the server cant parse your content because it doesnt have the data before sending out headers and what not. -------- Matt Cashner Web Applications Developer The Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From sungo at earthling.net Thu Aug 31 14:14:10 2000 From: sungo at earthling.net (sungo@earthling.net) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: Message-ID: On Thu, 31 Aug 2000, Joe Hourcle wrote: > I don't know Text::Template myself, but I can still get rid of the while > loop: getting rid of the while loop is all well and good but you have to append to $OUT if you want reliable output in Text::Template. -------- Matt Cashner Web Applications Developer The Creative Group (http://www.cre8tivegroup.com) sungo@earthling.net | Codito, ergo sum From hempy at ket.org Thu Aug 31 14:47:27 2000 From: hempy at ket.org (David Hempy) Date: Thu Aug 5 00:05:51 2004 Subject: LPM: Text::Template and server-side includes in HTML files In-Reply-To: References: <4.3.2.7.2.20000831141245.02754480@mail.ket.org> Message-ID: <4.3.2.7.2.20000831153517.02b00d10@mail.ket.org> At 03:13 PM 8/31/2000 -0400, you wrote: >the reason you cant do ssi in cgi is that ssi is parsed by the web server >before the headers and what not are even sent out. in cgi stuff, the >server cant parse your content because it doesnt have the data before >sending out headers and what not. > >-------- >Matt Cashner I think I see your point, but it would still be nice (and do-able) for the server to allow parsing of CGI output. No reason it couldn't parse the body after the headers are already out the door. >getting rid of the while loop is all well and good but you have to append >to $OUT if you want reliable output in Text::Template. Not necessarily...if $OUT doesn't get a value in the eval block, it will use the last value evaluated within the block. You can say: Here are the colors: << @colors = ('blue', 'green', 'red'); join (', ' , @colors); >>
The last value (what join returns) will be used in the output. About the only time I use $OUT is when there is a loop or different values chosen by conditionals. If it is a straight substitution or transformation, I don't bother. I think of this as analogous to ending a module with "1;" so the final value is true. -dave -- David Hempy Internet Database Administrator Kentucky Educational Television -- (859)258-7164 -- (800)333-9764