From wildwood_players at yahoo.com Mon Jul 2 10:59:32 2001 From: wildwood_players at yahoo.com (Richard Wood) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: web site from June's DBI presentation Message-ID: <20010702155932.18142.qmail@web11501.mail.yahoo.com> Spugsters, Could someone please correct my note taking, At the June SPUG meeting on DBI, I wrote down a url to look at and I must have not been able to see it correctly. I have: hellvella.org/intro_org I am not certain why I wanted to look at it, but I am trying to follow up on my notes and I must have been interested in it for some reason. Thanks, Rich Wood ===== Richard O. Wood Wildwood IT Consultants, Inc. wildwood_players@yahoo.com 425.941.9437 __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From cmeyer at helvella.org Mon Jul 2 11:54:28 2001 From: cmeyer at helvella.org (Colin Meyer) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: web site from June's DBI presentation In-Reply-To: <20010702155932.18142.qmail@web11501.mail.yahoo.com> References: <20010702155932.18142.qmail@web11501.mail.yahoo.com> Message-ID: <20010702095428.C288@hobart.helvella.org> On Mon, Jul 02, 2001 at 08:59:32AM -0700, Richard Wood wrote: > Spugsters, > > Could someone please correct my note taking, > > At the June SPUG meeting on DBI, I wrote down a url to > look at and I must have not been able to see it > correctly. I have: > > hellvella.org/intro_org Try: http://helvella.org/intro_dbi/ Have fun, -C. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From Showell30 at aol.com Mon Jul 2 11:49:14 2001 From: Showell30 at aol.com (Showell30@aol.com) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: web site from June's DBI presentation Message-ID: <127.d8e1fc.2872000a@aol.com> Here is the correct URL for DBI presentation, as requested: helvella.org/intro_dbi/ I just checked it, seems to be working. -- Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20010702/9e99ab51/attachment.htm From wildwood_players at yahoo.com Mon Jul 2 12:14:35 2001 From: wildwood_players at yahoo.com (Richard Wood) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: web site from June's DBI presentation In-Reply-To: <20010702095428.C288@hobart.helvella.org> Message-ID: <20010702171435.58750.qmail@web11507.mail.yahoo.com> Colin and Steve, Thanks for the correct spelling on helvella. I am trying to get dbish going and struggling a bit. I connect to Oracle using dbi:Proxy with DBI_AUTOPROXY set with my hostname IP and port. I can't seem to figure out what dbish wants in the way of a string for the full 'dbi...' parameter. I will keep trying. I am running through permutations of things like: dbi:Proxy:user@IP;port=3333 dbi:Oracle;hostname=IP;port=3333 ... Regards, Rich Wood --- Colin Meyer wrote: > On Mon, Jul 02, 2001 at 08:59:32AM -0700, Richard > Wood wrote: > > Spugsters, > > > > Could someone please correct my note taking, > > > > At the June SPUG meeting on DBI, I wrote down a > url to > > look at and I must have not been able to see it > > correctly. I have: > > > > hellvella.org/intro_org > > Try: http://helvella.org/intro_dbi/ > > Have fun, > -C. > > - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: > owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: > ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL > by your Email-address > For daily traffic, use spug-list for LIST ; for > weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: > http://www.halcyon.com/spug/ > > ===== Richard O. Wood Wildwood IT Consultants, Inc. wildwood_players@yahoo.com 425.941.9437 __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From wildwood_players at yahoo.com Mon Jul 2 13:19:17 2001 From: wildwood_players at yahoo.com (Richard Wood) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: web site from June's DBI presentation In-Reply-To: <67AC2DB52118D411A8F300508B957F1204B14612@WA-MSG02> Message-ID: <20010702181917.7232.qmail@web11508.mail.yahoo.com> Eric, Thanks for the input. Your question caused me to look at a different section of the Perl DBI book. Specifically the section on ProxyServer. I found there (p 181) an expanded version of the dbi connect string which helped me put mine together: export DBI_USER=myusr export DBI_PASS=mypass dbish 'dbi:Proxy:hostname=123.45.6.789;port=3333;dsn=dbi:Oracle:' and Viola! I was in. Thanks again, Rich Wood --- "Brose, Eric" wrote: > Richard...Did you have any trouble finding > dbi::Proxy? It doesn't look like > it comes as part of the standard DBI module, and the > closest thing I've been > able to turn up on CPAN is DBI::ProxyServer. > > When using PPM, my search for dbi:Proxy turns up > nothing. Can you give me > any ideas here? > > Thanks, > Eric > -----Original Message----- > From: Richard Wood > [mailto:wildwood_players@yahoo.com] > Sent: Monday, July 02, 2001 10:15 AM > To: Colin Meyer > Cc: Seattle Perl Users Group > Subject: Re: SPUG: web site from June's DBI > presentation > > > Colin and Steve, > > Thanks for the correct spelling on helvella. > > I am trying to get dbish going and struggling a bit. > > I connect to Oracle using dbi:Proxy with > DBI_AUTOPROXY > set with my hostname IP and port. I can't seem to > figure out what dbish wants in the way of a string > for > the full 'dbi...' parameter. > > I will keep trying. I am running through > permutations > of things like: > > dbi:Proxy:user@IP;port=3333 > dbi:Oracle;hostname=IP;port=3333 > ... > > Regards, > > Rich Wood > > > --- Colin Meyer wrote: > > On Mon, Jul 02, 2001 at 08:59:32AM -0700, Richard > > Wood wrote: > > > Spugsters, > > > > > > Could someone please correct my note taking, > > > > > > At the June SPUG meeting on DBI, I wrote down a > > url to > > > look at and I must have not been able to see it > > > correctly. I have: > > > > > > hellvella.org/intro_org > > > > Try: http://helvella.org/intro_dbi/ > > > > Have fun, > > -C. > > > > - - - - - - - - - - - - - - - - - - - - - - - - - > - > > - - - - - - - - - - - > > POST TO: spug-list@pm.org PROBLEMS: > > owner-spug-list@pm.org > > Subscriptions; Email to majordomo@pm.org: > > ACTION LIST EMAIL > > Replace ACTION by subscribe or unsubscribe, > EMAIL > > by your Email-address > > For daily traffic, use spug-list for LIST ; for > > weekly, spug-list-digest > > Seattle Perl Users Group (SPUG) Home Page: > > http://www.halcyon.com/spug/ > > > > > > > ===== > Richard O. Wood > Wildwood IT Consultants, Inc. > wildwood_players@yahoo.com > 425.941.9437 > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: > owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: > ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL > by your Email-address > For daily traffic, use spug-list for LIST ; for > weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: > http://www.halcyon.com/spug/ > > ===== Richard O. Wood Wildwood IT Consultants, Inc. wildwood_players@yahoo.com 425.941.9437 __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From mkorb at versuslaw.com Wed Jul 11 10:49:50 2001 From: mkorb at versuslaw.com (Martin Korb) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: List Message-ID: <021401c10a21$1e75a6f0$9501a8c0@versuslaw.com> I came across this line of code and I am not at all sure what this means, particulary the "@@$". What does it mean? Thanks, Martin my $citeList = []; push @@$citeList, $with_something -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20010711/8fd55826/attachment.htm From jimfl at colltech.com Wed Jul 11 11:35:26 2001 From: jimfl at colltech.com (Jim Flanagan) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: List In-Reply-To: <021401c10a21$1e75a6f0$9501a8c0@versuslaw.com> Message-ID: <322621.3203832926@[192.168.1.101]> --Also Sprache Martin Korb On Wednesday, July 11, 2001 8:49 AM -0700: > my $citeList = []; > > push @@$citeList, $with_something That should produce a compile-time error. A single @ should be fine. The notation '[]' creates a reference to an empty array, so now $citeList is an array reference. To actually push something onto the array that the reference points to, you have to fool push into thinking you actually have an array, push @{$citeList}, $with_something; But Perl allows a shorthand in the absence of ambiguity, and you can say push @$citeList, $with_something; and you can get that entry by saying $citeList->[0]; # or ${$citeList}[0]; Now, if you say push @{@$citeList}, $with_something; You get the same result as above, but you've made perl work a little harder for it. SEE ALSO the perlref() manual page -- Jim Flanagan Collective Technologies jimfl@colltech.com http://www.colltech.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From nbhd at airborne.com Wed Jul 11 13:22:30 2001 From: nbhd at airborne.com (Bryan Dees) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: List References: <021401c10a21$1e75a6f0$9501a8c0@versuslaw.com> Message-ID: <3B4C9966.10BC65C2@airborne.com> Hello, Someone may answer this better as I am yet a flegling Perl addict myself, but: push takes the values from the $citelist array and sends them to the end of the $with_something array. I think the @@ is attempting to dump the contents of a multidimensional array much like: $blah[1][2] Sincerely, Bryan Dees Airborne Express Martin Korb wrote: > I came across this line of code and I am not at all sure what this > means, particulary the "@@$".What does it mean?Thanks,Martin my > $citeList = []; > push @@$citeList, $with_something > -- Bryan Dees Airborne Express internal website: pcsweb.airborne.com 206-830-4440 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20010711/5eafd73d/attachment.htm From jason at xio.com Wed Jul 11 19:06:52 2001 From: jason at xio.com (Jason Simpson) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Data::Dumper for an entire package? References: <322621.3203832926@[192.168.1.101]> Message-ID: <3B4CEA1C.6746EDE2@xio.com> I'd like to dump (and restore later) the state of all the variables in a particular package. Is there a way to do this? I tried a few things along the lines of #!/usr/bin/perl -w use Data::Dumper; package otherpackage; $a = 1; @a = ('a', 'b'); $b = 2; %b = ('key', 'value'); $c = 3; package main; open DATA, ">otherpackage.data"; $data = Dumper (\%otherpackage::); print $data; print DATA $data; close DATA; but from looking at the output file (otherpackage.data), that didn't do what I was hoping. Thanks. -jrs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From ced at carios2.ca.boeing.com Wed Jul 11 19:41:11 2001 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Data::Dumper for an entire package? Message-ID: <200107120041.RAA18745@carios2.ca.boeing.com> > I'd like to dump (and restore later) the state of all the variables in a > particular package. Is there a way to do this? > > I tried a few things along the lines of > > #!/usr/bin/perl -w > use Data::Dumper; > > package otherpackage; > $a = 1; > @a = ('a', 'b'); > $b = 2; > %b = ('key', 'value'); > $c = 3; > > package main; > open DATA, ">otherpackage.data"; > $data = Dumper (\%otherpackage::); > print $data; > print DATA $data; > close DATA; > > but from looking at the output file (otherpackage.data), that didn't do > what I was hoping. > Perhaps Dumpvalue is more what you want: use Dumpvalue; Dumpvalue->new->dumpvars('otherpackage'); which'll print: $a = 1 @a = ( 0 'a' 1 'b' ... etc. perldoc Dumpvalue Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From jason at xio.com Thu Jul 12 12:48:54 2001 From: jason at xio.com (Jason Simpson) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Data::Dumper for an entire package? References: <200107120041.RAA18745@carios2.ca.boeing.com> Message-ID: <3B4DE306.37982EFB@xio.com> ced@carios2.ca.boeing.com wrote: > > Perhaps Dumpvalue is more what you want: ... > which'll print: > > $a = 1 > @a = ( > 0 'a' > 1 'b' > ... > etc. Seems very close, but it doesn't look like it outputs in a form that would be easily read in and restored, unfortunately. Still looking... Thanks, though. -jrs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From rick.croote at philips.com Thu Jul 12 13:37:20 2001 From: rick.croote at philips.com (rick.croote@philips.com) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Data::Dumper for an entire package? Message-ID: Look at XML::Dumper. It allows you to dump a data type to a file of xml format and restore the data back to the original form. I've done this with very large hashes, and it sure makes the job very easy, but as far as a whole package, I don't know. First, I never use a package other than an object orientated fashion, and now days limit that to a hash, which should dump nicely, but you may have problems with the fact that the hash is blessed. However, one could copy the blessed hash to a non-blessed hash, save it to the xml file, then allow the object to initialize itself from the xml file, or something like that. Have Fun, Rick Croote Here is a working example I threw together: #!/usr/bin/perl -w use strict; use FileHandle; use XML::DUMPER; use Data::Dumper; use constant objectFile => 'myObject.xml'; { # # Just some bogus data for now. # my $filedata = { aScalar => 1, aArray => ['a', 'b'], aHash => {key => 'value'} }; print Dumper("Before", $filedata); # # Save it. # saveObject($filedata); # # Restore it. # $filedata = restoreObject(); print Dumper("After", $filedata); } sub saveObject { my ($filedata) = @_; my $fh = new FileHandle '>' . objectFile; if (defined $fh) { my $xmldump = new XML::Dumper; print $fh $xmldump->pl2xml($filedata); } } sub restoreObject { my $parser = new XML::Parser(Style => 'Tree'); my $xmldump = new XML::Dumper; my $doc = $parser->parsefile(objectFile); return $xmldump->xml2pl($doc); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From jay at Scherrer.com Thu Jul 12 14:30:01 2001 From: jay at Scherrer.com (Jay Scherrer) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Calling a file as a sub-routine? Message-ID: <3B4DFAB9.B088B6CB@scherrer.com> How can I call a separate .pl file into the main as a sub-routine? I am trying to create separate reusable files instead of listing all of the routines as subs in a large program. How do I set up a separate file called outside.pl and then use it as a subroutine inside the main program called mainProgram.pl? example: outside.pl sub outside { do something; } mainProgram.pl #!/usr/bin/perl -w require "outside.pl"; if ($foo = $bar) { outside.pl; } Jay - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tuck at whistlingfish.net Thu Jul 12 14:51:59 2001 From: tuck at whistlingfish.net (Matt Tucker) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Data::Dumper for an entire package? In-Reply-To: <3B4CEA1C.6746EDE2@xio.com> References: <322621.3203832926@[192.168.1.101]> <3B4CEA1C.6746EDE2@xio.com> Message-ID: <77630000.994967519@benzene> -- Jason Simpson spake thusly: > I'd like to dump (and restore later) the state of all the variables > in a particular package. Is there a way to do this? My guess is that you're not actually asking the right question. The right question would be, "Would it be a good idea to try to magically dump all the variables from a package which I could then later restore and hope everything worked?" I would say the answer short answer to that would be "No," and the long answer would be "If you're looking for persistent behavior from a package, the package should be written in such a way that it provides that behavior as part of the design." However, if you really want to do such a thing, you could start playing around with the %otherpackage:: array (the trailing "::" is vital), which would tell you what variable names are getting used. You would then have to determine for each name whether the hash, array and scalar were populated and dump each of them in turn. As I recall, Apache::PerlRun has a flush_namespace function which does some prowling through namespaces to a slightly different end. If you're still bent on this mad path, you could look there for inspiration. > I tried a few things along the lines of > > #!/usr/bin/perl -w > use Data::Dumper; > > package otherpackage; > $a = 1; > @a = ('a', 'b'); > $b = 2; > %b = ('key', 'value'); > $c = 3; > > package main; > open DATA, ">otherpackage.data"; > $data = Dumper (\%otherpackage::); > print $data; > print DATA $data; > close DATA; > > but from looking at the output file (otherpackage.data), that didn't > do what I was hoping. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20010712/29db92f5/attachment.bin From sweetsue at sweethomes.com Thu Jul 12 14:55:04 2001 From: sweetsue at sweethomes.com (Susanne Bullo) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Apache::ASP References: <3B4DFAB9.B088B6CB@scherrer.com> Message-ID: <064601c10b0c$8c291420$a40fbbd0@address.com> Anyone on this list have experience with Apache::ASP? I'm trying to get it to work and having a devil of a time. Please reply to me personally rather than clutter the list. Thanks! Susanne Bullo Sweet Homes - http://www.sweethomes.com www.missionEvitalize.com - "Revitalize Your Mission" www.needanexpertfast.com - Find an Expert Fast! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tuck at whistlingfish.net Thu Jul 12 15:00:22 2001 From: tuck at whistlingfish.net (Matt Tucker) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Calling a file as a sub-routine? In-Reply-To: <3B4DFAB9.B088B6CB@scherrer.com> References: <3B4DFAB9.B088B6CB@scherrer.com> Message-ID: <79410000.994968022@benzene> -- Jay Scherrer spake thusly: > How can I call a separate .pl file into the main as a sub-routine? > I am trying to create separate reusable files instead of listing all > of the routines as subs in a large program. > > How do I set up a separate file called outside.pl and then use it as a > subroutine inside the main program called mainProgram.pl? > example: > outside.pl > sub outside { > do something; > } > > mainProgram.pl ># !/usr/bin/perl -w > require "outside.pl"; > if ($foo = $bar) { > outside.pl; > } Why not just: if ($foo == $bar) { outside(); } And if you're going to start doing that sort of thing, why not use packages? Outside.pm: package Outside; sub outside { do something; } main.pl: #!/usr/bin/perl use Outside; if ($foo == $bar) { Outside::outside(); # Or use Exporter if you don't want to # be calling by package name every time } This is what the package system is for, and everyone's used to it. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20010712/2cb5b9a7/attachment.bin From tim at consultix-inc.com Thu Jul 12 19:47:06 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: "Minimal "Perl" talk, 7/17 meeting Message-ID: <20010712174706.A22247@timji.consultix.wa.com> SPUGsters, Final reminder about next-week's "Beginner Level" SPUG meeting. Please help me prepare for YAPC::Europe by turning up and helping me debug my presentation! 8-} -Tim Seattle Perl Users Group July Meeting Title: "Minimal Perl for the Impatient" Situation: Rehearsal for 8/2/01 offering at YAPC::Europe, Amsterdam Speaker: Tim Maher Head Software Instructor, CONSULTIX POB 70563, Seattle WA 98107 tim@consultix-inc.com http://www.consultix-inc.com (206) 781-UNIX/8649 Time: July 17th, 2001 (Third Tuesday), 7pm-9pm Location: Union Bank of Cal., Madison & 5th, 5th Floor Mtg Room More Info: www.zipcon.net/~spug Cost: Free! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Target Audience Anyone who doesn't already know Perl, needs to do simple data processing, and has a logical mindset can benefit from attending. This tutorial is particularly well suited to individuals of the following types: o Non-Programmers (poets, managers, etc.) who want to do simple data processing tasks, but without learning too much or thinking too hard, and o Programmers who already know a language or two, and want to learn just enough Perl to gain access to some of its special capabilities. Prerequisites Prior experience with programming is helpful, but anyone with a logical mindset can benefit from attending. Course Philosophy Perl is a wonderful language, that offers programmers a rich feature set, huge stylistic and syntactic liberties, and many ways to accomplish the same thing. But for the impatient beginner, these characteristics can translate into "too many complications, too much uncertainty, and too many choices." Although Perl's motto is "There's More Than One Way to Do It", this tutorial will teach students only one way -- the "Easiest Way"! What Attendees Will Learn Students will learn a carefully selected minimal subset of Perl that gives immediate access to some of its powerful capabilities, and serves as a solid foundation for additional learning. The tutorial's approach is based on the "Pattern/Action" model of programming, as featured in the influential AWK language. Upon completion of the tutorial, students will have the necessary skills to convert files, validate data, generate simple reports, and perform numerical calculations in Perl. Author & Instructor During the last two decades, Dr. Tim Maher has taught programming to thousands of high-tech professionals. As a Professor of Computer Science, and later as a Software Instructor for AT&T, Sun, DEC, HP, and CONSULTIX, Dr. Maher has consistently earned acclaim for his highly effective and entertaining style of course development and presentation. ======================================================== | Tim Maher, Ph.D. Tel: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: seattleperl.com | ======================================================== *==========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | TIM MAHER: Unix/Perl DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI | | *We are currently scheduling On-Site Classes on UNIX and Perl topics!* | *==========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tim at consultix-inc.com Thu Jul 12 20:08:22 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Who's Going to PerlWhirl, Jan. 2002? Message-ID: <20010712180822.B22247@timji.consultix.wa.com> SPUGsters, I had a lot of fun on the Database Discovery cruise up the Alaskan coast last month, hanging out with Smart Geeks, and trying to spot elusive whales! 8-} I'm currently in negotiations with the GeekCruises.com people about presenting a tutorial at PerlWhirl in January, in the Caribbean. It would be based on my "Intermediate Perl" course (http://www.consultix-inc.com/int_perl.html). However, the Head Geek-Cruiser say they can't pay any of my expenses (!!) unless they get a larger than usual crowd, so I'm eager to help them get more registrants! Which leads me to this question: How many of you think you might attend? It's not cheap (>$2k, exact amount depending), but if your company will spring for the fees, as many have done in the past, it's sure a fun way to learn more about Perl and have unique opportunities to socialize in a relaxed setting with Perl gurus. So those who think they might be going, please let me know! Thanks, Tim *==========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | TIM MAHER: Unix/Perl DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI | | *We are currently scheduling On-Site Classes on UNIX and Perl topics!* | *==========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From damian at mail.csse.monash.edu.au Fri Jul 13 05:47:30 2001 From: damian at mail.csse.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Who's Going to PerlWhirl, Jan. 2002? Message-ID: <200107131047.UAA26421@indy05.csse.monash.edu.au> > It's not cheap (>$2k, exact amount depending), but if your company > will spring for the fees, as many have done in the past, it's sure > a fun way to learn more about Perl and have unique opportunities > to socialize in a relaxed setting with Perl gurus. > > So those who think they might be going, please let me know! I'm *definitely* going to be there. Let me assure you that 2k+ is a small price to pay to hear me do un antire dee's tyutarial wi' ay Jamayyyyken arkcent, mon! Deemian ;-) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tim at consultix-inc.com Fri Jul 13 07:23:08 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Who's Going to PerlWhirl, Jan. 2002? In-Reply-To: <200107131047.UAA26421@indy05.csse.monash.edu.au>; from Damian Conway on Fri, Jul 13, 2001 at 08:47:30PM +1000 References: <200107131047.UAA26421@indy05.csse.monash.edu.au> Message-ID: <20010713052308.A27120@timji.consultix.wa.com> On Fri, Jul 13, 2001 at 08:47:30PM +1000, Damian Conway wrote: > > It's not cheap (>$2k, exact amount depending), but if your company > > will spring for the fees, as many have done in the past, it's sure > > a fun way to learn more about Perl and have unique opportunities > > to socialize in a relaxed setting with Perl gurus. > > > > So those who think they might be going, please let me know! > > I'm *definitely* going to be there. > > Let me assure you that 2k+ is a small price to pay to hear me do > un antire dee's tyutarial wi' ay Jamayyyyken arkcent, mon! > > Deemian ;-) And if Damian would explain how he can write Perl programs using Latin words and Klingon numbers in that Jamaican accent, the cruise would then be worth easily twice that much, just for its sheer "polyglottal" entertainment value! So how about it, "Deemian"? 8-} ( I'm kidding; PLEASE, don't anybody really dare him to do this! The ship would likely capsize, from the weight of all the Caribbean pirates swarming on board to get free Perl training 8-} ) *==========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | TIM MAHER: Unix/Perl DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI | | Seattle Classes; Perl + Modules: 9/17-21 UNIX Fundamentals: 9/24-28 | *==========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From gfb at sdc.cs.boeing.com Fri Jul 13 10:23:12 2001 From: gfb at sdc.cs.boeing.com (Gareth Beale) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: Who's Going to PerlWhirl, Jan. 2002? Message-ID: <200107131523.IAA10714@klawatti.sdc.cs.boeing.com> > > I'm currently in negotiations with the GeekCruises.com > people about presenting a tutorial at PerlWhirl in January, > in the Caribbean. It would be based on my "Intermediate Perl" > course (http://www.consultix-inc.com/int_perl.html). > > However, the Head Geek-Cruiser say they can't pay any of my > expenses (!!) unless they get a larger than usual crowd, so I'm > eager to help them get more registrants! > > Which leads me to this question: How many of you think you might > attend? > > It's not cheap (>$2k, exact amount depending), but if your company > will spring for the fees, as many have done in the past, it's sure > a fun way to learn more about Perl and have unique opportunities > to socialize in a relaxed setting with Perl gurus. For info: http://www.geekcruises.com/home/pw_home.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From jope-spug at jope.net Sat Jul 14 15:02:42 2001 From: jope-spug at jope.net (El JoPe Magnifico) Date: Wed Aug 4 00:08:09 2004 Subject: SPUG: mod_perl auth questions Message-ID: I'm writing a mod_perl authentication handler, and have run across a couple annoyances that don't seem to be covered in the eagle book or any of the POD that I've read so far. 1. While processing most requests, handler() is being called three times. The only exception has been when handler() returns early because no username was provided. My only thought is that this is the result of sub-requests being fired off somewhere under the hood. 2. I can set the user, but can't find any way to set the group(s) to which the user belongs, which apparently is needed if "require valid-user" is used, which in turn is necessary in order to use an authentication handler. I've found two workarounds, but neither is perfect: a. Add "AuthGroupFile /dev/null" to the configuration. This adds an unwanted dependence on mod_auth though. b. Use a no-op, i.e. $req->push_handlers(PerlAuthzHandler,\&OK). This prevents me from falling through to the default authorization routine in the Apache core. Right now this isn't a problem, so this is what I'm using. But it just doesn't seem "correct". Feedback appreciated! -jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From Richard.Anderson at raycosoft.com Sat Jul 14 15:50:37 2001 From: Richard.Anderson at raycosoft.com (Richard Anderson) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Re: mod_perl auth questions References: Message-ID: <010101c10ca6$a4370c20$3988ddd1@aciwin> I did this recently, and build a fairly sophisticated system using a modified version of Apache::AuthCookie. The only hard part was getting the Apache config file right. This method had the advantage of giving me complete control over the authentication and authorization process. My experience with the code in the Eagle book is that it is buggy and several different groups have had problems trying to implement it. Good luck! Richard ----- Original Message ----- From: "El JoPe Magnifico" To: "Seattle Perl Users Group" Sent: Saturday, July 14, 2001 1:02 PM Subject: SPUG: mod_perl auth questions > I'm writing a mod_perl authentication handler, and have run across a > couple annoyances that don't seem to be covered in the eagle book or > any of the POD that I've read so far. > > 1. While processing most requests, handler() is being called three times. > The only exception has been when handler() returns early because no > username was provided. My only thought is that this is the result > of sub-requests being fired off somewhere under the hood. > > 2. I can set the user, but can't find any way to set the group(s) to which > the user belongs, which apparently is needed if "require valid-user" > is used, which in turn is necessary in order to use an authentication > handler. I've found two workarounds, but neither is perfect: > > a. Add "AuthGroupFile /dev/null" to the configuration. > This adds an unwanted dependence on mod_auth though. > > b. Use a no-op, i.e. $req->push_handlers(PerlAuthzHandler,\&OK). > This prevents me from falling through to the default authorization > routine in the Apache core. Right now this isn't a problem, so > this is what I'm using. But it just doesn't seem "correct". > > Feedback appreciated! > -jp > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tim at consultix-inc.com Mon Jul 16 19:42:59 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: How do -aF"\t" in DOS/Windoze? Message-ID: <20010716174259.A828@timji.consultix.wa.com> SPUGsters, In my "Minimal Perl" tutorial that I'll be debutting at tomorrow night's SPUG meeting, I try very hard to create the illusion that Perl is really easy and fun to use, and that it even works on Microsoft platforms! 8-} So somebody please tell me how to write scripts for the ActivePerl I downloaded only yesterday to a Win95 box! Although the "perldoc perlrun" documentation promises that you can use /, ", or " on the shebang line to enclose the field-separators for the -F option, none of these works for me. "perl -wlnaFx" works to make the field-separator x, but nothing more elaborate works; I either get a syntax error, or no splitting on the specified delimiter, using: perl -wlnaF'x' perl -wlnaF"x" perl -wlnaF/x/ perl -wlnaF\"x\", etc. Although I was embarrassed, I even tried doubling the quotes, thinking DOS might be confusing itself with VMS, to no avail: perl -wlnaF''x'' perl -wlnaF""x"" And once I get that figured out, I'd like to add the -i option, with it's own argument, which I can't even make work on Linux: # Trying to "shebangify" following one-liner: /usr/bin/perl -wlnaF' ' -i'.bak' -e 'print "$F[0]\n"' # Here are some attempts, and their errors (OpenLinux 2.2.18; perl 5.6.0) #! /usr/bin/perl -wlnaF' ' -i'.bak' Unrecognized file test: -i at s line 1. #! /usr/bin/perl -wlnaF' ' -i.bak Unrecognized file test: -i at s line 1. (Does it think that second argument is the *program* ?) #! /usr/bin/perl -wlnaF' 'i.bak Bareword found where operator expected at s line 1, near "' 'i" (Missing operator before i?) Unquoted string "i" may clash with future reserved word at s line 1. syntax error at s line 1, near "' 'i" Unquoted string "bak" may clash with future reserved word at s line 1. Execution of s aborted due to compilation errors. #! /usr/bin/perl -wlnaF' 'i.bak This one doesn't generate nay errors, but it doesn't split on either: #! /usr/bin/perl -wlnaF/ /i.bak Can somebody please tell me the correct syntax to a) on Linux, include two options on the shebang line that require corresponding arguments, that might need quoting, and b) on Dos/Windoze, supply a non-printing ( ) or special ( \t) character as the argument of -F. TIA, -Tim *==========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | TIM MAHER: Unix/Perl DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI | | Classes! UNIX Fundamentals: 7/23-26; Perl+Mods: 9/17-21; UNIX: 9/24-28 | *==========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From ced at carios2.ca.boeing.com Mon Jul 16 21:52:11 2001 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: How do -aF"\t" in DOS/Windoze? Message-ID: <200107170252.TAA05920@carios2.ca.boeing.com> > So somebody please tell me how to write scripts for the ActivePerl I > downloaded only yesterday to a Win95 box! Although the "perldoc perlrun" > documentation promises that you can use /, ", or " on the shebang line > to enclose the field-separators for the -F option, none of these works for me. > "perl -wlnaFx" works to make the field-separator x, but nothing more > elaborate works; I either get a syntax error, or no splitting on the > specified delimiter, using: > perl -wlnaF'x' > perl -wlnaF"x" > perl -wlnaF/x/ > perl -wlnaF\"x\", etc. > Although I was embarrassed, I even tried doubling the quotes, > thinking DOS might be confusing itself with VMS, to no avail: > perl -wlnaF''x'' > perl -wlnaF""x"" > And once I get that figured out, I'd like to add the -i option, with it's > own argument, which I can't even make work on Linux: I'm not sure about the quoting issue you're seeing but I don't think -i works with -p or -n since Win32 won't rename a file that's been opened for reading. I can only think of cumbersome workarounds but maybe there's a slick alternative. > # Trying to "shebangify" following one-liner: > /usr/bin/perl -wlnaF' ' -i'.bak' -e 'print "$F[0]\n"' > # Here are some attempts, and their errors (OpenLinux 2.2.18; perl 5.6.0) > #! /usr/bin/perl -wlnaF' ' -i'.bak' > Unrecognized file test: -i at s line 1. > #! /usr/bin/perl -wlnaF' ' -i.bak > Unrecognized file test: -i at s line 1. > (Does it think that second argument is the *program* ?) > #! /usr/bin/perl -wlnaF' 'i.bak > Bareword found where operator expected at s line 1, near "' 'i" > (Missing operator before i?) > Unquoted string "i" may clash with future reserved word at s line 1. > syntax error at s line 1, near "' 'i" > Unquoted string "bak" may clash with future reserved word at s line 1. > Execution of s aborted due to compilation errors. > > #! /usr/bin/perl -wlnaF' 'i.bak > > This one doesn't generate nay errors, but it doesn't split on either: > #! /usr/bin/perl -wlnaF/ /i.bak > > Can somebody please tell me the correct syntax to a) on Linux, include > two options on the shebang line that require corresponding arguments, > that might need quoting, and b) on Dos/Windoze, supply a non-printing > ( ) or special ( \t) character as the argument of -F. > Dang, I don't have Linux/bash handy but the following worked on Solaris/ksh. #!/usr/bin/perl -lawn -i.bak -F\t (I noticed though the -a pattern will split on whitespace exactly like split " " though so the alternate field specifier shouldn't be necessary though in one of the cases above) Rgds, -- Charles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tim at consultix-inc.com Tue Jul 17 17:43:44 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: How do -aF"\t" in DOS/Windoze? Message-ID: <20010717154344.B15618@timji.consultix.wa.com> SPUGsters, This is a messed up retread of a forwarded message that makes it hard to attribute the correct remarks to the appropriate author. 8-{ Suffice it to say that I'm the one doing all the whining and talking about cheating, and Charles is the one with the friendly, albeit inadmissable, suggestions 8-} -Tim Maher >----- Forwarded message from ced@carios2.ca.boeing.com ----- >On Mon, Jul 16, 2001 at 07:52:11PM -0700, ced@carios2.ca.boeing.com wrote: >> >> >> > And once I get that figured out, I'd like to add the -i option, with it's >> > own argument, which I can't even make work on Linux: >> >> I'm not sure about the quoting issue you're seeing but I don't think >> -i works with -p or -n since Win32 won't rename a file that's been >> opened for reading. > >|But Perl could work around that, by using a temporary file and >|renaming it after the reading filehandle has been closed; of course, >|that doesn't mean it DOES do that, just that it could! 8-} > > >> I can only think of cumbersome workarounds >> but maybe there's a slick alternative. > >|Okay, thanks for your input anyway. > >> >> > # Trying to "shebangify" following one-liner: >> > /usr/bin/perl -wlnaF' ' -i'.bak' -e 'print "$F[0]\n"' >> >> > # Here are some attempts, and their errors (OpenLinux 2.2.18; perl 5.6.0) >> >> > #! /usr/bin/perl -wlnaF' ' -i'.bak' > > >> > Can somebody please tell me the correct syntax to a) on Linux, include >> > two options on the shebang line that require corresponding arguments, >> > that might need quoting, and b) on Dos/Windoze, supply a non-printing >> > ( ) or special ( \t) character as the argument of -F. >> > >> >> Dang, I don't have Linux/bash handy but the following worked on >> Solaris/ksh. >> >> #!/usr/bin/perl -lawn -i.bak -F\t > >|With some OS environments, like Solaris/ksh, you're free to provide >|multiple arguments to the command interpreter, but with others >|(like Linux/Bash) you've got to squish them all together, which creates >|challenging parsing problems when you've got two options like -F and -i >|that each need attached arguments! 8-{ > >| Tim found this on the bash man page: >| >| If the program is a file beginning with #!, the remainder >| of the first line specifies an interpreter for the pro >| gram. The shell executes the specified interpreter on >| operating systems that do not handle this executable for >| mat themselves. The arguments to the interpreter consist >| of a single optional argument following the interpreter >| ^^^^^^^^^^^^^^^^^^^^^^^^^ >| name on the first line of the program, followed by the >| name of the program, followed by the command arguments, if >| any. >> >> (I noticed though the -a pattern will split on whitespace exactly >> like split " " though so the alternate field specifier shouldn't >> be necessary though in one of the cases above) > >|But that's cheating; I was just using as the separator to simply >|illustrate the problem; in reality, I want to find a syntax that will allow >|me to use any arbitrary delimiters, using specifications like -aF'[,:-]+' . > >|Any DOS Perlers out there who can tell me what shebang-lines are possible >|in that wacky world? > >I tried moving some (well, all of 'em actually) of the options to the >command line, e.g., > >perl -lawn -F'xyz\s+delimit' -i.bak file.pl input.txt > >Everything now works charmingly. But, that's not what you want so maybe >the DOS'ers can decipher what's happening. >-- >Charles DeRykus That's cheating too! 8-} I'm trying to find a way to supply all the invocation options on the shebang line, without DOS/Windoze freaking out about syntax errors. I'm surprised that this is turning out to be so difficult! And now that I've delved into this a bit (and strayed from my usual Korn shell), I've realized that even under the Bash shell on Linux, you're restricted to a single option argument on the shebang line. How can you ever supply two options with corresponding arguments with this limitation? 8-{ As in #! /usr/bin/perl -wlnaF':' -i'orig_*' This doesn't work with Bash on Linux, or Win95 command.com, and of course, neither does this: #! /usr/bin/perl -wlnaF:iorig_* (How could the F option be expected to know where its argument ends?) Must I resort to writing a special wrapper that deciphers the shebang-line options and then invokes perl with separated arguments? Seems like there ought to be a better way to handle this, wouldn't you think? *=========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | TIM MAHER: Unix/Perl DAMIAN CONWAY: Adv. Perl COLIN MEYER: Perl/DBI | | CLASSES-> Minimal Perl: 9/17; Perl+Mods: 9/18; UNIX: 9/24; Shell: 10/8 | *=========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From scott at sabmail.rresearch.com Tue Jul 17 19:41:33 2001 From: scott at sabmail.rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: How do -aF"\t" in DOS/Windoze? In-Reply-To: <20010717154344.B15618@timji.consultix.wa.com> References: <20010717154344.B15618@timji.consultix.wa.com> Message-ID: <20010717174133.A4209@sabami.seaslug.org> On Tue, Jul 17, 2001 at 03:43:44PM -0700, Tim Maher/CONSULTIX wrote: > That's cheating too! 8-} I'm trying to find a way to supply all > the invocation options on the shebang line, without DOS/Windoze freaking > out about syntax errors. I'm surprised that this is turning out to be > so difficult! And now that I've delved into this a bit (and strayed from > my usual Korn shell), I've realized that > even under the Bash shell on Linux, you're restricted to a single option > argument on the shebang line. How can you ever supply two options with > corresponding arguments with this limitation? 8-{ As in > > #! /usr/bin/perl -wlnaF':' -i'orig_*' > > This doesn't work with Bash on Linux, or Win95 command.com, > and of course, neither does this: Hmmm...I'm not really sure about Linux and it's been several years since I thought about this on any Unix, but I thought that the problem with the shebang lines wasn't number of arguments, but number of bytes (but I thought the limit was longer than you're using there). Also, I don't think it gets interpreted by your shell, but by the underlying system call that tries to execute the file. But I haven't looked at the source code in the system that would be doing all that work, so I don't really know... Sorry I don't have any real answers... -- Scott Blachowicz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From mkorb at versuslaw.com Wed Jul 18 11:07:36 2001 From: mkorb at versuslaw.com (Martin Korb) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: win32 services Message-ID: <004201c10fa3$c33d39a0$9501a8c0@versuslaw.com> How can I turn a .pl into a service on a win32 machine. (basically change a .pl to a .exe residing in the registry) I have been looking at the Win32::TieRegistry module but I think that is more for getting info about a service and registry after it has been installed. Thanks Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20010718/ab580dea/attachment.htm From tnight at pobox.com Wed Jul 18 11:49:44 2001 From: tnight at pobox.com (Terry Nightingale) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: win32 services In-Reply-To: <004201c10fa3$c33d39a0$9501a8c0@versuslaw.com> Message-ID: On Wed, 18 Jul 2001, Martin Korb wrote: > How can I turn a .pl into a service on a win32 machine. (basically > change a .pl to a .exe residing in the registry) I have been looking > at the Win32::TieRegistry module but I think that is more for > getting info about a service and registry after it has been > installed. Point your favorite search engine at "srvany". It is relatively easy to use and surprisingly well documented. I've successfully used it to run Perl services on NT/2k. -- Terry Nightingale +1-425-649-9304(v) / +1-425-643-7112(f) Prediction is very difficult, especially of the future. -Niels Bohr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From mark.johnston at pnl.gov Wed Jul 18 11:52:29 2001 From: mark.johnston at pnl.gov (Johnston, Mark) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: win32 services Message-ID: <228C5EBB26701542946C14D5205AE6D512F318@pnlmse08.pnl.gov> Skipped content of type multipart/alternative From tim at consultix-inc.com Thu Jul 19 01:31:07 2001 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Perl Work at Amazon.Com Message-ID: <20010718233107.B30411@timji.consultix.wa.com> I'm hiring for a software development position at Amazon.com (www.amazon.com) in downtown Seattle. This is a permanent full-time position, and while you can work from home sometimes, it can't be long-term telecommuting. Please contact me (the hiring manager) directly at binde@amazon.com if you're interested or if I can answer any more questions for you. It's a team of four (this position is the fifth, I count as a part of a sixth), with development cycles of several days to several months (or in one case, years.) Here's the URL to the details (also included below): http://www.amazon.com/exec/obidos/tg/stores/static/-/jobs/department/Seattle-Headquarters/012/104-6602250-4495140#01-0006841 Job title: UNIX Tools Software Development Engineer Description: Do you like to write tools that solve challenging scaling and automation problems? Are you drawn to projects that leverage your expertise in C/C++ and perl development, architecture and design skills, business acumen, and understanding of UNIX? We are looking for people with a passion for creating widely deployed tools to solve such problems (and for discovering these problems in the first place.) The ideal candidate has thorough knowledge of and 3+ years experience with C/C++, perl, and object-oriented design. Undergraduate or graduate degree in computer science or equivalent experience required; BSCS or MSCS highly desired. Knowledge of UNIX, object-oriented design, algorithms, data structures, the ability to work on a team or independently, define project technical requirements, work with technical and non-technical users, set appropriate project schedules, and produce robust, supportable software with comprehensive, usable documentation is a must. Experience working with existing code, GUI development, security, LDAP, SQL, systems administration (UNIX or NT), creating client/server applications, and designing large scalable internal systems is a plus, as is previous experience in a multi-platform development environment. Compensation includes stock options. -- Melissa Binde binde@amazon.com Manager, Infrastructure Tools - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From johnl at meer.net Fri Jul 20 13:31:46 2001 From: johnl at meer.net (John Labovitz) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: [off-topic] Seattle Adobe Protest -- Free Dmitry Sklyarov Message-ID: <20010720183146.DYKK7910.femail11.sdc1.sfba.home.com@localhost> (Apologies for the non-Perl content; I'll keep this short.) "Join programmers and freedom lovers around the world in protesting the arrest of Russian software engineer Dmitry Sklyarov." (EFF) Protest this Monday in Fremont from 11am-1pm. More information (including a temporarily mailing list) is here: http://woozle.org/~neale/sklyarov/ john - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From mcglk at artlogix.com Fri Jul 20 16:05:28 2001 From: mcglk at artlogix.com (Ken McGlothlen) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: [off-topic] Seattle Adobe Protest -- Free Dmitry Sklyarov In-Reply-To: <20010720183146.DYKK7910.femail11.sdc1.sfba.home.com@localhost> References: <20010720183146.DYKK7910.femail11.sdc1.sfba.home.com@localhost> Message-ID: <87ofqfwbtz.fsf@ralf.artlogix.com> John Labovitz writes: | Protest this Monday in Fremont from 11am-1pm. More information (including a | temporarily mailing list) is here: | | http://woozle.org/~neale/sklyarov/ The protest has been put on hold. http://slashdot.org/article.pl?sid=01/07/20/2045220&mode=thread - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From Ryan.Parr at wwireless.com Sun Jul 22 16:31:22 2001 From: Ryan.Parr at wwireless.com (Parr, Ryan) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Matching HTML Meta Tags Message-ID: <6D6F0541E2B1D411A75B0002A513016D027FFFB8@wacorpml03.wwireless.com> I'm sure I'm missing something very easy, but any help would be appreciated in this matter. I'm trying to document the html files of my site with meta tags (name="keywords",name="description"). Unfortunately I don't seem to be able to pull out the content portion of the meta tag. For example $file = < Untitled Page ...lots of html here... EOF Now, if I run the following pattern match: $file =~ m//sig; It matches everything up to the last double quote in the file content, as though I had left out the non-greedy quantifier. However, $file =~ m/\s*(.*)?\s*<\/title>/sig; properly matches just the title. Like I said, I'm sure I'm missing something easy, but I'm definately missing it completely. Any ideas? -- Ryan Parr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From Ryan.Parr at wwireless.com Sun Jul 22 19:15:54 2001 From: Ryan.Parr at wwireless.com (Parr, Ryan) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Matching HTML Meta Tags Message-ID: <6D6F0541E2B1D411A75B0002A513016D027FFFBA@wacorpml03.wwireless.com> Well, I've gotten it to work: doesn't work: $file =~ /<meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*)?"\s*>/sig; does work: $file =~ /<\s*meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*?)"\s*>/sig; I think this is pretty bizzare though. Is there anyone who could tell me why I need to match 0 or more whitespace character after < and before >? -- Ryan Parr -----Original Message----- From: Parr, Ryan [mailto:Ryan.Parr@wwireless.com] Sent: Sunday, July 22, 2001 2:31 PM To: 'spug-list@pm.org' Subject: SPUG: Matching HTML Meta Tags I'm sure I'm missing something very easy, but any help would be appreciated in this matter. I'm trying to document the html files of my site with meta tags (name="keywords",name="description"). Unfortunately I don't seem to be able to pull out the content portion of the meta tag. For example $file = <<EOF; <html> <head> <title>Untitled Page ...lots of html here... EOF Now, if I run the following pattern match: $file =~ m//sig; It matches everything up to the last double quote in the file content, as though I had left out the non-greedy quantifier. However, $file =~ m/\s*(.*)?\s*<\/title>/sig; properly matches just the title. Like I said, I'm sure I'm missing something easy, but I'm definately missing it completely. Any ideas? -- Ryan Parr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From jope-spug at jope.net Mon Jul 23 01:51:59 2001 From: jope-spug at jope.net (El JoPe Magnifico) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Matching HTML Meta Tags In-Reply-To: <6D6F0541E2B1D411A75B0002A513016D027FFFBA@wacorpml03.wwireless.com> Message-ID: <Pine.LNX.4.31.0107222342210.23408-100000@caliban.jope.net> On Sun, 22 Jul 2001, Parr, Ryan wrote: > doesn't work: $file =~ > /<meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*)?"\s*>/sig; > does work: $file =~ > /<\s*meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*?)"\s*>/sig; > > I think this is pretty bizzare though. Is there anyone who could tell me > why I need to match 0 or more whitespace character after < and before >? That wasn't what made the difference. Near the end of your pattern, you switched from "(.*)?" to "(.*?)" -- the position of the question mark changes its use as a modifier. (.*)? is zero or one "greedy" matches, whereas (.*?) is a single non-greedy match. If it's not clear from that quick explanation, just ask... -jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From didderon at home.com Mon Jul 23 02:09:22 2001 From: didderon at home.com (Ron Didderon) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Matching HTML Meta Tags In-Reply-To: <Pine.LNX.4.31.0107222342210.23408-100000@caliban.jope.net> Message-ID: <JDEMJECDMBKJEAFBLMMKGEBNCAAA.didderon@home.com> No, that makes perfect sense. Thank you for clearing that up. -- Ryan -----Original Message----- From: owner-spug-list@pm.org [mailto:owner-spug-list@pm.org]On Behalf Of El JoPe Magnifico Sent: Sunday, July 22, 2001 11:52 PM To: Parr, Ryan Cc: 'spug-list@pm.org' Subject: RE: SPUG: Matching HTML Meta Tags On Sun, 22 Jul 2001, Parr, Ryan wrote: > doesn't work: $file =~ > /<meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*)?"\s*>/sig; > does work: $file =~ > /<\s*meta\s+name\s*=\s*"keywords"\s+content\s*=\s*"(.*?)"\s*>/sig; > > I think this is pretty bizzare though. Is there anyone who could tell me > why I need to match 0 or more whitespace character after < and before >? That wasn't what made the difference. Near the end of your pattern, you switched from "(.*)?" to "(.*?)" -- the position of the question mark changes its use as a modifier. (.*)? is zero or one "greedy" matches, whereas (.*?) is a single non-greedy match. If it's not clear from that quick explanation, just ask... -jp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From ili at cardomain.com Thu Jul 26 14:24:07 2001 From: ili at cardomain.com (Ian Li) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system Message-ID: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> Hi, I'm trying to separate my HTML and Perl code and I am trying to find a templating system that is most suitable for me. I'm creating my web site in the University of Washington servers which does not have mod_perl, so I'm concerned about speed. Right now, I'm considering HTML::Template, Text::Template, Template Toolkit. HTML::Template sounds like a good choice for me, but I can't include files into them. I like Template Toolkit because it works kinda like Server Side Includes, in terms of being able to include other files into one file. But I am concerned about Template Toolkit's speed. What do you Spugsters think? I'll appreciate any response. Thanks. Ian Anthony Li -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20010726/b23771d1/attachment.htm From jimfl at colltech.com Thu Jul 26 15:14:50 2001 From: jimfl at colltech.com (Jim Flanagan) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system In-Reply-To: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> Message-ID: <11724082.3205142090@[192.168.1.101]> --Also Sprache Ian Li <ili@cardomain.com> On Thursday, July 26, 2001 12:24 PM -0700: > Right now, I'm considering HTML::Template, Text::Template, Template > Toolkit. HTML::Template sounds like a good choice for me, but I > can't include files into them. I like Template Toolkit because it > works kinda like Server Side Includes, in terms of being able to > include other files into one file. But I am concerned about Template > Toolkit's speed. Actually, there are two ways to include other files using Text::Template. Here are a couple of examples: <H3> Included File Below</H3> {qx{cat filename}} and <PRE> {Text::Template::_load_text('.bashrc')} </PRE> you can make an alias in the package you use to store variables for the template called 'include', then it just looks like: {include('my_file')} The man page shows how to do this. Text::Template seems to have adequate speed in a CGI setting, but my applications if Text::Template have been pretty small scale. -- Jim Flanagan Collective Technologies jimfl@colltech.com http://www.colltech.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From kenslinux at home.com Thu Jul 26 15:22:56 2001 From: kenslinux at home.com (Ken Clarke) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Re: Template system References: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> Message-ID: <015001c11610$c2362260$94c54618@gv.shawcable.net> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: TryThis.zip Type: application/octet-stream Size: 2332 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20010726/3c76058b/TryThis.obj From bjturner at mac.com Thu Jul 26 16:06:16 2001 From: bjturner at mac.com (Benjamin John Turner) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system In-Reply-To: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> References: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> Message-ID: <p05101001b78634e089a2@[204.71.197.214]> At 12:24 PM -0700 7/26/2001, Ian Li wrote: >Right now, I'm considering HTML::Template, Text::Template, Template >Toolkit. HTML::Template sounds like a good choice for me, but I >can't include files into them. I like Template Toolkit because it >works kinda like Server Side Includes, in terms of being able to >include other files into one file. But I am concerned about Template >Toolkit's speed. Personally, I'm fond of HTML::Mason, but that might be too heavy for you, considering you don't have mod_perl avilable. I also follow HTML::Template development and I'm not sure what you mean when you say you can't include files. There is a TMPL_INCLUDE tag used by HTML::Template to insert another file into the current one. The only catch is that any variables to be used in the included file actually have to be set up by the script that's calling the file that's doing the TMPL_INCLUDE. Is this what you mean when you say you can't include files into them? I've never benchmarked Template Toolkit, but I can tell you that HTML::Template is very fast and works quite well in a non-mod_perl environment. Benjamin Turner -- Benjamin John Turner | bjturner@bigfoot.com http://www.usfca.edu/turner/ | bjturner@whowhere.com "The happiest of people don't necessarily have the best of everything; they just make the most of everything that comes along their way." - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From andy at n2h2.com Thu Jul 26 17:44:27 2001 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system In-Reply-To: <001801c11608$8a548970$7601a8c0@intra.cardomain.com> Message-ID: <Pine.LNX.4.21.0107261539340.22865-100000@tempest.pd.n2h2.com> On Jul 26, 2001 @ 12:24pm, Ian Li wrote: > I'm trying to separate my HTML and Perl code and I am trying to find a > templating system that is most suitable for me. I'm creating my web > site in the University of Washington servers which does not have > mod_perl, so I'm concerned about speed. Have a look at CGI::FastTemplate. It is geared toward files and performs recursive symbol substitution. Speed will be at the mercy of the host OS if included files are going to be pulled in (without something like Apache::Registry). But then speed should be the last thing to worry about, eh? -- Andrew B. Sweger <andy@n2h2.com> | N2H2, Incorporated | 900 Fourth Avenue, Suite 3600 Product Development | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1556 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From mwallend at ch2m.com Thu Jul 26 18:45:24 2001 From: mwallend at ch2m.com (Wallendahl, Michael/SEA) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system Message-ID: <9DFA13DFD354D311A36A00508B0CAF2B033CFAA9@merlin.ch2m.com> Spug: I understand the concept of wanting to seperate HTML and Perl code and how that could be good. When would I want to use a "templating system" and when would I want to go with PHP or ASP? I guess PHP/ASP are different scripting languages, so if I wanted to stay completely Perl, then I would use a templating system. Correct? Did I just answer my own question or just confuse myself more? :) -Mike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From tuck at whistlingfish.net Thu Jul 26 22:35:59 2001 From: tuck at whistlingfish.net (Matt Tucker) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system In-Reply-To: <9DFA13DFD354D311A36A00508B0CAF2B033CFAA9@merlin.ch2m.com> References: <9DFA13DFD354D311A36A00508B0CAF2B033CFAA9@merlin.ch2m.com> Message-ID: <123410000.996204959@flashingchance> -- "Wallendahl, Michael/SEA" <mwallend@ch2m.com> spake thusly: > I understand the concept of wanting to seperate HTML and Perl code > and how that could be good. > > When would I want to use a "templating system" and when would I want > to go with PHP or ASP? > > I guess PHP/ASP are different scripting languages, so if I wanted to > stay completely Perl, then I would use a templating system. Correct? While I've never made extensive use of either, I've always felt that the trouble with either of those proposed solutions is that they totally fail to acheive the stated goal: separating logic from presentation. With PHP and ASP, the situation is the opposite of Perl; instead of burying the HTML in the code, you bury the code in the HTML. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20010726/e3150c02/attachment.bin From harding.a at portseattle.org Fri Jul 27 11:52:57 2001 From: harding.a at portseattle.org (Harding, Alyssa) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system Message-ID: <EC42DF6EACA6D311A65B00805FA7C0C4063C7BD5@NTP6906> -----Original Message----- From: Wallendahl, Michael/SEA [mailto:mwallend@ch2m.com] Sent: Thursday, July 26, 2001 4:45 PM To: spug-list@pm.org Subject: RE: SPUG: Template system Spug: I understand the concept of wanting to seperate HTML and Perl code and how that could be good. When would I want to use a "templating system" and when would I want to go with PHP or ASP? I guess PHP/ASP are different scripting languages, so if I wanted to stay completely Perl, then I would use a templating system. Correct? Did I just answer my own question or just confuse myself more? :) -Mike ------- Historically, I have been of a mind to separate my HTML from my code. Lately, I have come to realize that there are different situations which call for different things. In a web production environment, or in any environment where you a.) don't want people who only fiddle with HTML to be worrying themselves over your perl ("...but I only took out all those silly dollar signs...") or b.) don't want to end up making HTML changes yourself ("make it say this... no, make it say that... no, you forgot a comma there...") separation is A Good Thing. On the other hand... PHP, JSP and even *shudder* ASP can be good in an environment where you're the only one (or one of many with the same skills) who will be maintaining the code. Or, where you want one file to maintain that does everything (instead of many with a template system). But, as you say, it's not Perl. I think it all comes down to your project. :) A. -- Alyssa Harding UNIX System Administrator Port of Seattle - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ From benwa at mail.ocentrix.com Fri Jul 27 12:08:58 2001 From: benwa at mail.ocentrix.com (Ben Burnett) Date: Wed Aug 4 00:08:10 2004 Subject: SPUG: Template system Message-ID: <200107271708.f6RH8wn18969@mail.ocentrix.net> ------- Original Copy ------- >Subject: RE: SPUG: Template system >Date: 07/26/2001 5:45 PM >From: "Wallendahl, Michael/SEA" <mwallend@ch2m.com> >To: spug-list@pm.org >Spug: > >I understand the concept of wanting to seperate HTML and Perl code and how >that could be good. > >When would I want to use a "templating system" I use a templating system when I'm working in a rigidly defined development heirarchy. Programmers write cgi-code, designers write html, and administrators run the servers. Templating systems let eacy do their job without stepping on the others' toes... as much. >and when would I want to go with PHP or ASP? I like PHP for rapid development of code that will only server one particular purpose in an evironment where I'm the only one that's going to have input into the code and design. Anything I've written in php has been for proof of concept. Before it went into production it was re-written using a homegrown templating system. >I guess PHP/ASP are different scripting languages, so if I wanted to stay completely Perl, then I would use a templating system. Correct? You could use EMB Perl, but I have no experience with it. >Did I just answer my own question or just confuse myself more? :) I think perhaps you asked a confusing question with an unclear answer. IMHO the differences between using a templating system for code/presentation seperation, or an embedding system for combination can be largely philosophical. - Ben - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/