From vince.skahan at boeing.com Thu May 1 11:36:54 2003 From: vince.skahan at boeing.com (Skahan, Vince) Date: Mon Aug 2 21:36:56 2004 Subject: SPUG:Object property question Message-ID: <1C16569DFF0D3D4699EFA6C64D37DAE0013EF6E9@xch-nw-07.nw.nos.boeing.com> I did a project a number of years ago where all that was necessary was to follow the example at p298 in the perl5 (blue) camel book on Method Autoloading. http://www.usenix.org/publications/library/proceedings/lisa99/skahan.html The basic idea was to have a class that looked like the characteristics of a majordomo mailing list from the administrative side (list name, description, moderators, etc.) but the idea's the same. -- ---------- Vince.Skahan@boeing.com --------- Connexion by Boeing - Cabin Network -----Original Message----- From: Jeremy Kahn [mailto:kahn@cpan.org] Sent: Wednesday, April 30, 2003 7:31 PM To: Jay@scherrer.com Cc: Dan Ebert; Seattle Perl Users Subject: Re: SPUG:Object property question Jay, Dan -- don't forget that you want to build for the future. You may want to subclass Member someday (temporary members, super-members, moderators, whatever). Jay Scherrer wrote: >I would do something like: >package Member; >sub new >{ >my $this = {}; > bless $this; > return $this; >} > I would rather do it like this: package Member; # take the type as an argument, so that this method can be inherited. # this can be more compact, but it works and is clearer sub new { my $class = shift; # $class will be 'Member' (but *not* when you subclass it) my $instance = bless ({}, $class); $instance->init(@_); # any remaining arguments should be passed to init return $instance; } >sub init_newMember >{ >my $this = shift; >$this{id} = shift; >$this{FirstName} = shift; >$this{LastName} = shift; >} > > rather: # we know it's a Member now, but this method might be used for a subclass # too, so let's just call the method 'init' sub init { my $self = shift; my ($id, $fn, $ln) = @_; $self->{'Member_id'} = $id; $self->{'Member_firstname'} = $fn; $self->{'Member_lastname'} = $ln; } >1; > > Yup. >Then in your script: >$member = Member::new(); > >$id = 0; >$firstName = "John"; >$lastName = "Doe"; >$member->Member::init_newMember($id, $firstName, $lastName); > > No! This method of calling new() can't be inherited -- you're naming the package explicitly, but you'd like to leave yourself the option to re-implement Member so that it borrows a 'new' method from some *other* parent, someday (this is called "refactoring" and is very hip :-/). Furthermore, with the new() as I suggested (calling the init() method from within itself) you can pass the arguments right in: my ($id, $fn, $ln) = (0, 'John', 'Doe'); $member = Member->new($id, $fn, $ln); # isn't that pretty? $member is all done and ready to be used; no need for a second call. The key to the object->method() syntax is to remember that when a method is called like this, it passes the object as an implicit first argument (it's unshifted onto @_). This applies even when it's a literal (like a classname) which is why we get away with Member->new(@args): the method Member::new is called with the argument list ('Member', @args). Note also that if Member::new isn't found, then it checks to see if @Member::ISA has any entries; if it does, it searches those ancestor classes recursively. This is all *very* powerful, and kinda hacked together. I strongly recommend The Damian's book "Object Oriented Perl" -- the first five or six chapters are a great introduction to this subject. >On Wednesday 30 April 2003 03:24 pm, Dan Ebert wrote: > > >>The Setup: >> >>I'm working on a module to manage a membership database. I have it set >>up so that there is a Member object with properties you can access like >> >>my $firstname = $member->firstname(); >> >>and change with >> >>$member->firstname('new first name'); >> >>etc. >> >>when a new member is created: >> >>$member->initialize(firstname => 'John', >> lastname => 'Doe'); >>$member->create(); >> >>I insert the data into a table and get the member ID from an >>auto-incrementing field. >> >>The Question: >> >>I want to set a new property of the Member object (the ID). So that you >>can retrieve the ID with >> >>$id = $member->id(); >> >>In my module I tried: >> >>$member->{id} = $id >> >>but that didn't work. >> >>The only thing I've gotten to work is to return the object ... so that >>you call the create method like this: >> >>$member = $member->create(); >> >>which seems a little awkward. >> >>Is there a better way? >> >> > >_____________________________________________________________ >Seattle Perl Users Group Mailing List >POST TO: spug-list@mail.pm.org >ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list >MEETINGS: 3rd Tuesdays, U-District, Seattle WA >WEB PAGE: www.seattleperl.org > > > _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org From MichaelRunningWolf at att.net Thu May 1 12:48:11 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:56 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: <20030430213415.GF11329@sharkey.dilex.net> References: <20030430213415.GF11329@sharkey.dilex.net> Message-ID: Andrew Wyllie writes: > Hi all, > > I'm wondering if anybody could recommend any recruiters/headhunters > that focus on positions that are for Open Source > architects/programmers/sys admins (esp. perl, mysql, postgres, > mod_perl). If so, could you post it here for all to see? -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Thu May 1 12:56:09 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Good PDX Hotel for OSCON? In-Reply-To: References: Message-ID: Mark Allyn writes: > If you are really on the cheap, and you don't mind sharing with > others, Portland has two AYH Hostels. Both of them are located well > within good bus access to downtown where the con is located. Thanks for bringing it up. I had stayed at the AYH Hostel in San Diego the previous 2 years. I count as one of my sucesses that I got the doorman to drive me there each year. He didn't need to know that I was sleeping at the AYH, he only knew that he was providing great service to a conferee. We had a great chat the first year; we remembered each other the second year. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From DFDahlke at shieldsbag.com Thu May 1 19:08:07 2003 From: DFDahlke at shieldsbag.com (Dahlke, Doug) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Curses add on problem Message-ID: Help please, I'm new to the list. I've been using Perl for 8 years, but at my age I tend to forget a thing or two now and then. I still develop for perl under Unix but have a littke TkPerl under my belt. The Cdk or Curses Development Kit gives Curses pretty much all the toys that a regular X or M$ window has. At least it is supposed to have list boxes, etc. I installed the C version of the cdk library. Believe me the c-code is ugly to test this.. I tried, but being on SCO Unixware 7.1 makes compiling code a bit of a pain. I then followed the Solaris notes for adding the Cdk package to perl.. I did the standard packing install from CPAN and in trying to run the fulldemo/cdktest I get the following error message. Can't load '/usr/local/lib/perl5/site_perl/5.005/i386-svr5/auto/Cdk/Cdk.so' for module Cdk: dynamic linker: /usr/bin/perl: relocation error: symbol not found: acs32map; referenced from: /usr/local/lib/perl5/site_perl/5.005/i386-svr5/auto/Cd k/Cdk.so at /usr/local/lib/perl5/5.00502/i386-svr5/DynaLoader.pm line 168. at ./cdkdemo line 11 BEGIN failed--compilation aborted at ./cdkdemo line 11. I've seen this before and don't remember how I fixed it. I do remember I was working on a module at the time. Has anybody out there ran into this? Here is the info on my perl. Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: Platform: osname=svr5, osvers=uw7, archname=i386-svr5 uname='unixware scoot 5 7 i386 x86at sco unix_svr5 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='/bin/cc', optimize='-g', gccversion= cppflags='-I/usr/include -I/usr/ucbinclude -I/usr/local/include' ccflags ='-I/usr/include -I/usr/ucbinclude -I/usr/local/include' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=y, prototype=define Linker and Libraries: ld='/bin/cc', ldflags ='-L/usr/ccs/lib -L/usr/ucblib -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib /usr/ucblib libs=-lsocket -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lucb -lx libc=, so=so, useshrplib=true, libperl=libperl.so.5.52 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/ccs/lib -L/usr/ucblib -L/usr/local/ lib' Characteristics of this binary (from libperl): Built under svr5 Compiled at Nov 30 1998 14:15:54 %ENV: PERL_READLINE_NOWARN="" @INC: /usr/local/lib/perl5/5.00502/i386-svr5 /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/i386-svr5 /usr/local/lib/perl5/site_perl/5.005 . Tim told me there were a bunch of perlers over there and he was sure one of you could help. I've also looked at Curses::Forms, but this looks a bit more robust in toys you can use.. Any help would be greatly appreciated. If anyone needs DBI help, I'd be glad to help anytime. Thanks, Doug Dahlke Shields Bag & Printing Yakima From MichaelRunningWolf at att.net Fri May 2 01:58:07 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: <3EB086FD.5010006@cpan.org> References: <1051741440.2943.71.camel@algernon.lan.enic.cc> <200304301633.48466.jay@scherrer.com> <3EB086FD.5010006@cpan.org> Message-ID: Jeremy Kahn writes: [...] Just a flourish or two that may (or may not) be interesting to folks, depending on the situation. { my $serial_id = 100_000; sub init_newMember { my $this = shift; $this{FirstName} = shift || ""; $this{LastName} = shift || "" ; $this{id} = shift || $serial_id++; } } Two tricks here: 0 -- reorder the arguments so that a 2-argument call will default the ID to a serially incrementing number starting at 100,000. 1 -- create a "static" variable lexically scoped to the function only. Increment it for each call. Note the "extra" block to protect the variable from outside visibility, but still allow it inside the function, but that it's outside the function so that it gets initialized once and retains its value across calls. (NB -- untested code. Does anyone know if the initialization happens as I expect, or does it require a BEGIN block?) { my $serial_id; BEGIN {$serial_id = 100_000;} sub init_newMember {....} } 2 -- take advantage of the short-circuit 'or' operator to set defaults. [...] > This is all *very* powerful, and kinda hacked together. I strongly > recommend The Damian's book "Object Oriented Perl" -- the first five > or six chapters are a great introduction to this subject. Hear, hear!!!! Michael P.S. Nicely explained, Jeremy. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri May 2 02:10:04 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: References: Message-ID: Sanford Morton writes: [...] > sub new { # constructor ==> changes and prints first name > my $class = shift; > my $self = {}; > $self->_init(@_); NOPE!!!! Can't call a member method on an unblessed reference. Well, you can, but it doesn't do the magic of adding the referent as the first argument as you assume in the code below. But if you reshuffle the code, you could do it. > return bless $self, $class; > } > sub new { my $class = shift; my $self = bless {}, $class; return $self->_init(@_); } [...] > sub _init { # initialization, private > my $self = shift; > $self->{'_firstname'} = $_[0]; > $self->{'_lastname'} = $_[1]; > $self->{'_id'} = ++$lastid; return $self; # A handy trick for chaining as above. > } Golf anyone? sub new{(bless{},shift)->_init(@_);} [[N.B. Untested. Uck. I wouldn't even try to test something like this because I wouldn't even write it. It *is* syntactically correct. I think it's semantically correct.]] -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From smorton at pobox.com Fri May 2 02:39:31 2003 From: smorton at pobox.com (Sanford Morton) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: Message-ID: Yes, you're right of course. To incorporate a constructor init method, which I like, it ought to have been sub new { my $class = shift; my $self = {}; bless $self, $class; $self->_init (@_); return $self; } On 2 May 2003, Michael R. Wolf wrote: > Sanford Morton writes: > > [...] > > > sub new { # constructor ==> changes and prints first name > > my $class = shift; > > my $self = {}; > > $self->_init(@_); > > NOPE!!!! Can't call a member method on an unblessed reference. Well, > you can, but it doesn't do the magic of adding the referent as the > first argument as you assume in the code below. But if you reshuffle > the code, you could do it. > > > return bless $self, $class; > > } > > From spug at ifokr.org Fri May 2 14:06:38 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents Message-ID: <20030502190638.GL10883@ifokr.org> Ok, I should know the answer to this... Is there any way to allow a HERE document delimiter to be indented? Ala if ( blah1 ) { while ( blah2 ) { unless ( blah3 ) { $something = < References: <20030502190638.GL10883@ifokr.org> Message-ID: <20030502122400.A29991@timji.consultix-inc.com> On Fri, May 02, 2003 at 12:06:38PM -0700, Brian Hatch wrote: That's a FAQ, so you can find the answer via "perldoc -tq document". ======================================================= | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White-Camel Award Recipient") | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ======================================================= > > Ok, I should know the answer to this... > > Is there any way to allow a HERE document delimiter to be indented? Ala > > > if ( blah1 ) { > while ( blah2 ) { > unless ( blah3 ) { > $something = < Here's my text > ain't it fun > heeha > EOM > } > } > } > > > Instead of having EOM at position 0 on the line? > > > > > > > -- > Brian Hatch Smith & Wesson: > Systems and The original > Security Engineer Point and Click > http://www.ifokr.org/bri/ device. > > Every message PGP signed -- -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From david.dyck at fluke.com Fri May 2 14:30:06 2003 From: david.dyck at fluke.com (David Dyck) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502190638.GL10883@ifokr.org> References: <20030502190638.GL10883@ifokr.org> Message-ID: On Fri, 2 May 2003 at 12:06 -0700, Brian Hatch wrote: > Is there any way to allow a HERE document delimiter to be indented? Ala > .... > Instead of having EOM at position 0 on the line? The perl FAQ states: But the HERE_TARGET must still be flush against the margin. If you want that indented also, you'll have to quote in the indentation. ($quote = <<' FINIS') =~ s/^\s+//gm; but that isn't quite what you want. There might be some way to do it using source filters, either Filter::Simple or Filter::Util::Call I bet the author of Filter::Simple could whip something up, it he was still funded..... From mathin at mathin.com Fri May 2 14:49:05 2003 From: mathin at mathin.com (Dan Ebert) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502190638.GL10883@ifokr.org> References: <20030502190638.GL10883@ifokr.org> Message-ID: <1051904945.5758.30.camel@algernon.lan.enic.cc> You could use: if ( blah1 ) { while ( blah2 ) { unless ( blah3 ) { $something = qq( Here's my text ain't it fun heeha ); } } } instead of a HERE doc ... I don't like using HERE docs (for that reason, mostly) so I usually do it this way. dan. On Fri, 2003-05-02 at 12:06, Brian Hatch wrote: > Ok, I should know the answer to this... > > Is there any way to allow a HERE document delimiter to be indented? Ala > > > if ( blah1 ) { > while ( blah2 ) { > unless ( blah3 ) { > $something = < Here's my text > ain't it fun > heeha > EOM > } > } > } > > > Instead of having EOM at position 0 on the line? > > > > > > > -- > Brian Hatch Smith & Wesson: > Systems and The original > Security Engineer Point and Click > http://www.ifokr.org/bri/ device. > > Every message PGP signed From tim at consultix-inc.com Fri May 2 15:00:03 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: References: <20030502190638.GL10883@ifokr.org> Message-ID: <20030502130003.A30579@timji.consultix-inc.com> On Fri, May 02, 2003 at 12:30:06PM -0700, David Dyck wrote: > On Fri, 2 May 2003 at 12:06 -0700, Brian Hatch wrote: > but that isn't quite what you want. > > There might be some way to do it using source filters, either > Filter::Simple > or > Filter::Util::Call > > I bet the author of Filter::Simple could whip > something up, it he was still funded..... Actually, we had a short SPUG talk at one time by JP Montagnet, who used source code filtering to solve this exact problem. I've cc'd him on this reply, which might elicit a response from him. -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From jgardn at alumni.washington.edu Fri May 2 15:01:49 2003 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: References: <20030502190638.GL10883@ifokr.org> Message-ID: <200305021301.49204.jgardn@alumni.washington.edu> On Friday 02 May 2003 12:30, David Dyck wrote: > On Fri, 2 May 2003 at 12:06 -0700, Brian Hatch wrote: > > Is there any way to allow a HERE document delimiter to be indented? Ala > > .... > > Instead of having EOM at position 0 on the line? > > The perl FAQ states: > > But the HERE_TARGET must still be flush against > the margin. If you want that indented also, > you'll have to quote in the indentation. > > ($quote = <<' FINIS') =~ s/^\s+//gm; > > but that isn't quite what you want. > > There might be some way to do it using source filters, either > Filter::Simple > or > Filter::Util::Call > I think this can be summed up as "No". ;-) If you are having trouble distinguishing between here docs and code, use a nice text editor that has syntax highlighting that recognizes the difference. This way, your here doc will appear as if it was quoted. I suggest ViM (http://www.vim.org) as it is cross-platform in a very strong sense of the word, and easy to use (but not necessarily easy to *learn*). I know several people who use Emacs and other editors that have the same ability to do syntax highlighting in that way. -- Jonathan Gardner (was jgardn@alumni.washington.edu) Live Free, Use Linux! From spug at ifokr.org Fri May 2 15:15:15 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <200305021301.49204.jgardn@alumni.washington.edu> References: <20030502190638.GL10883@ifokr.org> <200305021301.49204.jgardn@alumni.washington.edu> Message-ID: <20030502201515.GQ10883@ifokr.org> > If you are having trouble distinguishing between here docs and code, use a > nice text editor that has syntax highlighting that recognizes the difference. > This way, your here doc will appear as if it was quoted. But I thought "only perl can parse perl" ;-) I think I'll just stick with qq( ... ) -- I love '%' in vi, and that'll mostly do what I need. -- Brian Hatch "I'm thinking .. pastels!" Systems and Security Engineer http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030502/d37c11ef/attachment.bin From lonnief at pobox.com Fri May 2 16:36:55 2003 From: lonnief at pobox.com (Lonnie Foster) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502190638.GL10883@ifokr.org> References: <20030502190638.GL10883@ifokr.org> Message-ID: <20030502213655.GB20218@neo.dreamhost.com> * Brian Hatch [2003-05-02 12:06 -0700]: > Ok, I should know the answer to this... > > Is there any way to allow a HERE document delimiter to be indented? Ala I just ran across this recently in Perl Cookbook (http://safari.oreilly.com/?XmlId=1-56592-243-3). I don't recall if the specific scenario you describe was addresses, but I do remember at least half a dozen different possible solutions to the problem. The section to look for in the book is "1.11 Indenting Here Documents". -- /|\ Lonnie Foster http://pobox.com/ tribble \|/ Neque porro quisquam est qui dolorem ipsum quia /|\ dolor sit amet, consectetur, adipisci velit. -- Cicero From Marc.M.Adkins at Doorways.org Fri May 2 17:51:42 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502190638.GL10883@ifokr.org> Message-ID: > Ok, I should know the answer to this... > > Is there any way to allow a HERE document delimiter to be indented? Ala > > > if ( blah1 ) { > while ( blah2 ) { > unless ( blah3 ) { > $something = < Here's my text > ain't it fun > heeha > EOM > } > } > } > > > Instead of having EOM at position 0 on the line? I believe the only way to do this is to use Filter::Util::Call or Filter::Simple to pre-process the file during compilation. I thought that I had seen an example of doing this (I remember it as being pretty slick) but I can't find it right now. mma From bill at celestial.com Fri May 2 17:17:01 2003 From: bill at celestial.com (Bill Campbell) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502201515.GQ10883@ifokr.org>; from spug@ifokr.org on Fri, May 02, 2003 at 01:15:15PM -0700 References: <20030502190638.GL10883@ifokr.org> <200305021301.49204.jgardn@alumni.washington.edu> <20030502201515.GQ10883@ifokr.org> Message-ID: <20030502151700.A26422@barryg.mi.celestial.com> On Fri, May 02, 2003 at 01:15:15PM -0700, Brian Hatch wrote: ... >I think I'll just stick with qq( ... ) -- I love '%' in vi, >and that'll mostly do what I need. That's why my shell scripts have funny comments #{ and #} on things like case and if statements (and python's lack of braces and strange treatment of whitespace is why I stick to perl :-). Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ With Congress, every time they make a joke it's a law; and every time they make a law it's a joke. -- Will Rogers From tim at consultix-inc.com Fri May 2 17:33:18 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502151700.A26422@barryg.mi.celestial.com> References: <20030502190638.GL10883@ifokr.org> <200305021301.49204.jgardn@alumni.washington.edu> <20030502201515.GQ10883@ifokr.org> <20030502151700.A26422@barryg.mi.celestial.com> Message-ID: <20030502153318.A31154@timji.consultix-inc.com> On Fri, May 02, 2003 at 03:17:01PM -0700, Bill Campbell wrote: > On Fri, May 02, 2003 at 01:15:15PM -0700, Brian Hatch wrote: > ... > >I think I'll just stick with qq( ... ) -- I love '%' in vi, > >and that'll mostly do what I need. > > That's why my shell scripts have funny comments #{ and #} on things like > case and if statements (and python's lack of braces and strange treatment > of whitespace is why I stick to perl :-). > > Bill Clever! You've turned the "match braces even within comments" bug into a feature! -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From bill at celestial.com Fri May 2 18:11:36 2003 From: bill at celestial.com (Bill Campbell) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502153318.A31154@timji.consultix-inc.com>; from tim@consultix-inc.com on Fri, May 02, 2003 at 03:33:18PM -0700 References: <20030502190638.GL10883@ifokr.org> <200305021301.49204.jgardn@alumni.washington.edu> <20030502201515.GQ10883@ifokr.org> <20030502151700.A26422@barryg.mi.celestial.com> <20030502153318.A31154@timji.consultix-inc.com> Message-ID: <20030502161135.A27166@barryg.mi.celestial.com> On Fri, May 02, 2003 at 03:33:18PM -0700, SPUG-list-owner wrote: >On Fri, May 02, 2003 at 03:17:01PM -0700, Bill Campbell wrote: >> On Fri, May 02, 2003 at 01:15:15PM -0700, Brian Hatch wrote: >> ... >> >I think I'll just stick with qq( ... ) -- I love '%' in vi, >> >and that'll mostly do what I need. >> >> That's why my shell scripts have funny comments #{ and #} on things like >> case and if statements (and python's lack of braces and strange treatment >> of whitespace is why I stick to perl :-). >> >> Bill > >Clever! You've turned the "match braces even within comments" bug >into a feature! Yup! I wish I had the vi editor back when I was writing ALGOL 60 code. Matching ALGOL's BEGIN and END statements was a fair PITA. One of my first text processing programs was a prettyprinter for ALGOL to re-indent programs after changing blocks. Actually vi wouldn't have done any good then since all the programs were entered either from 80 column punch cards or paper tape on ASR-33 TeleTypes at 110baud. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Good luck to all you optimists out there who think Microsoft can deliver 35 million lines of quality code on which you can operate your business.'' -- John C. Dvorak From m3047 at inwa.net Fri May 2 19:24:08 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question Message-ID: Michael Wolf wrote; >Sanford Morton writes: > >[...] > >> sub new { # constructor ==> changes and prints first name >> my $class = shift; >> my $self = {}; >> $self->_init(@_); > >NOPE!!!! Can't call a member method on an unblessed reference. Well, >you can, but it doesn't do the magic of adding the referent as the >first argument as you assume in the code below. But if you reshuffle >the code, you could do it. > >> return bless $self, $class; >> } >> Hi Mike. Isn't the problem that they've peeled the class off? (OK, they didn't bless their mess either, but..) Granted their code won't work, but I think the central question concerns overriding, not poor penmanship. How about.. sub new ($;$$$ ) { return SUPER::new( @_ ); } or... sub new ($;$$$ ) { my $class = shift; return MotherOfAllMesses::new( $class, @_ ); } ???? ?? Works for me. I think, anyway. I've done things like this, recently, even. :-. (It's more interesting when the MOAM takes different params to the default new than the child, so you peel those off and pass them in order, appropriately spiced.) -- Fred m3047@inwa.net From MichaelRunningWolf at att.net Sat May 3 01:48:18 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents In-Reply-To: <20030502190638.GL10883@ifokr.org> References: <20030502190638.GL10883@ifokr.org> Message-ID: Brian Hatch writes: > Ok, I should know the answer to this... > > Is there any way to allow a HERE document delimiter to be indented? Ala In cases like this, I make "THERE documents" like this. # This is a "THERE document". # It's *here*, but it's needed *there*. sub text_blahXXX { return < References: <20030502190638.GL10883@ifokr.org> <200305021301.49204.jgardn@alumni.washington.edu> <20030502201515.GQ10883@ifokr.org> <20030502151700.A26422@barryg.mi.celestial.com> Message-ID: Bill Campbell writes: > On Fri, May 02, 2003 at 01:15:15PM -0700, Brian Hatch wrote: > ... > >I think I'll just stick with qq( ... ) -- I love '%' in vi, > >and that'll mostly do what I need. > > That's why my shell scripts have funny comments #{ and #} on things like > case and if statements Intersting style. I know that I'll *modify* my coding style if the cperl-mode of emacs gets confused (yes, perl *is* the only thing that can parse Perl), but I hadn't thought of *augmenting* my style based on an editor feature. It always amazes me how primates use their tools, even the highly evolved ones. [...] I heard that the Bourne shell, alghough written in (what was then a new language) C, is littered with BEGIN/END pairs because he made extensive use of the C preprocessor #define BEGIN { #define END } Time warp back to the early 70's. Can you say groovy and source filter at the same time? CPP ::== C Pre-Processor Pre-Processor ::== Source Filter -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From moonbeam at catmanor.com Sat May 3 12:13:20 2003 From: moonbeam at catmanor.com (William Julien) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Here documents Message-ID: <200305031713.h43HDKg17016@catmanor.com> > >P.S. It's a technique I created adopted from a practice I had for >shell scripts. In shell scripts, I used stdout in the function >(subroutine) and command substitution in the main body. Note, that >most folks still don't know that $(...) is a better (and newer) syntax >for backticks, `...`, even though it's not so new any more. I like it >because it's easier to see. It also nests better, though I don't tend >to nest them except to bend the brains of students in my class to show >them how beautiful they really can become. Additionally, the dollar >sign becomes "value of" in *two* contexts, makeing them easier to >rember because of the network effect. This may be a bit off topic, but I use the $(...) quite a bit, but mostly as a replacement of the var=`command` syntax. for example: -->date Sat May 3 10:07:09 PDT 2003 -->yesterday=$(TZ=GMT+32;date) -->echo $yesterday Fri May 2 09:07:15 GMT 2003 William From cmeyer at helvella.org Sun May 4 14:18:38 2003 From: cmeyer at helvella.org (Colin Meyer) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: ; from m3047@inwa.net on Fri, May 02, 2003 at 05:24:08PM -0700 References: Message-ID: <20030504121838.A18766@hobart.helvella.org> On Fri, May 02, 2003 at 05:24:08PM -0700, Fred Morris wrote: [...] > How about.. > > sub new ($;$$$ ) { > > return SUPER::new( @_ ); > > } > > or... Note that if you call your constructor in the typical OO fashion: my $obj = ClassName->new(); then the prototype will not apply. From 'perldoc perlsub': Perl supports a very limited kind of compile-time argument checking using function prototyping. ... Method calls are not influenced by prototypes either, because the function to be called is indeterminate at compile time, since the exact code called depends on inheritance. Have fun, -Colin. From m3047 at inwa.net Sun May 4 21:53:20 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question Message-ID: Sure, the prototype is ignored by Perl. But you didn't ignore it, and it probably conveyed the intended meaning: "new is called with something which is not optional (in the case under discussion the class name), and depending on your mess one or more arguments.. of course all arguments are optional to Perl itself, if you want them then you yourself must impress meaning on them." Or dispensing with sophistry: the class is always implicitly passed as the first argument if you call it with the originally given syntax, and the other arguments are whatever you've decided your own method needs. Colin Meyer wrote: >On Fri, May 02, 2003 at 05:24:08PM -0700, Fred Morris wrote: > > >[...] > >> How about.. >> >> sub new ($;$$$ ) { ...........^^^^^^^ He's referring to this. >> >> return SUPER::new( @_ ); >> >> } >> >> or... > >Note that if you call your constructor in the typical OO fashion: > > my $obj = ClassName->new(); > >then the prototype will not apply. But it will work. And the prototype does no harm; and in fact if you call the constructor from within the module directly as a subroutine (for some unknown reason) it will apply. Now that raises an interesting question: if there's a prototype for the MOAM's new(), then given the above syntax is it applied? Ahh yes.. I think intuitively the answer is a resounding "yes", because you're calling it as a subroutine in a different namespace, not as a method.. unless there's some special voodoo about SUPER, of course. So, let's follow the SuSE maxim to have a lotta fun and test it, shall we? With a prototype for MOAM::new( $$ ), and using $class = shift in the subclass: # Fails return SUPER::new( $class, 'x' ); My bad! Peculiarly, I tend to avoid SUPER unless I really mean it, as in: "Is there anybody out there who wants to take a stab at this? Because I really don't have a clue, I'm just hoping." Well ok, not really, but I do recite the "How many OO programmers does it take to change a lightbulb" joke as a mantra at times like these. # Returns 'COAM' instead of 'x' $class->SUPER::new( $class, 'x' ); # Works $class->SUPER::new( 'x' ); Clearly what we're seeing here is that SUPER only works with method calls. (But going all the way back to what started this thread, note that this is a class reference and not a blessed reference... so yes you can call a member method on an unblessed reference... as long as that reference is to the class. Just remember that a class ain't no object!) # Works return MOAM::new( $class, 'x' ); (BTW, this example was also given in my original post, although it wasn't quoted in the reply.) # Fails the prototype return MOAM::new( $class, 'x', 'y', 'z' ); Philosophically, if you prototype constructors, should you be specifying the superclass? In a language with multiple inheritance I tend to say yes; practically speaking, the answer which Perl gives up is unequivocally yes. Philosophically speaking if you use multiple inheritance and you don't prototype your constructors (either in the compiler or the style guide), exactly what sort of outcome are you expecting? In conclusion you can read what's written in perldoc as a complaint about the shortcomings of prototypes, or as a subtle and zen-like observation on the pitfalls of multiple inheritance and cavalier use of SUPER, and suggestion on exactly how to call your superclass constructors; as "they" say TMTOWTDI.. and as I say TAMWTDIR. Now that raises an interesting question: since I'm calling MOAM out by name, what happens if MOAM in turn inherits its constructor from FOAM? Ahh yes.... what do you think happens? Well, it fails. Of course Java just decided to dispense with multiple inheritance entirely, if you want to inherit from multiple classes.. you can't. Now that raises an interesting question: how you do make an object take on the attributes of multiple classes if you can only inherit from one? Ahh yes... Well of course at the end of the day, Perl's prototyping is weak: if you use the $obj->method() syntax, your prototypes aren't checked. But if it's important to check, you can, you only have to use Class::method( $obj ) is all. (How does that joke go? "... None. Invoke the proper method and the lightbulb will change itself.") >Have fun, >-Colin. :-p -- Fred Morris m3047@inwa.net From MichaelRunningWolf at att.net Sun May 4 19:06:51 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: References: Message-ID: Sanford Morton writes: > Yes, you're right of course. To incorporate a constructor init > method, which I like, it ought to have been > > sub new { > my $class = shift; > my $self = {}; > bless $self, $class; > $self->_init (@_); BTW -- I like this as an idiom!!! Separate creation from initialization. > return $self; > } -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Sun May 4 18:56:32 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Best One-Liners and Scripts for UNIX In-Reply-To: <20030420185520.GU12203@ifokr.org> References: <20030416174930.A25359@timji.consultix-inc.com> <20030417034433.GL12203@ifokr.org> <20030417140716.GW12203@ifokr.org> <20030417224240.A30335@timji.consultix-inc.com> <20030418133302.GX12203@ifokr.org> <20030419103713.A3251@timji.consultix-inc.com> <001601c306b1$789589f0$0200a8c0@computer> <20030420110620.A6470@timji.consultix-inc.com> <20030420185520.GU12203@ifokr.org> Message-ID: Brian Hatch writes: [[I'm glad I read Brian's response... He said what I thought. But said it better.... So here's a $vote++ for his sentiments]] [...] > These keep the important things on the left, so as you skim > the code, everything is in the same place. Similarly > > print stuff_to_file if $log_everything_verbosely > > makes more sense - you can see that a print is the stuff we > really want to do, except in rare cases. And as another practical example from my coding style, I often throw in a debugginig statement as I'm developing, Here's the evolution of a typical debugging line. # 1. Fast and dirty scrambling attempt at comprehension print "at XXX with YYY"; # 2. Oh yeah, it should go to STDERR print STDERR "at XXX with YYY"; # 3. That section is debugged, and works. Shut up already. print "at XXX with YYY" if $debug; # 4. Time passes. This is really, really stable code. print "at XXX with YYY" if $debug > 2; To me, the string argument to the 'print' reads as a signpost (almost an assertion) to the poor sucker who has to maintain this code in a few months (especially since it's usually pea-headed me). Oh yeah, ***incidentally***, it gets executed by the computer. But only in specific conditions does it show up as output. Regardless of that logical condition, as a writer I have followed the inverted-triangle shape of any good news story -- the important information goes first so folks can stop reading when they get a good enough idea for their needs. I'll use examples from three of my bi-lingual experiences First, English/Perl English: If desired, use traditional coding style. Perl: if ($desired) { use_style("traditional"); } English: Use alternate coding styles, if desired. Perl: use_style("alternate") if $desired. I like 'em both, most specifically because it maps to the way I think. I think *both* ways, and I code *both* ways. Second, English/Spanish hot water aqua caliente Third, infix/postfix (4+3)/(5-7) 4 3 + 5 7 - / I think that it's better to push the noun on fmy mental stack then modify it with an adjective or operator. My mental stack isn't as deep as it used to be. English and postfix preserve that precious resource. I think that _modern_ programming languages express more about how people thaink than about how computers work, and that optomizing programmer time is more important than optomizing computer time, so I'll close with a quote that I hand out in all my programming classes (Perl, C++, C, shell, Unix). Programs must be written for people to read, and only incidentally for machines to execute. --Abelson and Sussman, authors "Structure and Interpretation of Computer Programs" (a.k.a. "The Wizard Book) MIT Press, 1984. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From wyllie at dilex.net Mon May 5 00:38:11 2003 From: wyllie at dilex.net (Andrew Wyllie) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: References: <20030430213415.GF11329@sharkey.dilex.net> Message-ID: <20030505053811.GM93248@sharkey.dilex.net> On Thu, 01 May 2003, Michael R. Wolf wrote: > Andrew Wyllie writes: > > > Hi all, > > > > I'm wondering if anybody could recommend any recruiters/headhunters > > that focus on positions that are for Open Source > > architects/programmers/sys admins (esp. perl, mysql, postgres, > > mod_perl). > > If so, could you post it here for all to see? I didn't get much of a response on this so I'll ask a related question. Can anyone recommend a good recruiter? thanks andrew > > -- > Michael R. Wolf > All mammals learn by playing! > MichaelRunningWolf@att.net > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > From MichaelRunningWolf at att.net Mon May 5 01:44:30 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > Michael Wolf wrote; > >Sanford Morton writes: > > > >[...] > > > >> sub new { # constructor ==> changes and prints first name > >> my $class = shift; > >> my $self = {}; > >> $self->_init(@_); > > > >NOPE!!!! Can't call a member method on an unblessed reference. Well, > >you can, but it doesn't do the magic of adding the referent as the > >first argument as you assume in the code below. But if you reshuffle > >the code, you could do it. > > > >> return bless $self, $class; > >> } > >> > > Hi Mike. > > Isn't the problem that they've peeled the class off? (OK, they didn't bless > their mess either, but..) Granted their code won't work, but I think the > central question concerns overriding, not poor penmanship. > > How about.. > > sub new ($;$$$ ) { > > return SUPER::new( @_ ); > > } > > or... > > sub new ($;$$$ ) { > > my $class = shift; > > return MotherOfAllMesses::new( $class, @_ ); > > } Yeah, but then it's a function call, not a method. So what, it's just words. Just semantics. I don't have time to find it in the books, so I'll scrape some (possibly faulty bits) out of the wetware. Perhaps its all the same either way -- method or function call. But I foggily remember otherwise. ** What if SUPER::new doesn't exist? I think the @ISA chain doesn't work. ** In fact, I'm not even sure the @ISA chain works unless it's blessed. There's more OO magic about blessing a reference than merely having a method (on an object or on a class) call magically unshift in an argument (referent or class) as a first argument to unshift off into a $this reference or $class scalar. And... good examples. They show, very nicely, what really happens with SUPER and the unshift/shift of $class. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From Marc.M.Adkins at Doorways.org Mon May 5 11:37:58 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: <20030505053811.GM93248@sharkey.dilex.net> Message-ID: > I didn't get much of a response on this so I'll ask a related > question. Can anyone recommend a good recruiter? So far as I know the current ratio of jobs to 'applicants' for a recruiter is on the order of 1:100. Which pretty much means that even a 'good' recruiter is the equivalent of a lottery ticket. On an unrelated but equally telling note, something like 50% recruiting companies listed on the tax rolls two years ago have either gone out of business, changed names, or been bought or merged since then. The shakeout in their business rivals or exceeds the shakeout in ours. mma From creede at penguinsinthenight.com Mon May 5 13:47:16 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: Message-ID: I can second this, having just gone nine months trying to get a job through a couple of recruiters (Volt and Robert Half). There are a LOT of applicants out there, and employers can cherry pick the best ones. In some ways I'm still amazed that I found a job, but in some ways I wasn't. The job was with an outfit I'd worked with before, about 4-5 years ago. I remembered some of the people I interviewed with, and while the technology had changed somewhat, I was still familiar enough with it to sound like I could just jump right into the job. The outfit is Microsoft. The group is the Macintosh Business Unit. So while I'm not exactly working with a paragon of open source development here, I am working with Darwin and the Mac OS -- and Perl. There are some who would probably chastise me for going to work for M$, and in the best of all possible worlds, maybe I'd rather work in more of an open source environment. However, after nine months of wondering if I was ever going to work again and watching the 401K money deplete down to next to nothing, a job here looked pretty good -- especially a job with a group I'd worked with before and enjoyed (and where I didn't really have to do much with Windows except read mail and submit time sheets). Back on topic: Working with a recruiter is still a viable way to get a job. Just don't expect them to be able to create miracles for you. -- Creede On Mon, 5 May 2003, Marc M. Adkins wrote: > > I didn't get much of a response on this so I'll ask a related > > question. Can anyone recommend a good recruiter? > > So far as I know the current ratio of jobs to 'applicants' for a recruiter > is on the order of 1:100. Which pretty much means that even a 'good' > recruiter is the equivalent of a lottery ticket. > > On an unrelated but equally telling note, something like 50% recruiting > companies listed on the tax rolls two years ago have either gone out of > business, changed names, or been bought or merged since then. The shakeout > in their business rivals or exceeds the shakeout in ours. > > mma > From dragon at dreamhaven.org Mon May 5 18:15:46 2003 From: dragon at dreamhaven.org (Mikel Tidwell) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: References: Message-ID: Volt was the only recruiter I ever had any success with, and it was with Microsoft and perl (MSN) as well. They never found me a perm position though, even when the economy was far better than the last year. The job I have now (just over a year) was found on my own. I gave up on recruiting firms and just started doing the hunting directly. I had a lot more positive reactions this way than I ever did with a recruiter. _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ -- Mikel Tidwell President, RPGamer -- http://www.rpgamer.com/ ICQ: 9187899 FireMyst's Lair -- http://dragon.rpgamer.com/ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - On Mon, 5 May 2003, Creede Lambard wrote: -> I can second this, having just gone nine months trying to get a job through a -> couple of recruiters (Volt and Robert Half). There are a LOT of applicants out -> there, and employers can cherry pick the best ones. -> -> In some ways I'm still amazed that I found a job, but in some ways I wasn't. -> The job was with an outfit I'd worked with before, about 4-5 years ago. I -> remembered some of the people I interviewed with, and while the technology -> had changed somewhat, I was still familiar enough with it to sound like I -> could just jump right into the job. -> -> The outfit is Microsoft. The group is the Macintosh Business Unit. So while -> I'm not exactly working with a paragon of open source development here, I am -> working with Darwin and the Mac OS -- and Perl. There are some who would -> probably chastise me for going to work for M$, and in the best of all -> possible worlds, maybe I'd rather work in more of an open source environment. -> However, after nine months of wondering if I was ever going to work again and -> watching the 401K money deplete down to next to nothing, a job here looked -> pretty good -- especially a job with a group I'd worked with before and -> enjoyed (and where I didn't really have to do much with Windows except read -> mail and submit time sheets). -> -> Back on topic: Working with a recruiter is still a viable way to get a job. -> Just don't expect them to be able to create miracles for you. -> -> -- Creede -> -> On Mon, 5 May 2003, Marc M. Adkins wrote: -> -> > > I didn't get much of a response on this so I'll ask a related -> > > question. Can anyone recommend a good recruiter? -> > -> > So far as I know the current ratio of jobs to 'applicants' for a recruiter -> > is on the order of 1:100. Which pretty much means that even a 'good' -> > recruiter is the equivalent of a lottery ticket. -> > -> > On an unrelated but equally telling note, something like 50% recruiting -> > companies listed on the tax rolls two years ago have either gone out of -> > business, changed names, or been bought or merged since then. The shakeout -> > in their business rivals or exceeds the shakeout in ours. -> > -> > mma -> > -> -> -> _____________________________________________________________ -> Seattle Perl Users Group Mailing List -> POST TO: spug-list@mail.pm.org -> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list -> MEETINGS: 3rd Tuesdays, U-District, Seattle WA -> WEB PAGE: www.seattleperl.org -> -> From creede at penguinsinthenight.com Mon May 5 19:06:16 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: Message-ID: I had a friend who got onto a temp job with Robert Half, and they and Volt are the only two agencies that I can really say did anything for me. Hall Kinion is still around, but they never had much success placing me. I can't even remember the names of the other agencies I contacted. As for perm jobs, one of the places Volt placed me at hired me on permanently, but that only lasted about a year. You probably would do better to network and do all the "hidden job market" stuff you're supposed to do if you want to find a permanant job, rather than have a recruiter find one for you. YMMV of course. Mostly I use recruiters because I'm willing to let someone else take a cut of what I could be making in order to place me, rather than to try to market myself -- something I'm not very good and a job best left to professionals, IMO. On Mon, 5 May 2003, Mikel Tidwell wrote: > Volt was the only recruiter I ever had any success with, and it was with > Microsoft and perl (MSN) as well. They never found me a perm position > though, even when the economy was far better than the last year. > > The job I have now (just over a year) was found on my own. I gave up on > recruiting firms and just started doing the hunting directly. I had a lot > more positive reactions this way than I ever did with a recruiter. > -- From m3047 at inwa.net Mon May 5 21:39:00 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question Message-ID: Waaaay too much quoting in this; my apologaeia thus accomplished... Michael Wolf wrote: >m3047@inwa.net (Fred Morris) writes: > >> Michael Wolf wrote; >> >Sanford Morton writes: >> > >> >[...] >> > >> >> sub new { # constructor ==> changes and prints first name >> >> my $class = shift; >> >> my $self = {}; >> >> $self->_init(@_); >> > >> >NOPE!!!! Can't call a member method on an unblessed reference. Well, >> >you can, but it doesn't do the magic of adding the referent as the >> >first argument as you assume in the code below. But if you reshuffle >> >the code, you could do it. >> > >> >> return bless $self, $class; >> >> } >> >> >> >> Hi Mike. >> >> Isn't the problem that they've peeled the class off? (OK, they didn't bless >> their mess either, but..) Granted their code won't work, but I think the >> central question concerns overriding, not poor penmanship. >> >> How about.. >> >> sub new ($;$$$ ) { >> >> return SUPER::new( @_ ); >> >> } >> >> or... >> >> sub new ($;$$$ ) { >> >> my $class = shift; >> >> return MotherOfAllMesses::new( $class, @_ ); >> >> } > >Yeah, but then it's a function call, not a method. So what, it's just >words. Just semantics. > >I don't have time to find it in the books, so I'll scrape some >(possibly faulty bits) out of the wetware. Perhaps its all the same >either way -- method or function call. But I foggily remember >otherwise. > > ** What if SUPER::new doesn't exist? I think the @ISA chain doesn't >work. > > ** In fact, I'm not even sure the @ISA chain works unless it's >blessed. Just in case anybody missed part of this: yes on both counts. In fact, SUPER::foo() doesn't work although $class->SUPER::foo() as well as $obj->SUPER::foo() work.. FSQOW. However good to see I'm not the only wetbrain who made that leap of faith, and specifically: with MOAM::new() the @ISA chain doesn't work, SUPER::new() is a hopeful ephemeron. >There's more OO magic about blessing a reference than merely having a >method (on an object or on a class) call magically unshift in an >argument (referent or class) as a first argument to unshift off into a >$this reference or $class scalar. No, not much more, really. If it's many many lines in the entrails of the source of the Perl beast, that's tragic not heroic. I confess: I take Perl at "Interface Value"... to the extent that I take anything at "interface value"... which is of course taking things at "interface value" since for the most part I restrain myself from taking things apart for the sheer mediaeval joy of doing so. I therefore wish to state that although its behavior is complex, in actuality and for the most part my fiend Perl is well-behaved and exhibits very little personality. (For anybody who's confused, that's a Good Thing.) >And... good examples. They show, very nicely, what really happens with >SUPER and the unshift/shift of $class. (I think he meant the examples in the sequel which was a followup to a post by Colin Meyer...?) >-- >Michael R. Wolf > All mammals learn by playing! > MichaelRunningWolf@att.net > -- FWM m3047@inwa.net From creede at penguinsinthenight.com Tue May 6 09:58:38 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: <200305060630.51478.jgardner@jonathangardner.net> References: <200305060630.51478.jgardner@jonathangardner.net> Message-ID: <1052233117.21842.17.camel@svetlana.penguinsinthenight.com> On Tue, 2003-05-06 at 06:30, Jonathan Gardner wrote: > I've never understood that part about letting a "professional" market you. > Aren't you a professional? I mean, we're not exactly bubble gum or tennis > shoe, we are engineers in a very technical field. hired on a one-on-one > personal basis. Professional writers have agents. Professional athletes have agents. I have no problem with letting an "agent" market me, since I'm a professional programmer, not a professional marketer. I would rather let another professional handle that part of the business so I can do the things I enjoy and am good at. > As far as finding actual jobs go, I've found 2 of my last 3 jobs through SPUG. > I don't completely understand why I've been so successful through SPUG, but I > think it has something to do with Tim's facial hair. > > So here's to hoping Tim never shaves, for then it would be a truly > catastrophic economic event in my life at least! ;-) Tim without facial hair would be . . . well possibly disturbing, but certainly unrecognizable and almost certainly still as funny. :) -- Creede -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/spug-list/attachments/20030506/3f0f7b1f/attachment.bin From andrew at sweger.net Tue May 6 11:58:40 2003 From: andrew at sweger.net (Andrew Sweger) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: Message-ID: I used to think that I am a reasonably intelligent person. But this discussion and big words have left my head spinning. I don't know much about old languages, so I've got questions of which, perhaps, the more learned could enlighten me. On Mon, 5 May 2003, Fred Morris wrote: > Waaaay too much quoting in this; my apologaeia thus accomplished... I couldn't find the word "apologaeia" in any of several on-line references. I'm assuming I can drop the diphthong "ae" and use the word "apologia". Substituting the definition that I found, I get: "my formal written defense of something I believe in strongly thus accomplished..." Am I reading this correctly? > Just in case anybody missed part of this: yes on both counts. In fact, > SUPER::foo() doesn't work although $class->SUPER::foo() as well as > $obj->SUPER::foo() work.. FSQOW. However good to see I'm not the only > wetbrain who made that leap of faith, and specifically: with MOAM::new() > the @ISA chain doesn't work, SUPER::new() is a hopeful ephemeron. Ephemeron: One of the ephemeral flies, on of a group of neuropterous insects belonging to the genus Ephemera and many allied genera, which live in the adult or winged state only for a short time. Is this a new use of ephemeral, like a quanta of ephemeral? > No, not much more, really. If it's many many lines in the entrails of the > source of the Perl beast, that's tragic not heroic. I confess: I take Perl > at "Interface Value"... to the extent that I take anything at "interface > value"... which is of course taking things at "interface value" since for > the most part I restrain myself from taking things apart for the sheer > mediaeval joy of doing so. I therefore wish to state that although its > behavior is complex, in actuality and for the most part my fiend Perl is > well-behaved and exhibits very little personality. (For anybody who's > confused, that's a Good Thing.) Horoscope: You will joyfully disembowel the indistinct, infernal being that is Perl when you let go your inhibitions. Now _that_ would be heroic. (Hey! For those that don't get it [or that would even care what I'm blathering about], I am just trying to inject some humor into what's become a rather heavy discussion. No offense is intended toward anyone. Except maybe myself for shooting my mouth off. Fred's excited posting just made an easy target. We all tend to get excited in the weeks before YAPC::NA and TPC, right?) And for those wondering what the hell FSQOW might possibly mean, acronymfinder.com doesn't know what it is and only *one* single hit is returned by Google: http://members.lycos.co.uk/freephpscripts/hangman.php?letters=FSQOW&n=11 It's a PHP Hangman game in progress. We only have three wrong guesses left, the letters F, S, Q, O, and W have already been used and we are left with: _ _ _ _ _ _ S _ _ O _ _ _ _ _ _ O _ If anyone can solve it, please submit the solution to acronymfinder.com: http://www.acronymfinder.com/add.asp?acronym=FSQOW Thank you. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From Frank.Carroll at wamu.net Tue May 6 12:09:25 2003 From: Frank.Carroll at wamu.net (Carroll, Frank H.) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question Message-ID: <38417F406637E043AB37B94D6587806D6D57E1@exmsea002.us.wamu.net> Andrew, you had me at dipthong. -----Original Message----- From: Andrew Sweger [mailto:andrew@sweger.net] Sent: Tuesday, May 06, 2003 9:59 AM To: Seattle Perl Users Group Subject: Re: SPUG:Object property question I used to think that I am a reasonably intelligent person. But this discussion and big words have left my head spinning. I don't know much about old languages, so I've got questions of which, perhaps, the more learned could enlighten me. On Mon, 5 May 2003, Fred Morris wrote: > Waaaay too much quoting in this; my apologaeia thus accomplished... I couldn't find the word "apologaeia" in any of several on-line references. I'm assuming I can drop the diphthong "ae" and use the word "apologia". Substituting the definition that I found, I get: "my formal written defense of something I believe in strongly thus accomplished..." Am I reading this correctly? > Just in case anybody missed part of this: yes on both counts. In fact, > SUPER::foo() doesn't work although $class->SUPER::foo() as well as > $obj->SUPER::foo() work.. FSQOW. However good to see I'm not the only > wetbrain who made that leap of faith, and specifically: with MOAM::new() > the @ISA chain doesn't work, SUPER::new() is a hopeful ephemeron. Ephemeron: One of the ephemeral flies, on of a group of neuropterous insects belonging to the genus Ephemera and many allied genera, which live in the adult or winged state only for a short time. Is this a new use of ephemeral, like a quanta of ephemeral? > No, not much more, really. If it's many many lines in the entrails of the > source of the Perl beast, that's tragic not heroic. I confess: I take Perl > at "Interface Value"... to the extent that I take anything at "interface > value"... which is of course taking things at "interface value" since for > the most part I restrain myself from taking things apart for the sheer > mediaeval joy of doing so. I therefore wish to state that although its > behavior is complex, in actuality and for the most part my fiend Perl is > well-behaved and exhibits very little personality. (For anybody who's > confused, that's a Good Thing.) Horoscope: You will joyfully disembowel the indistinct, infernal being that is Perl when you let go your inhibitions. Now _that_ would be heroic. (Hey! For those that don't get it [or that would even care what I'm blathering about], I am just trying to inject some humor into what's become a rather heavy discussion. No offense is intended toward anyone. Except maybe myself for shooting my mouth off. Fred's excited posting just made an easy target. We all tend to get excited in the weeks before YAPC::NA and TPC, right?) And for those wondering what the hell FSQOW might possibly mean, acronymfinder.com doesn't know what it is and only *one* single hit is returned by Google: http://members.lycos.co.uk/freephpscripts/hangman.php?letters=FSQOW&n=11 It's a PHP Hangman game in progress. We only have three wrong guesses left, the letters F, S, Q, O, and W have already been used and we are left with: _ _ _ _ _ _ S _ _ O _ _ _ _ _ _ O _ If anyone can solve it, please submit the solution to acronymfinder.com: http://www.acronymfinder.com/add.asp?acronym=FSQOW Thank you. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org From tim at consultix-inc.com Tue May 6 14:10:23 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Job in Legal Area, on Internet Message-ID: <20030506121023.D12208@timji.consultix-inc.com> * required skill-set Company seeks Perl Programmer for development & maintenance of extensive file/text manipulation (regex expression) programs & database programs (DBI). Must have 1-2 yrs experience Perl programming in a Windows-only environment with solid knowledge of regular expressions, advanced data structures & object-oriented Perl. MS SQL experience also required. This is not a CGI Web development position. Salary DOE, competitive benefits. Fax/email resumes to (425) 250-0157, exec@versuslaw.com. * contract or permanent position Permanent position * for contracts, NA * for permanent positions, No stock options incentive plans offered at this time. * for all positions, candidate deals directly with employer * W-2 vs. 1099 status W-2 only * physical location Redmond, WA * telecommuting possible? NO * company's product or service Internet subscription based caselaw research system. http://www.versuslaw.com Contact: smarsh@versuslaw.com From tim at consultix-inc.com Tue May 6 14:29:03 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Shell::POSIX::Select released; need testers! Message-ID: <20030506122903.E12208@timji.consultix-inc.com> SPUGsters, My long awaited module Shell::POSIX::Select has now been released. It's a very full-featured, enhanced version of the select loop of the POSIX shells for Perl, implemented through source filtering. And it works -- at least for me! (details below). Here's an example of what it lets you do, excerpted from the man-page, from a script I use all the time: perl_man.plx Back in the olden days, we only had one Perl man-page. It was voluminous, but at least you knew what argument to give the man command to get the documentaton. Now we have over a hundred Perl man pages, with unpredictable names that are difficult to remember. Here's the program I use that allows me to select the man-page of interest from a menu. use Shell::POSIX::Select ; # Extract man-page names from TOC portion of "perldoc perl" output select $manpage ( sort ( `perldoc perl` =~ /^\s+(perl\w+)\s/mg) ) { system "perldoc '$manpage'" ; } Screen 1) perl5004delta 2) perl5005delta 3) perl561delta 4) perl56delta 5) perl570delta 6) perl571delta . . . Enter number of choice: 6 PERL571DELTA(1) Perl Programmers Reference Guide NAME perl571delta - what's new for perl v5.7.1 DESCRIPTION This document describes differences between the 5.7.0 release and the 5.7.1 release. . . . *************************************************************** Unfortunately, it seems that "make test" is failing for some people, although of course it works perfectly well on the various Linux and Solaris boxes in my collection. 8-{ So I'd appreciate it if some of you could download the module and try to install it, and tell me what happens. It's theoretically possible that the test procedure could report errors and the module still work perfectly well, so if you do see errors, please try to run one of the Scripts/*.plx scripts with appropriate changes made to your PERL5LIB variable, and tell me what happens. (NOTE: Some of those scripts will need arguments to do anything interesting.) -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* -------------- next part -------------- NAME Shell::POSIX::Select - The POSIX Shell's "select" loop for Perl PURPOSE This module implements the "select" loop of the "POSIX" shells (Bash, Korn, and derivatives) for Perl. That loop is unique in two ways: it's by far the friendliest feature of any UNIX shell, and it's the *only* UNIX shell loop that's missing from the Perl language. Until now! What's so great about this loop? It automates the generation of a numbered menu of choices, prompts for a choice, proofreads that choice and complains if it's invalid (at least in this enhanced implementation), and executes a code-block with a variable set to the chosen value. That saves a lot of coding for interactive programs -- especially if the menu consists of many values! The benefit of bringing this loop to Perl is that it obviates the need for future programmers to reinvent the *Choose-From-A-Menu* wheel. SYNOPSIS select [ [ my | local | our ] scalar_var ] ( [LIST] ) { [CODE] } In the above, the enclosing square brackets *(not typed)* identify optional elements, and vertical bars indicate mutually-exclusive choices: The required elements are the keyword "select", the *parentheses*, and the *curly braces*. See "SYNTAX" for details. ELEMENTARY EXAMPLES NOTE: All non-trivial programming examples shown in this document are distributed with this module, in the Scripts directory. "ADDITIONAL EXAMPLES", covering more features, are shown below. ship2me.plx use Shell::POSIX::Select; select $shipper ( 'UPS', 'FedEx' ) { print "\nYou chose: $shipper\n"; last; } ship ($shipper, $ARGV[0]); # prints confirmation message Screen ship2me.plx '42 hemp toothbrushes' # program invocation 1) UPS 2) FedEx Enter number of choice: 2 You chose: FedEx Your order has been processed. Thanks for your business! ship2me2.plx This variation on the preceding example shows how to use a custom menu-heading and interactive prompt. use Shell::POSIX::Select qw($Heading $Prompt); $Heading='Select a Shipper' ; $Prompt='Enter Vendor Number: ' ; select $shipper ( 'UPS', 'FedEx' ) { print "\nYou chose: $shipper\n"; last; } ship ($shipper, $ARGV[0]); # prints confirmation message Screen ship2me2.plx '42 hemp toothbrushes' Select a Shipper 1) UPS 2) FedEx Enter Vendor Number: 2 You chose: FedEx Your order has been processed. Thanks for your business! SYNTAX Loop Structure Supported invocation formats include the following: use Shell::POSIX::Select ; select () { } # Form 0 select () { CODE } # Form 1 select (LIST) { CODE } # Form 2 select $var (LIST) { CODE } # Form 3 select my $var (LIST) { CODE } # Form 4 select our $var (LIST) { CODE } # Form 5 select local $var (LIST) { CODE } # Form 6 If the loop variable is omitted (as in *Forms* *0*, *1* and *2* above), it defaults to $_, "local"ized to the loop's scope. If the LIST is omitted (as in *Forms* *0* and *1*), @ARGV is used by default, unless the loop occurs within a subroutine, in which case @_ is used instead. If CODE is omitted (as in *Form* *0*, it defaults to a statement that prints the loop variable. The cases shown above are merely examples; all reasonable permutations are permitted, including: select $var ( ) { CODE } select local $var (LIST) { } The only form that's *not* allowed is one that specifies the loop-variable's declarator without naming the loop variable, as in: select our () { } # WRONG! Must name variable with declarator! The Loop variable See "SCOPING ISSUES" for full details about the implications of different types of declarations for the loop variable. The $Reply Variable When the interactive user responds to the "select" loop's prompt with a valid input (i.e., a number in the correct range), the variable $Reply is set within the loop to that number. Of course, the actual item selected is usually of great interest than its number in the menu, but there are cases in which access to this number is useful (see "menu_ls.plx" for an example). OVERVIEW This loop is syntactically similar to Perl's "foreach" loop, and functionally related, so we'll describe it in those terms. foreach $var ( LIST ) { CODE } The job of "foreach" is to run one iteration of CODE for each LIST-item, with the current item's value placed in "local"ized $var (or if the variable is missing, "local"ized $_). select $var ( LIST ) { CODE } In contrast, the "select" loop displays a numbered menu of LIST-items on the screen, prompts for (numerical) input, and then runs an iteration with $var being set that number's LIST-item. In other words, "select" is like an interactive, multiple-choice version of a "foreach" loop. And that's cool! What's *not* so cool is that "select" is also the *only* UNIX shell loop that's been left out of the Perl language. *Until now!* This module implements the "select" loop of the Korn and Bash ("POSIX") shells for Perl. It accomplishes this through Filter::Simple's *Source Code Filtering* service, allowing the programmer to blithely proceed as if this control feature existed natively in Perl. The Bash and Korn shells differ slightly in their handling of "select" loops, primarily with respect to the layout of the on-screen menu. This implementation currently follows the Korn shell version most closely (but see "TODO-LIST" for notes on planned enhancements). ENHANCEMENTS Although the shell doesn't allow the loop variable to be omitted, for compliance with Perlish expectations, the "select" loop uses "local"ized $_ by default (as does the native "foreach" loop). See "SYNTAX" for details. The interface and behavior of the Shell versions has been retained where deemed desirable, and sensibly modified along Perlish lines elsewhere. Accordingly, the (primary) default LIST is @ARGV (paralleling the Shell's "$@"), menu prompts can be customized by having the script import and set $Prompt (paralleling the Shell's $PS3), and the user's response to the prompt appears in the variable $Reply (paralleling the Shell's $REPLY), "local"ized to the loop. A deficiency of the shell implementation is the inability of the user to provide a *heading* for each "select" menu. Sure, the shell programmer can echo a heading before the loop is entered and the menu is displayed, but that approach doesn't help when an *Outer loop* is reentered on departure from an *Inner loop*, because the echo preceding the *Outer loop* won't be re-executed. A similar deficiency surrounds the handling of a custom prompt string, and the need to automatically display it on moving from an inner loop to an outer one. To address these deficiencies, this implementation provides the option of having a heading and prompt bound to each "select" loop. See "IMPORTS AND OPTIONS" for details. Headings and prompts are displayed in reverse video on the terminal, if possible, to make them more visually distinct. Some shell versions simply ignore bad input, such as the entry of a number outside the menu's valid range, or alphabetic input. I can't imagine any argument in favor of this behavior being desirable when input is coming from a terminal, so this implementation gives clear warning messages for such cases by default (see "Warnings" for details). After a menu's initial prompt is issued, some shell versions don't show it again unless the user enters an empty line. This is desirable in cases where the menu is sufficiently large as to cause preceding output to scroll off the screen, and undesirable otherwise. Accordingly, an option is provided to enable or disable automatic prompting (see "Prompts"). This implementation always issues a fresh prompt when a terminal user submits EOF as input to a nested "select" loop. In such cases, experience shows it's critical to reissue the menu of the outer loop before accepting any more input. SCOPING ISSUES If the loop variable is named and provided with a *declarator* ("my", "our", or "local"), the variable is scoped within the loop using that type of declaration. But if the variable is named but lacks a declarator, no declaration is applied to the variable. This allows, for example, a variable declared as private *above the loop* to be accessible from within the loop, and beyond it, and one declared as private *for the loop* to be confined to it: select my $loopvar ( ) { } print "$loopvar DOES NOT RETAIN last value from loop here\n"; ------------------------------------------------------------- my $loopvar; select $loopvar ( ) { } print "$loopvar RETAINS last value from loop here\n"; With this design, "select" behaves differently than the native "foreach" loop, which nowadays employs automatic localization. foreach $othervar ( ) { } # variable localized automatically print "$othervar DOES NOT RETAIN last value from loop here\n"; select $othervar ( ) { } # variable in scope, or global print "$othervar RETAINS last value from loop here\n"; This difference in the treatment of variables is intentional, and appropriate. That's because the whole point of "select" is to let the user choose a value from a list, so it's often critically important to be able to see, even outside the loop, the value assigned to the loop variable. In contrast, it's usually considered undesirable and unnecessary for the value of the "foreach" loop's variable to be visible outside the loop, because in most cases it will simply be that of the last element in the list. Of course, in situations where the "foreach"-like behavior of implicit "local"ization is desired, the programmer has the option of declaring the "select" loop's variable as "local". Another deficiency of the Shell versions is that it's difficult for the programmer to differentiate between a "select" loop being exited via "last", versus the loop detecting EOF on input. To correct this situation, the variable $Eof can be imported and checked for a *TRUE* value upon exit from a "select" loop (see "Eof Detection"). IMPORTS AND OPTIONS Syntax use Shell::POSIX::Select ( '$Prompt', # to customize per-menu prompt '$Heading', # to customize per-menu heading '$Eof', # T/F for Eof detection # Variables must come first, then key/value options prompt => 'Enter number of choice:', # or 'whatever:' style => 'Bash', # or 'Korn' warnings => 1, # or 0 debug => 0, # or 1-5 logging => 0, # or 1 testmode => , # or 'make', or 'foreach' ); *NOTE:* The values shown for options are the defaults, except for "testmode", which doesn't have one. Prompts There are two ways to customize the prompt used to solicit choices from "select" menus; through use of the prompt *option*, which applies to all loops, or the $Prompt variable, which can be set independently for each loop. The prompt option The "prompt" option is intended for use in programs that either contain a single "select" loop, or are content to use the same prompt for every loop. It allows a custom interactive prompt to be set in the use statement. The prompt string should not end in a whitespace character, because that doesn't look nice when the prompt is highlighted for display (usually in *reverse video*). To offset the cursor from the prompt's end, *one space* is inserted automatically after display highlighting has been turned off. If the environment variable $ENV{Shell_POSIX_Select_prompt} is present, its value overrides the one in the use statement. The default prompt is "Enter number of choice:". To get the same prompt as provided by the Korn or Bash shell, use "prompt =>> Korn" or "prompt => Bash". The $Prompt variable The programmer may also modify the prompt during execution, which may be desirable with nested loops that require different user instructions. This is accomplished by importing the $Prompt variable, and setting it to the desired prompt string before entering the loop. Note that imported variables have to be listed as the initial arguments to the "use" directive, and properly quoted. See "order.plx" for an example. NOTE: If the program's input channel is not connected to a terminal, prompting is automatically disabled (since there's no point in soliciting input from a *pipe*!). $Heading The programmer has the option of binding a heading to each loop's menu, by importing $Heading and setting it just before entering the associated loop. See "order.plx" for an example. $Eof A common concern with the Shell's "select" loop is distinguishing between cases where a loop ends due to EOF detection, versus the execution of "break" (like Perl's "last"). Although the Shell programmer can check the $REPLY variable to make this distinction, this implementation localizes its version of that variable ($Reply) to the loop, obviating that possibility. Therefore, to make EOF detection as convenient and easy as possible, the programmer may import $Eof and check it for a *TRUE* value after a "select" loop. See "lc_filename.plx" for a programming example. Styles The "style" options *Korn* and *Bash* can be used to request a more Kornish or Bashlike style of behavior. Currently, the only difference is that the former disables, and the latter enables, prompting for every input. A value can be provided for the "style" option using an argument of the form "style => 'Korn'" to the "use" directive. The default setting is "Bash". If the environment variable $ENV{Shell_POSIX_Select_style} is set to "Korn" or "Bash", its value overrides the one provided with the use statement. Warnings The "warnings" option, whose values range from 0 to 1, enables informational messages meant to help the interactive user provide correct inputs. The default setting is 1, which provides warnings about incorrect responses to menu prompts (*non-numeric*, *out of range*, etc.). Level 0 turns these off. If the environment variable $ENV{Shell_POSIX_Select_warnings} is present, its value takes precedence. Logging The "logging" option, whose value ranges from 0 to 1, causes informational messages and source code to be saved in temporary files (primarily for debugging purposes). The default setting is 0, which disables logging. If the environment variable $ENV{Shell_POSIX_Select_logging} is present, its value takes precedence. Debug The "debug" option, whose values range from 0 to 9, enables informational messages to aid in identifying bugs. If the environment variable $ENV{Shell_POSIX_Select_debug} is present, and set to one of the acceptable values, it takes precedence. This option is primarly intended for the author's use, but users who find bugs may want to enable it and email the output to "AUTHOR". But before concluding that the problem is truly a bug in this module, please confirm that the program runs correctly with the option "testmode => foreach" enabled (see "Testmode"). Testmode The "testmode" option, whose values are 'make' and 'foreach', changes the way the program is executed. The 'make' option is used during the module's installation, and causes the program to dump the modified source code and screen display to files, and then stop (rather than interacting with the user). If the environment variable $ENV{Shell_POSIX_Select_testmode} is present, and set to one of the acceptable values, it takes precedence. With the "foreach" option enabled, the program simply translates occurrences of "select" into "foreach", which provides a useful method for checking that the program is syntactically correct before any serious filtering has been applied (which can introduce syntax errors). This works because the two loops, in their *full forms*, have identical syntax. Note that before you use "testmode => foreach", you *must* fill in any missing parts that are required by "foreach". For instance, " select () {}" must be rewritten as follows, to explicitly show "@ARGV" (assuming it's not in a subroutine) and "print": " foreach (@ARGV) { print; }" ADDITIONAL EXAMPLES NOTE: All non-trivial programming examples shown in this document are distributed with this module, in the Scripts directory. See "ELEMENTARY EXAMPLES" for simpler uses of "select". pick_file.plx This program lets the user choose filenames to be sent to the output. It's sort of like an interactive Perl "grep" function, with a live user providing the filtering service. As illustrated below, it could be used with Shell command substitution to provide selected arguments to a command. use Shell::POSIX::Select ( prompt => 'Pick File(s):' , style => 'Korn' # for automatic prompting ); select ( <*> ) { } Screen lp `pick_file`> # Using UNIX-like OS 1) memo1.txt 2) memo2.txt 3) memo3.txt 4) junk1.txt 5) junk2.txt 6) junk3.txt Pick File(s): 4 Pick File(s): 2 Pick File(s): ^D request id is yumpy@guru+587 browse_images.plx Here's a simple yet highly useful script. It displays a menu of all the image files in the current directory, and then displays the chosen ones on-screen using a backgrounded image viewer. It uses Perl's "grep" to filter-out filenames that don't end in the desired extensions. use Shell::POSIX::Select ; $viewer='xv'; # Popular image viewer select ( grep /\.(jpg|gif|tif|png)$/i, <*> ) { system "$viewer $_ &" ; # run viewer in background } perl_man.plx Back in the olden days, we only had one Perl man-page. It was voluminous, but at least you knew what argument to give the man command to get the documentaton. Now we have over a hundred Perl man pages, with unpredictable names that are difficult to remember. Here's the program I use that allows me to select the man-page of interest from a menu. use Shell::POSIX::Select ; # Extract man-page names from the TOC portion of the output of "perldoc perl" select $manpage ( sort ( `perldoc perl` =~ /^\s+(perl\w+)\s/mg) ) { system "perldoc '$manpage'" ; } Screen 1) perl5004delta 2) perl5005delta 3) perl561delta 4) perl56delta 5) perl570delta 6) perl571delta . . . *(This large menu spans multiple screens, but all parts can be accessed using your normal terminal scrolling facility.)* Enter number of choice: 6 PERL571DELTA(1) Perl Programmers Reference Guide NAME perl571delta - what's new for perl v5.7.1 DESCRIPTION This document describes differences between the 5.7.0 release and the 5.7.1 release. . . . pick.plx This more general "pick"-ing program lets the user make selections from *arguments*, if they're present, or else *input*, in the spirit of Perl's "-n" invocation option and "<>" input operator. use Shell::POSIX::Select ; BEGIN { if (@ARGV) { @choices=@ARGV ; } else { # if no args, get choices from input @choices= or die "$0: No data\n"; chomp @choices ; # STDIN already returned EOF, so must reopen # for terminal before menu interaction open STDIN, "/dev/tty" or die "$0: Failed to open STDIN, $!" ; # UNIX example } } select ( @choices ) { } # prints selections to output Sample invocations (UNIX-like system) lp `pick *.txt` # same output as shown for "pick_file" find . -name '*.plx' -print | pick | xargs lp # includes sub-dirs who | awk '{ print $1 }' | # isolate user names pick | # select user names Mail -s 'Promote these people!' boss delete_file.plx In this program, the user selects a filename to be deleted. The outer loop is used to refresh the list, so the file deleted on the previous iteration gets removed from the next menu. The outer loop is *labeled* (as "OUTER"), so that the inner loop can refer to it when necessary. use Shell::POSIX::Select ( '$Eof', # for ^D detection prompt=>'Choose file for deletion:' ) ; OUTER: while ( @files=<*.py> ) { # collect serpentine files select ( @files ) { # prompt for deletions print STDERR "Really delete $_? [y/n]: " ; my $answer = ; # ^D sets $Eof below defined $answer or last OUTER ; # exit on ^D $answer eq "y\n" and unlink and last ; } $Eof and last; } lc_filename.plx This example shows the benefit of importing $Eof, so the outer loop can be exited when the user supplies "^D" to the inner one. Here's how it works. If the rename succeeds in the inner loop, execution of "last" breaks out of the "select" loop; $Eof will then be evaluated as *FALSE*, and the "while" loop will start a new "select" loop, with a (depleted) filename menu. But if the user presses "^D" to the menu prompt, $Eof will test as *TRUE*, triggering the exit from the "while" loop. use Shell::POSIX::Select ( '$Eof' , prompt => 'Enter number (^D to exit):' style => 'Korn' # for automatic prompting ); # Rename selected files from current dir to lowercase while ( @files=<*[A-Z]*> ) { # refreshes select's menu select ( @files ) { # skip fully lower-case names if (rename $_, "\L$_") { last ; } else { warn "$0: rename failed for $_: $!\n"; } } $Eof and last ; # Handle ^D to menu prompt } Screen lc_filename.plx 1) Abe.memo 2) Zeke.memo Enter number (^D to exit): 1 1) Zeke.memo Enter number (^D to exit): ^D order.plx This program sets a custom prompt and heading for each of its two loops, and shows the use of a label on the outer loop. use Shell::POSIX::Select qw($Prompt $Heading); $Heading="\n\nQuantity Menu:"; $Prompt="Choose Quantity:"; OUTER: select my $quantity (1..4) { $Heading="\nSize Menu:" ; $Prompt='Choose Size:' ; select my $size ( qw (L XL) ) { print "You chose $quantity units of size $size\n" ; last OUTER ; # Order is complete } } Screen order.plx Quantity Menu: 1) 1 2) 2 3) 3 4) 4 Choose Quantity: 4 Size Menu: 1) L 2) XL Choose Size: ^D (changed my mind about the quantity) Quantity Menu: 1) 1 2) 2 3) 3 4) 4 Choose Quantity: 2 Size Menu: 1) L 2) XL Choose Size: 2 You chose 2 units of size XL browse_records.plx This program shows how you can implement a "record browser", that builds a menu from the designated field of each record, and then shows the record associated with the selected field. To use a familiar example, we'll browse the UNIX password file by user-name. use Shell::POSIX::Select ( style => 'Korn' ); if (@ARGV != 2 and @ARGV != 3) { die "Usage: $0 fieldnum filename [delimiter]" ; } # Could also use Getopt:* module for option parsing ( $field, $file, $delim) = @ARGV ; if ( ! defined $delim ) { $delim='[\040\t]+' # SP/TAB sequences } $field-- ; # 2->1, 1->0, etc., for 0-based indexing foreach ( `cat "$file"` ) { # field is the key in the hash, value is entire record $f2r{ (split /$delim/, $_)[ $field ] } = $_ ; } # Show specified fields in menu, and display associated records select $record ( sort keys %f2r ) { print "$f2r{$record}\n" ; } Screen browsrec.plx '1' /etc/passwd ':' 1) at 2) bin 3) contix 4) daemon 5) ftp 6) games 7) lp 8) mail 9) man 10) named 11) news 12) nobody 13) pop 14) postfix 15) root 16) spug 17) sshd 18) tim Enter number of choice: 18 tim:x:213:100:Tim Maher:/home/tim:/bin/bash Enter number of choice: ^D menu_ls.plx This program shows a prototype for a menu-oriented front end to a UNIX command, that prompts the user for command-option choices, assembles the requested command, and then runs it. It employs the user's numeric choice, stored in the $Reply variable, to extract from an array the command option associated with each option description. use Shell::POSIX::Select qw($Heading $Prompt $Eof) ; # following avoids used-only once warning my ($type, $format) ; # Would be more Perlish to associate choices with options # via a Hash, but this approach demonstrates $Reply variable @formats = ( 'regular', 'long' ) ; @fmt_opt = ( '', '-l' ) ; @types = ( 'only non-hidden', 'all files' ) ; @typ_opt = ( '', '-a' , ) ; print "** LS-Command Composer **\n\n" ; $Heading="\n**** Style Menu ****" ; $Prompt= "Choose listing style:" ; OUTER: select $format ( @formats ) { $user_format=$fmt_opt[ $Reply - 1 ] ; $Heading="\n**** File Menu ****" ; $Prompt="Choose files to list:" ; select $type ( @types ) { # ^D restarts OUTER $user_type=$typ_opt[ $Reply - 1 ] ; last OUTER ; # leave loops once final choice obtained } } $Eof and exit ; # handle ^D to OUTER # Now construct user's command $command="ls $user_format $user_type" ; # Show command, for educational value warn "\nPress to execute \"$command\"\n" ; # Now wait for input, then run command defined <> or print "\n" and exit ; system $command ; # finally, run the command Screen menu_ls.plx ** LS-Command Composer ** 1) regular 2) long Choose listing format: 2 1) only non-hidden 2) all files Choose files to list: 2 Press to execute "ls -l -a" total 13439 -rw-r--r-- 1 yumpy gurus 1083 Feb 4 15:41 README -rw-rw-r-- 6 yumpy gurus 277 Dec 17 14:36 .exrc.mmkeys -rw-rw-r-- 7 yumpy gurus 285 Jan 16 18:45 .exrc.podkeys $ BUGS UNIX Orientation I've been a UNIX programmer since 1976, and a Linux proponent since 1992, so it's most natural for me to program for those platforms. Accordingly, this early release has some minor features that are only allowed, or perhaps only entirely functional, on UNIX-like systems. I'm open to suggestions on how to implement some of these features in a more portable manner. Some of the programming examples are also UNIX oriented, but it should be easy enough for those specializing on other platforms to make the necessary adapations. 8-} Terminal Display Modes These have been tested under UNIX/Linux, and work as expected, using tput. When time permits, I'll convert to a portable implementation that will support other OSs. Incorrect Line Numbers in Warnings Because this module inserts new source code into your program, Perl messages that reference line numbers will refer to a different source file than you wrote. For this reason, only messages referring to lines before the first "select" loop in your program will be correct. If you're on a UNIX-like system, by enabling the "debugging" and "logging" options (see "Debug" and "Logging"), you can get an on-screen report of the proper offset to apply to interpret the line numbers of the source code that gets dumped to the /tmp/SELECT_source file. Of course, if everything works correctly, you'll have little reason to look at the source. 8-} Comments can Interfere with Filtering Because of the way Filter::Simple works, ostensibly "commented-out" "select" loops like the following can actually break your program: # select (@ARGV) # { ; } select (@ARGV) { ; } A future version of Filter::Simple (or more precisely Text::Balanced, on which on which it depends) may correct this problem. In any case, there's an easy workaround for the commented-out select loop problem; just change *se*lect into *es*lect when you comment it out, and there'll be no problem. For other problems involving troublesome text within comments, see "Failure to Identify select Loops". Failure to Identify "select" Loops When a properly formed "select" loop appears in certain contexts, such as before a line containing certain patterns of dollar signs, it will not be properly identified and translated into standard Perl. The following is such an example: use Shell::POSIX::Select; select (@names) { print ; } # $X$ The failure of the filtering routine to rewrite the loop causes the compiler to throw a fatal error, which prevents the program from running. This is either due to a bug in Filter::Simple, or one of the modules on which it depends. Until this is resolved, you can handle such cases by explicitly turning filtering off before the offending code is encountered, using the no directive: use Shell::POSIX::Select; # filtering ON select (@names) { print ; } no Shell::POSIX::Select; # filtering OFF # $X$ Restrictions on Loop-variable Names Due to a bug in most versions of Text::Balanced, loop-variable names that look like Perl operators, including $m, $a, $s, $y, $tr, $qq, $qw, $qr, and $qx, and possibly others, cause syntax errors. Newer versions of that module (unreleased at the time of this writing) have corrected this problem, so download the latest version if you must use such names. Please Report Bugs! This is a non-trivial program, that does some fairly complex parsing and data munging, so I'm sure there are some latent bugs awaiting your discovery. Please share them with me, by emailing the offending code, and/or the diagnostic messages enabled by the *debug* option setting (see "IMPORTS AND OPTIONS"). TODO-LIST More Shell-like Menus In a future release, there could be options for more accurately emulating Bash and Korn-style behavior, if anybody cares (the main difference is in how the items are ordered in the menus). More Extensive Test Suite More tests are needed, especially for the complex and tricky cases. MODULE DEPENDENCIES File::Spec::Functions Text::Balanced Filter::Simple EXPORTS: Default $Reply This variable is "local"ized to each "select" loop, and provides the menu-number of the most recent valid selection. For an example of its use, see "menu_ls.plx". EXPORTS: Optional $Heading $Prompt $Eof See "IMPORTS AND OPTIONS" for details. SCRIPTS browse_images browse_jpeg browse_records delete_file lc_filename long_listem menu_ls order perl_man pick pick_file AUTHOR Tim Maher Consultix yumpy@cpan.org http://www.teachmeperl.com ACKNOWLEDGEMENTS I probably never would have even attempted to write this module if it weren't for the provision of Filter::Simple by Damian Conway, which I ruthlessly exploited to make a hard job easy. *The Damian* also gave useful tips during the module's development, for which I'm grateful. I *definitely* wouldn't have ever written this module, if I hadn't found myself writing a chapter on *Looping* for my upcoming Manning Publications book, and once again lamenting the fact that the most friendly Shell loop was still missing from Perl. So in a fit of zeal, I vowed to rectify that oversight! I hope you find this module as useful as I do! 8-} For more examples of how this loop can be used in Perl programs, watch for my upcoming book, *Minimal Perl: for Shell Users and Programmers* (see ) in early fall, 2003. SEE ALSO man ksh # on UNIX or UNIX-like systems man bash # on UNIX or UNIX-like systems DON'T SEE ALSO perldoc -f select, which has nothing to do with this module (the names just happen to match up). VERSION This document describes version 0.03. LICENSE Copyright (C) 2002-2003, Timothy F. Maher. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. From MichaelRunningWolf at att.net Tue May 6 20:24:27 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: References: Message-ID: Andrew Sweger writes: > I used to think that I am a reasonably intelligent person. But this > discussion and big words have left my head spinning. I don't know much > about old languages, so I've got questions of which, perhaps, the more > learned could enlighten me. While Andrew's having fun with Fred, I'll take a shot at one of the words that caught my fancy. Michael m3047@inwa.net (Fred Morris) writes: > Waaaay too much quoting in this; my apologaeia thus accomplished... > > Michael Wolf wrote: > >m3047@inwa.net (Fred Morris) writes: > > > >> Michael Wolf wrote; > >> >Sanford Morton writes: [...] > for the most part I restrain myself from taking things apart for the > sheer mediaeval joy of doing so. media-eval ::== a half stack (short stack?) trace on the try block of a throw/catch (even though there's no try/throw/catch, yet....) -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Tue May 6 20:30:17 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Object property question In-Reply-To: <38417F406637E043AB37B94D6587806D6D57E1@exmsea002.us.wamu.net> References: <38417F406637E043AB37B94D6587806D6D57E1@exmsea002.us.wamu.net> Message-ID: "Carroll, Frank H." writes: > Andrew, you had me at dipthong. Is dipthong [sic] self-descriptive? :-) Is self-descriptive self-descriptive? And now for something completely unrelated. A little word play to finish off this thread.... Trivia: Enjoin is its own antonym. Other self-antonyms include fast ("moving quickly; fixed firmly in place") and cleave ("to split; to adhere"). -- Doctor Dictionary ================ diph?thong ( P ) Pronunciation Key (dfth?ng, -thng, dp-) n. A complex speech sound or glide that begins with one vowel and gradually changes to another vowel within the same syllable, as (oi) in boil or () in fine. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Tue May 6 20:33:26 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: References: Message-ID: "Marc M. Adkins" writes: [...] > On an unrelated but equally telling note, something like 50% recruiting > companies listed on the tax rolls two years ago have either gone out of > business, changed names, or been bought or merged since then. The shakeout > in their business rivals or exceeds the shakeout in ours. Do you have *historical* data on the 2 year survival rate of these businesses. 50% could be the 20 year average for this metric. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Tue May 6 20:37:14 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: References: Message-ID: Creede Lambard writes: [...] > The outfit is Microsoft. The group is the Macintosh Business Unit. > So while I'm not exactly working with a paragon of open source > development here, True. HW and SW *both* closed up. > working with Darwin and the Mac OS -- and Perl. There are some who > would probably chastise me for going to work for M$, and in the best > of all possible worlds, maybe I'd rather work in more of an open > source environment. However, after nine months of wondering if I was > ever going to work again and watching the 401K money deplete down to > next to nothing, a job here looked pretty good -- especially a job > with a group I'd worked with before and enjoyed (and where I didn't > really have to do much with Windows except read mail and submit time > sheets). You needen't apologize for working with good people on a good project. In addition, I'll bet the paycheck cashes just fine. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Tue May 6 21:12:21 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Best One-Liners and Scripts for UNIX In-Reply-To: <20030416174930.A25359@timji.consultix-inc.com> References: <20030416174930.A25359@timji.consultix-inc.com> Message-ID: Tim Maher writes: [...] > * 5 Perl One-liners All Unix/Linux Users Should Know > * 3 Perl Scripts UNIX/Linux Users Shouldn't Live Without > * How Perl's Looping Facilities Compare to the Shell's Better late than never. Here's one of my favorite idioms while(<>) { next if /^\s*#/; # skip shell-like comment lines next if /^\s*$/; # skip blank lines # process data here } I often use it as while() { ... } to read in some "magic" data from the DATA filehandle. This has come in very handy in many cases. I love to add whitespace to my data, breaking it into readable paragraphs. And I like to *disable* rather than *remove* the data -- it's so much easier to *enable* it than to *create* it from scratch. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From Marc.M.Adkins at Doorways.org Tue May 6 21:50:12 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: Message-ID: > Do you have *historical* data on the 2 year survival rate of these > businesses. 50% could be the 20 year average for this metric. Nope. This was all off-the-cuff questions. And while it could be the 20 year average, I bet it wasn't the 10 year average over the last decade of the 20th century. mma From tim at consultix-inc.com Tue May 6 23:33:57 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Good PDX Hotel for OSCON? In-Reply-To: <001301c30f5b$4e0e33a0$6501a8c0@platypus> References: <20030430125141.A22234@timji.consultix-inc.com> <001301c30f5b$4e0e33a0$6501a8c0@platypus> Message-ID: <20030506213357.A14271@timji.consultix-inc.com> On Wed, Apr 30, 2003 at 01:58:51PM -0700, Daryn Nakhuda wrote: > Don't know what the rates are for your dates , but usually in the 90-120 > range, very nice, and very close to the marriott, are the hotel lucia, hotel > vintage plaza, and paramount hotel. I've stayed at them all, and would > recommend any of them. Can anybody recommend the 5th Avenue Suites hotel, next to the Vintage Plaza, and run by the same company? (The Kimpton Group). They seem to have the best guaranteed price (i.e., not auction-based), which is $98 with a AAA card plus $20/day credit toward the $22 daily parking fee (800 263-2305) or else a "gas card". I reserved 7/6 for 5 nights just in case I want to stay there, but I'm waiting for Priceline.com to offer some 4-star properties for Portland during the Oscon2003 period, which is the category for the above (currently, only 3-stars are listed.) FWIW, I'll be giving a talk to the Toronto Perl Mongers next Friday, and got a downtown Marriott hotel for US $35 per night, thanks to the SARS scare 8-} -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* > From: "SPUG-list-owner" > To: > Cc: "Tim Maher" > Sent: Wednesday, April 30, 2003 12:51 PM > Subject: SPUG:Good PDX Hotel for OSCON? > > > > > > Can anybody recommend a nice hotel near the OSCON conference hotel? > > I've stayed there (the downtown Portland Marriott) many times in > > recent years for $45-75/night, and don't want to pay the "captive > > audience" rate (of nearly $200 before tax, if memory serves) just > > because I'm attending a conference. I figure I should be able > > to get a very nice one nearby for about $50/night. > > > > Any recommendations? > > > > -Tim > > *------------------------------------------------------------* > > | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | > > | CEO, JAWCAR ("Just Another White Camel Award Recipient") | > > | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | > > *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* > > | Watch for my Book: "Minimal Perl for Shell Programmers" | > > *------------------------------------------------------------* > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list@mail.pm.org > > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > > WEB PAGE: www.seattleperl.org > > > > -- -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From spug at ifokr.org Tue May 6 23:45:41 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Good PDX Hotel for OSCON? In-Reply-To: <20030506213357.A14271@timji.consultix-inc.com> References: <20030430125141.A22234@timji.consultix-inc.com> <001301c30f5b$4e0e33a0$6501a8c0@platypus> <20030506213357.A14271@timji.consultix-inc.com> Message-ID: <20030507044541.GV24625@ifokr.org> > FWIW, I'll be giving a talk to the Toronto Perl Mongers next Friday, > and got a downtown Marriott hotel for US $35 per night, thanks to the > SARS scare 8-} I was in Toronto for the Real World Linux conference last week, and everything seemed just fine to me. Unfortunately for the conference, they'd booked my hotel a long time earlier, and were paying $175/night. If you can get to the baseball stadium, I suggest one of their hotlink dogs - damn, those were tasty. Everything in Toronto was fine as far as I could see. *cough* *cough* -- Brian Hatch Not one shred of Systems and evidence supports Security Engineer the notion that http://www.ifokr.org/bri/ life is serious. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030506/95938276/attachment.bin From MichaelRunningWolf at att.net Wed May 7 00:55:22 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? In-Reply-To: (Marc M. Adkins's message of "Tue, 6 May 2003 19:50:12 -0700") References: Message-ID: "Marc M. Adkins" writes: >> Do you have *historical* data on the 2 year survival rate of these >> businesses. 50% could be the 20 year average for this metric. > > Nope. This was all off-the-cuff questions. And while it could be the 20 > year average, I bet it wasn't the 10 year average over the last decade of > the 20th century. I'd bet so, too. I was wondering what the baseline was because I've heard that the headhunting businesss is one that's already got a high churn, so I was wondering how far it was above that baseline. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From david.ward at philips.com Wed May 7 12:57:59 2003 From: david.ward at philips.com (david.ward@philips.com) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:Open Source Recruiters? Message-ID: >I didn't get much of a response on this so I'll ask a related >question. Can anyone recommend a good recruiter? >thanks >andrew Don't know about open source specific jobs, but I've always had good results from M.B. Sprague & Associates (in Seattle). Max has not only found me good jobs over the years, but gotten me good people when I've been hiring. -Dave From kmeyer at blarg.net Thu May 8 12:31:55 2003 From: kmeyer at blarg.net (Ken Meyer) Date: Mon Aug 2 21:36:57 2004 Subject: SPUG:[SLL] Greater Seattle Linux User's Group Meeting This Saturday, May 10th Message-ID: The Greater Seattle Linux User's Group (GSLUG) meets on the second Saturday of the month, which is this Saturday, May 10th, at North Seattle Community College (NSCC). The meetings begin at 10 AM. As typical, we will have two presentations, a general Q&A session, a "raffle", and then an install/configuration workshop, which may extend as late as 4:00 PM, if activity demands. This month, the presentations will be: =>> Server Clustering and Cluster Filesystems <<= Derek Simkowiak, presenter of the Python Hands-on Tutorial at LinuxFest Northwest 2003 =>> SpamAssassin with ProcMail <<= Doug Kirkland References: http://www.spamassassin.org/ http://www.procmail.org/ The order of the presentations is TBD. Parking IS free at the school on weekends. See the GSLUG website for directions to the meeting and for further information: http://www.gslug.org Meetings have been attracting capacity crowds of 50 to 60 attendees. Arrive early for best seating and to network with some of the best experts, authors and instructors in the west. Those new to Linux are especially welcome. Hope to see you there, Ken Meyer kmeyer@blarg.net for GSLUG From kmeyer at blarg.net Thu May 8 12:31:55 2003 From: kmeyer at blarg.net (Ken Meyer) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:[SLL] Greater Seattle Linux User's Group Meeting This Saturday, May 10th Message-ID: The Greater Seattle Linux User's Group (GSLUG) meets on the second Saturday of the month, which is this Saturday, May 10th, at North Seattle Community College (NSCC). The meetings begin at 10 AM. As typical, we will have two presentations, a general Q&A session, a "raffle", and then an install/configuration workshop, which may extend as late as 4:00 PM, if activity demands. This month, the presentations will be: =>> Server Clustering and Cluster Filesystems <<= Derek Simkowiak, presenter of the Python Hands-on Tutorial at LinuxFest Northwest 2003 =>> SpamAssassin with ProcMail <<= Doug Kirkland References: http://www.spamassassin.org/ http://www.procmail.org/ The order of the presentations is TBD. Parking IS free at the school on weekends. See the GSLUG website for directions to the meeting and for further information: http://www.gslug.org Meetings have been attracting capacity crowds of 50 to 60 attendees. Arrive early for best seating and to network with some of the best experts, authors and instructors in the west. Those new to Linux are especially welcome. Hope to see you there, Ken Meyer kmeyer@blarg.net for GSLUG From alpgaray at yahoo.com Fri May 9 16:10:18 2003 From: alpgaray at yahoo.com (Al Garay) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:checking for newer file on FTP server Message-ID: <20030509211018.45716.qmail@web40020.mail.yahoo.com> Hi, This is my first posting... I'm still a Perl newbie. So, I figure subscribing here will help improve my skills. Trying to check a file on an ftp server to see if it has changed ... is newer ... than a prior download. I can see how to use NET::FTP to connect and get the file. I'm not sure how to do the comparison without first downloading the file ... I can store a MD5 checksum or use the size of file or date to do the comparison. Open to your suggestions, Thanks, Al alpgaray@yahoo.com __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From kahn at cpan.org Fri May 9 17:41:02 2003 From: kahn at cpan.org (Jeremy Kahn) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:checking for newer file on FTP server In-Reply-To: <20030509211018.45716.qmail@web40020.mail.yahoo.com> References: <20030509211018.45716.qmail@web40020.mail.yahoo.com> Message-ID: <3EBC2E7E.201@cpan.org> Al Garay wrote: >I can see how to use NET::FTP to connect and get the >file. I'm not sure how to do the comparison without >first downloading the file ... I can store a MD5 >checksum or use the size of file or date to do the >comparison. > The documentation from Net::FTP (`perldoc Net::FTP`) says: > mdtm ( FILE ) > Returns the /modification time/ of the given file > > size ( FILE ) > Returns the size in bytes for the given file as stored on the > remote server. > > *NOTE*: The size reported is the size of the stored file on the > remote server. If the file is subsequently transfered from the > server in ASCII mode and the remote server and local machine have > different ideas about "End Of Line" then the size of file on the > local machine after transfer may be different > I would suggest using one or both of these (before you download the file). Combined with the local timestamp you should be able to tell which file needs to be downloaded. (`perldoc -q timestamp` yields): > Found in /usr/lib/perl5/5.8.0/pod/perlfaq5.pod > How do I get a file's timestamp in perl? > If you want to retrieve the time at which the file was last > read, written, or had its meta-data (owner, etc) changed, you > use the -M, -A, or -C file test operations as documented in > perlfunc. These retrieve the age of the file (measured against > the start-time of your program) in days as a floating point > number. Some platforms may not have all of these times. See > perlport for details. To retrieve the "raw" time in seconds > since the epoch, you would call the stat function, then use > localtime(), gmtime(), or POSIX::strftime() to convert > this into > human-readable form. > > Here's an example: > > $write_secs = (stat($file))[9]; > printf "file %s updated at %s\n", $file, > scalar localtime($write_secs); > > If you prefer something more legible, use the File::stat > module > (part of the standard distribution in version 5.004 and > later): > > # error checking left as an exercise for reader. > use File::stat; > use Time::localtime; > $date_string = ctime(stat($file)->mtime); > print "file $file updated at $date_string\n"; > > The POSIX::strftime() approach has the benefit of being, in > theory, independent of the current locale. See perllocale for > details. [snipped rest of perldoc -q results] Hope that helps, --jeremy From tim at consultix-inc.com Fri May 9 20:52:08 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:checking for newer file on FTP server In-Reply-To: <20030509211018.45716.qmail@web40020.mail.yahoo.com> References: <20030509211018.45716.qmail@web40020.mail.yahoo.com> Message-ID: <20030509185208.A26008@timji.consultix-inc.com> > > Trying to check a file on an ftp server to see if it > has changed ... is newer ... than a prior download. > Check out the mirror() sub of LWP::Simple, it might do exactly what you want: mirror($url, $file) Get and store a document identified by a URL, using If- modified-since, and checking of the Content-Length. Returns the HTTP response code. See man-page excerpt below. ======================================================= | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White-Camel Award Recipient") | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ======================================================= lib::LWP::SimplUser Contributed Perl Documentalib::LWP::Simple(3) NAME get, head, getprint, getstore, mirror - Procedural LWP interface SYNOPSIS perl -MLWP::Simple -e 'getprint "http://www.sn.no"' use LWP::Simple; $content = get("http://www.sn.no/") if (mirror("http://www.sn.no/", "foo") == RC_NOT_MODIFIED) { ... } if (is_success(getprint("http://www.sn.no/"))) { ... } DESCRIPTION This interface is intended for those who want a simplified view of the libwww-perl library. It should also be ... mirror($url, $file) Get and store a document identified by a URL, using If- modified-since, and checking of the Content-Length. Returns the HTTP response code. 25/Nov/97 libwww-perl-5.18 lib::LWP::Simple(3) > Hi, > > This is my first posting... I'm still a Perl newbie. > So, I figure subscribing here will help improve my > skills. > > Trying to check a file on an ftp server to see if it > has changed ... is newer ... than a prior download. > > I can see how to use NET::FTP to connect and get the > file. I'm not sure how to do the comparison without > first downloading the file ... I can store a MD5 > checksum or use the size of file or date to do the > comparison. > > Open to your suggestions, > > Thanks, > > Al > alpgaray@yahoo.com > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org -- -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From bill at celestial.com Fri May 9 21:26:36 2003 From: bill at celestial.com (Bill Campbell) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:checking for newer file on FTP server In-Reply-To: <20030509185208.A26008@timji.consultix-inc.com>; from tim@consultix-inc.com on Fri, May 09, 2003 at 06:52:08PM -0700 References: <20030509211018.45716.qmail@web40020.mail.yahoo.com> <20030509185208.A26008@timji.consultix-inc.com> Message-ID: <20030509192636.A12488@barryg.mi.celestial.com> On Fri, May 09, 2003 at 06:52:08PM -0700, SPUG-list-owner wrote: >> >> Trying to check a file on an ftp server to see if it >> has changed ... is newer ... than a prior download. >> man rsync Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``People who relieve others of their money with guns are called robbers. It does not alter the immorality of the act when the income transfer is carried out by government.'' From m3047 at inwa.net Sat May 10 11:21:39 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:escaping HTML Message-ID: What are people's recommendations for escaping HTML without importing the kitchen sink? It's not hard to do it yourself. There are about a bajillion HTML:: modules, I'm sure there are more than several ways to do this. -- Fred Morris m3047@inwa.net From adamm at wazamatta.com Sat May 10 23:10:54 2003 From: adamm at wazamatta.com (Adam Monsen) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:escaping HTML In-Reply-To: References: Message-ID: <3EBDCD4E.8050505@wazamatta.com> Fred Morris wrote: > What are people's recommendations for escaping HTML without importing the > kitchen sink? It's not hard to do it yourself. $ perl -ne 's//>/g' < index.html > outdex.html > There are about a bajillion HTML:: modules, I'm sure there are more than > several ways to do this. > > -- > > Fred Morris > m3047@inwa.net From m3047 at inwa.net Sun May 11 12:02:18 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:58 2004 Subject: Summary Re: SPUG:escaping HTML Message-ID: I originally wrote: >What are people's recommendations for escaping HTML without importing the >kitchen sink? It's not hard to do it yourself. > >There are about a bajillion HTML:: modules, I'm sure there are more than >several ways to do this. For my calendar thingy I escaped the markups myself. I did that because I wanted to reserve the option of altering the behavior based on the user login, although I haven't used that capability. I have received the following responses (in no particular order): Marc M. Adkins concurs that it's not hard to do yourself, and that it's not just the kitchen sink but "...the entire kitchen (and the basement and the garage...)." I agree, particularly because I am running mod_perl; although I tolerate the memory bloat for the wicked fast performance, it's only prudent to give some consideration to how much memory is consumed to achieve a particular functionality with a certain level of convenience. I'm writing another gizmo right now (a firewall analyzer and rule manager), and given the relatively sporadic usage profile sucking in loads of stuff that isn't already there doesn't make a lot of sense. I suppose I could run the stuff without using mod_perl, and the performance penalty of compiling the scripts each time they're run might be reasonable for this application. OTOH just not even bothering might be reasonable for this application, because the data is conditioned in other ways and access is presumed to be controlled. Adam Monsen proffers this: $ perl -ne 's//>/g' < index.html > outdex.html I would add that to mitigate HTML injection opportunities you should also think about the impact of thick quotes and ampersands. (And although I haven't done so at least to-date in my calendar thingie, perhaps you do want to allow certain users to use certain tags in certain situations.) Jeremy Kahn believes that HTML::Entities is part of the 5.8 core. Douglas Kirkland wants to know if I want to strip the HTML out entirely or display the HTML as plain text. I want to escape it, roughly speaking. There is some stuff you just can't allow being entered, either. For instance a thick quote in a textfield, or in a textarea. Anyway, thanks to all of you for your responses.. -- Fred Morris m3047@inwa.net From ced at carios2.ca.boeing.com Sun May 11 21:06:27 2003 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:escaping HTML Message-ID: <200305120206.TAA01820@carios2.ca.boeing.com> > $ perl -ne 's//>/g' < index.html > outdex.html ^ ^ p With a couple more for safety: $ perl -pe 's//>/g;s/"/"/g;s/&/&/g' \ < index.html > outdex.html -- Charles DeRykus From DFDahlke at shieldsbag.com Mon May 12 10:13:31 2003 From: DFDahlke at shieldsbag.com (Dahlke, Doug) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:Curses add on problem Message-ID: Yes Jay, I tried that.. Unfortunately there is a bug from the Sun Solaris library that stayed with SCO and a library call gets added twice without protection, so the compile doesn't complete. Something about bool being defined twice, as it is in curses.h plus another library. I followed the README help and the library compiles ok, but when I try to run the demo, I get the old can't find the loadable library from Perl's Autoloader routine. I've seen this before and can't remember what I did to fix it. I was hoping someone in Seattle's group could remember it. Thanks for the reply. Doug Dahlke -----Original Message----- From: Jay Scherrer [mailto:jay@scherrer.com] Sent: Friday, May 02, 2003 7:47 PM To: Dahlke, Doug Subject: Re: SPUG:Curses add on problem Are you using the CPAN installer configured to follow installations? I don't know to much about SCO (especially after their IBM debunkle). But if yoy use the CPAN shell to do the instalation, It makes a good install. Try: $ perl -MCPAN -e shell; Jay On Thursday 01 May 2003 05:08 pm, Dahlke, Doug wrote: > Help please, > > I'm new to the list. I've been using Perl for 8 years, but at my > age I tend to forget a thing or two now and then. I still develop for > perl under Unix but have a littke TkPerl under my belt. The Cdk or > Curses Development Kit gives Curses pretty much all the toys that a > regular X or M$ window has. At least it is supposed to have list > boxes, etc. I installed the C version of the cdk library. Believe me > the c-code is ugly to test this.. I tried, but being on SCO Unixware > 7.1 makes compiling code a bit of a pain. I then followed the Solaris > notes for adding the Cdk package to perl.. I did the standard packing > install from CPAN and in trying to run the fulldemo/cdktest I get the > following error message. > > Can't load > '/usr/local/lib/perl5/site_perl/5.005/i386-svr5/auto/Cdk/Cdk.so' for > module Cdk: dynamic linker: /usr/bin/perl: relocation error: symbol > not found: acs32map; referenced from: > /usr/local/lib/perl5/site_perl/5.005/i386-svr5/auto/Cd > k/Cdk.so at /usr/local/lib/perl5/5.00502/i386-svr5/DynaLoader.pm line > 168. > > at ./cdkdemo line 11 > BEGIN failed--compilation aborted at ./cdkdemo line 11. > > I've seen this before and don't remember how I fixed it. I do > remember I was working on a module at the time. Has anybody out there > ran into this? Here is the info on my perl. > > Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: > Platform: > osname=svr5, osvers=uw7, archname=i386-svr5 > uname='unixware scoot 5 7 i386 x86at sco unix_svr5 ' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef useperlio=undef d_sfio=undef > Compiler: > cc='/bin/cc', optimize='-g', gccversion= > cppflags='-I/usr/include -I/usr/ucbinclude -I/usr/local/include' > ccflags ='-I/usr/include -I/usr/ucbinclude -I/usr/local/include' > stdchar='unsigned char', d_stdstdio=define, usevfork=false > intsize=4, longsize=4, ptrsize=4, doublesize=8 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 > alignbytes=4, usemymalloc=y, prototype=define > Linker and Libraries: > ld='/bin/cc', ldflags ='-L/usr/ccs/lib -L/usr/ucblib > -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib /usr/ucblib > libs=-lsocket -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lucb -lx > libc=, so=so, useshrplib=true, libperl=libperl.so.5.52 > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' > cccdlflags='-KPIC', lddlflags='-G -L/usr/ccs/lib -L/usr/ucblib > -L/usr/local/ lib' > > > Characteristics of this binary (from libperl): > Built under svr5 > Compiled at Nov 30 1998 14:15:54 > %ENV: > PERL_READLINE_NOWARN="" > @INC: > /usr/local/lib/perl5/5.00502/i386-svr5 > /usr/local/lib/perl5/5.00502 > /usr/local/lib/perl5/site_perl/5.005/i386-svr5 > /usr/local/lib/perl5/site_perl/5.005 > . > > Tim told me there were a bunch of perlers over there and he was sure > one of you could help. I've also looked at Curses::Forms, but this > looks a bit more robust in toys you can use.. Any help would be > greatly appreciated. If anyone needs DBI help, I'd be glad to help > anytime. > > Thanks, > Doug Dahlke > Shields Bag & Printing > Yakima _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org From DFDahlke at shieldsbag.com Mon May 12 17:31:41 2003 From: DFDahlke at shieldsbag.com (Dahlke, Doug) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:SpamAssassin with Exchange Message-ID: Seems I'm always running into a dead end.. I've always wanted to try SpamAssassin and downloaded this fine Perl app today. Looks like setting up a home internet POP3 account is a breeze, but I'm of course trying to set it up at work with our @$@($*&@#^($(*&%) M$ exchange server POS. For some reason, it doesn't like anything I set up. If I use my exchange email account name, it won't connect. If I try to add a pop3 client, still can find exchange. Anybody already experienced at this and can help a little bit? I'm running on Outlook 2002 under Office XP on XP.. Sorry to say. Exchange is the 2000 version. Thanks for any pre help. Doug Dahlke From kahn at cpan.org Mon May 12 19:23:48 2003 From: kahn at cpan.org (Jeremy Kahn) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:SpamAssassin with Exchange In-Reply-To: References: Message-ID: <3EC03B14.6010306@cpan.org> Dahlke, Doug wrote (and I gratuitously edited): >Seems I'm always running into a dead end.. I've always wanted to try >SpamAssassin ... Exchange. ... Outlook 2002 under >Office XP on XP. > I checked Perlmonks, which has several interesting threads on this subject: http://www.perlmonks.org/index.pl?node_id=193065 ("A SpamAssassin-Enabled POP3 Proxy") http://www.perlmonks.org/index.pl?node_id=195210 ("SpamAssassin IMAP client for exchange") http://www.perlmonks.org/index.pl?node_id=230957 ("Perl Internet Proxy for Windows") Hope that helps. I don't know if any of this is specific to your needs, but it was an interesting research/diversion for me. --jeremy From DFDahlke at shieldsbag.com Tue May 13 12:38:30 2003 From: DFDahlke at shieldsbag.com (Dahlke, Doug) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:SpamAssassin with Exchange Message-ID: Thanks Jeremy. I'm using activestate version 5.61. Unfortunately I'm having difficulty in getting Mail-SpamAssassin package with both VPM and PPM or PPM3. It says the PPD doesn't exist for that version. I have downloaded Saproxy which is a perl -> exe product. Everything in this seems to work somewhat, but I'm getting a problem from Outlook complaining that user dougd:sbpnt2 on the local machine has an incorrect password.. Something isn't getting parsed right I think. I looked on the Spamassassin.org site and don't see anything in the FAQs about this. Out of the 1000 emails I get a week, I'd say a 1/3 of them are spam.. The code in the first link would work, but I can't get the package apparently. Any ideas for other links for that other than Active State? Thanks Doug -----Original Message----- From: Jeremy Kahn Dahlke, Doug wrote (and I gratuitously edited): >Seems I'm always running into a dead end.. I've always wanted to try >SpamAssassin ... Exchange. ... Outlook 2002 under Office XP on XP. > I checked Perlmonks, which has several interesting threads on this subject: http://www.perlmonks.org/index.pl?node_id=193065 ("A SpamAssassin-Enabled POP3 Proxy") http://www.perlmonks.org/index.pl?node_id=195210 ("SpamAssassin IMAP client for exchange") http://www.perlmonks.org/index.pl?node_id=230957 ("Perl Internet Proxy for Windows") Hope that helps. I don't know if any of this is specific to your needs, but it was an interesting research/diversion for me. --jeremy From kahn at cpan.org Tue May 13 14:43:32 2003 From: kahn at cpan.org (Jeremy Kahn) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:SpamAssassin with Exchange In-Reply-To: References: Message-ID: <3EC14AE4.6080503@cpan.org> Dahlke, Doug wrote: >... Unfortunately I'm having difficulty >in getting Mail-SpamAssassin package with both VPM and PPM or PPM3. > >... The code in the >first link would work, but I can't get the package apparently. Any >ideas for other links for that other than Active State? Thanks > > You might try some other repository for PPMs. Randy Kobes has one at http://theoryx5.uwinnipeg.ca/ppmpackages/ but browsing there, it doesn't look like Mail-SpamAssassin is there. Rats. The Source of All Wisdom (Google) turns up a mini-tutorial for how to add a repository to your ppm3 setup: http://www.nyetwork.org/wiki/win32_apache2 Alternatively, you could (maybe) build from source from CPAN. Peeking at the source files there, it don't look easy, bro. But if you have nmake and Visual Studio, you might be able to get it to build. Good luck. --jeremy From kalistibot at yahoo.com Tue May 13 19:19:14 2003 From: kalistibot at yahoo.com (Aaron Paul) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords Message-ID: <20030514001914.90736.qmail@web20909.mail.yahoo.com> Greetings SPUGsters I'm trying to design a cgi script which will allow a visitor/new customer to enter a user name and password, and this info will be dropped into a file on my machine to be processed by another script which will run something like the unix/linux commands useradd and passwd. My challenge is that passwd keep strict rules about what kind of passwords are good (not based on a dictionary word, at least n characters), and will error if the password is bad. I'd like my cgi to use similar logic and prompt the visitor to try again if they enter a bad passwd. Passwd is a C program and I'm having difficulty locating the source code for my version (RH linux). Are there any perl modules that use this type of logic? Can anyone point me to docs or methods for doing what I'm describing (or is there a better simpler way?) Thanks in advance, -kali __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From spug at ifokr.org Tue May 13 19:42:07 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords In-Reply-To: <20030514001914.90736.qmail@web20909.mail.yahoo.com> References: <20030514001914.90736.qmail@web20909.mail.yahoo.com> Message-ID: <20030514004207.GE20058@ifokr.org> > My challenge is that passwd keep strict rules about > what kind of passwords are good (not based on a > dictionary word, at least n characters), and will > error if the password is bad. It's probably using cracklib. Here's what I wrote years ago (still works) # try cracklib use FileHandle; use IPC::Open2; open2(*RD, *WR, "/usr/sbin/crack_testlib") or bail "crack_testlib failed"; print WR "$NEWPW\n" or bail "Couldn't write"; close WR; my($pw,$reason); while () { ($pw,$reason) = split /: /; # Strip trailing space $reason =~ s/\s*$//g; if ($pw eq $NEWPW) { last if ($reason eq 'ok') } } close RD; if ( $reason ne "ok" ) {

Password Strength Error

Sorry, the password you supplied is not strong enough. The automated password checking routine said the following:

"$reason"

Please go back and try again with a stronger password. EOM } -- Brian Hatch "All we need to do is stop Systems and idiot-proofing the world. Security Engineer Pretty soon, we'll run out http://www.ifokr.org/bri/ of idiots." -unknown Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030513/2f8df97c/attachment.bin From m3047 at inwa.net Tue May 13 21:09:50 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:firewall log analysis widget (in progress) Message-ID: My firewall logs are HUGE (am I just lucky, or what?). Making sense out of it has been mostly voodoo and experience, and I decided to put a "face" on it. A couple months ago I wrote a Perl script (with plugin filters) to extract "interesting" items out of the various logs and put them into a MySQL table. So this last weekend I wrote a bunch of CGIs to report on that data (relying heavily on SqlHtmlRpt lifted from the Calendar thingy) and maintain the set of firewall rules in a separate table.. with the added plus of color-coding stuff based on whether or not a rule would pick it up... and the ability to mark "special" addresses with different colors than the rest. I'll write another Perl script to build the firewall load script from the rules table when I have time. A very in-depth analysis tool for a single or handful of boxes situation. Anybody interested in looking at it? Should I give a lightning talk about it at SPUG? I'll probably give a talk about it at GSLUG sometime in the next few months. -- Fred Morris m3047@inwa.net From spug at ifokr.org Tue May 13 22:43:52 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:firewall log analysis widget (in progress) In-Reply-To: References: Message-ID: <20030514034352.GR15456@ifokr.org> > A very in-depth analysis tool for a single or handful of boxes situation. > Anybody interested in looking at it? Should I give a lightning talk about > it at SPUG? I'll probably give a talk about it at GSLUG sometime in the > next few months. At the very least, I'd suggest describing what you've done on the loganalysis mailing list - see lists.schmoo.com/mailman/listinfo/loganalysis -- Brian Hatch The best way to accelerate Systems and a Windows machine is at Security Engineer 9.8 meters per second http://www.ifokr.org/bri/ squared. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030513/4cda54c2/attachment.bin From adamm at wazamatta.com Wed May 14 00:07:05 2003 From: adamm at wazamatta.com (Adam Monsen) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords In-Reply-To: <20030514004207.GE20058@ifokr.org> References: <20030514001914.90736.qmail@web20909.mail.yahoo.com> <20030514004207.GE20058@ifokr.org> Message-ID: <3EC1CEF9.8070408@wazamatta.com> Brian Hatch wrote: > >>My challenge is that passwd keep strict rules about >>what kind of passwords are good (not based on a >>dictionary word, at least n characters), and will >>error if the password is bad. > > > It's probably using cracklib. > > > Here's what I wrote years ago (still works) compile-time errors: - bail is not a function name - looks like you included the last half of a heredoc (ending in 'EOM') but forgot the operator to start the heredoc potential runtime errors: - /usr/sbin/crack_testlib doesn't exist on my system (is it supposed to?) The following works for me... strange lookin' Perl, though. :) #!/usr/bin/perl -w use strict; use Inline C => Config => LIBS => '-lcrack'; use Inline C => <<'END_C'; #include void test_pw(const char *pw, const char *dict_path) { char *msg; msg = FascistCheck(pw, dict_path); if (msg) printf("MSG: %s\n", msg); else printf("Password accepted.\n"); return 0; } END_C # intentionally designed to work only on my box. # don't really use this. test_pw("foo", "/usr/lib/cracklib_dict"); > # try cracklib > use FileHandle; > use IPC::Open2; > open2(*RD, *WR, "/usr/sbin/crack_testlib") or bail "crack_testlib > failed"; > print WR "$NEWPW\n" or bail "Couldn't write"; > > close WR; > my($pw,$reason); > while () { > ($pw,$reason) = split /: /; > > # Strip trailing space > $reason =~ s/\s*$//g; > > if ($pw eq $NEWPW) { > last if ($reason eq 'ok') > } > } > close RD; > > if ( $reason ne "ok" ) { >

Password Strength Error

> Sorry, the password you supplied is not strong enough. > The automated password checking routine said the following: >

> "$reason" >

> Please go back and try again with a stronger password. > EOM > } From cwilkes-spug at ladro.com Wed May 14 09:56:02 2003 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:firewall log analysis widget (in progress) In-Reply-To: <20030514034352.GR15456@ifokr.org> References: <20030514034352.GR15456@ifokr.org> Message-ID: <20030514145602.GA49026@www.ladro.com> On Tue, May 13, 2003 at 08:43:52PM -0700, Brian Hatch wrote: > > > A very in-depth analysis tool for a single or handful of boxes situation. > > Anybody interested in looking at it? Should I give a lightning talk about > > it at SPUG? I'll probably give a talk about it at GSLUG sometime in the > > next few months. > > At the very least, I'd suggest describing what you've done on > the loganalysis mailing list - see > lists.schmoo.com/mailman/listinfo/loganalysis I would also look at submitting them to http://dshield.org/howto.php so that attacks can be charted out. Chris From spug at ifokr.org Wed May 14 10:03:51 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords In-Reply-To: <3EC1CEF9.8070408@wazamatta.com> References: <20030514001914.90736.qmail@web20909.mail.yahoo.com> <20030514004207.GE20058@ifokr.org> <3EC1CEF9.8070408@wazamatta.com> Message-ID: <20030514150351.GU15456@ifokr.org> > >Here's what I wrote years ago (still works) > > compile-time errors: > - bail is not a function name > - looks like you included the last half of a heredoc (ending in 'EOM') > but forgot the operator to start the heredoc Cut and paste errors - the script was much longer, I'm just giving you the relevant bits. > potential runtime errors: > - /usr/sbin/crack_testlib doesn't exist on my system (is it supposed to?) Yes, you'd need to have cracklib installed. Very location dependent, but this is where Debian installs it. > use Inline C => <<'END_C'; > #include > void test_pw(const char *pw, const char *dict_path) > { > char *msg; > msg = FascistCheck(pw, dict_path); > if (msg) > printf("MSG: %s\n", msg); > else > printf("Password accepted.\n"); > return 0; > } > END_C Again, this requires the cracklib libraries are installed. This is probably a 'cleaner' solution, though scary for those who don't like C. -- Brian Hatch A Freudian slip is when Systems and you say one thing but Security Engineer mean your mother. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030514/3fbe0e2b/attachment.bin From andrew at sweger.net Wed May 14 12:47:15 2003 From: andrew at sweger.net (Andrew Sweger) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords In-Reply-To: <20030514150351.GU15456@ifokr.org> Message-ID: On Wed, 14 May 2003, Brian Hatch wrote: > Yes, you'd need to have cracklib installed. Very location dependent, > but this is where Debian installs it. More specifically, you need the cracklib-runtime package installed on Debian to get the /usr/sbin/crack_test* utilities. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From MichaelRunningWolf at att.net Thu May 15 17:50:00 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:DB two-way synchronization Message-ID: I have two sources of contact data (name, phone, email, etc), let's call them A and B. There's no clear "source", since updates can occur in either place. I'd like to do a bi-directional sync. Is there a DBI module or algorithm that would allow this? If not, do you know of a pointer to an algorithm for doing this? (Did Edsger Dijkstra tackle such problems?) It's the same problem as a PDA sync'ing to a PC for calendar, note, email, or contact information. I know it's not an easy theoretical algorithm, but at least it's one that's been solved. I'd like to build my solution on top of that work rather than reinvent it. A and B are not just arbitrary names: A is for ACT!, a contact manager that should be ODBC-accessible B is for BBDB, emacs' Big Brother Data Base I know the DBD::ODBC module exists. (I'll have to come up to speed on it. [1]) I'll have to build a DBD::application::emacs::BBDB interface, either directly to its lisp-like textual file representation, or through the behaviors coded in emacs' elisp as an API. Anyone done something similar? Ideas? It's no small feat, I'd imagine. [2] Thanks, Michael Wolf P.S. Have food, will barter.... [1] Anyone interested in trading a lunch or coffee for a JIT-training on how to dig into an unknown ODBC interface? [2] Anyone in trading dinner for a down-n-dirty co-development/design session to architect or create this DBI module? -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From tnight at pobox.com Thu May 15 18:22:38 2003 From: tnight at pobox.com (Terry Nightingale) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:DB two-way synchronization In-Reply-To: References: Message-ID: <3EC4213E.1080708@pobox.com> Michael R. Wolf wrote: [snip] > It's the same problem as a PDA sync'ing to a PC for calendar, note, > email, or contact information. I know it's not an easy theoretical > algorithm, but at least it's one that's been solved. I'd like to build > my solution on top of that work rather than reinvent it. I'm not personally aware of any such algorithm, but that doesn't mean it does not exist. The way I've seen this sort of problem handled is through the use of update timestamps and a few reasonable assumptions. The best-case scenario is having an update timestamp for every field of data. Then, the merge is a simple matter of going through the data, field by field, and comparing the update dates. The most recent wins. Usually, you don't have a field-based update timestamp, but a record-based timestamp. In that case, you have to let the most recently updated record win, except when the data in a field in the most recently updated record is blank or meaningless (fails a /\w+/ match, for example), and the same field in the less recently updated record contains more meaningful data. > A and B are not just arbitrary names: > A is for ACT!, a contact manager that should be ODBC-accessible > B is for BBDB, emacs' Big Brother Data Base > > I know the DBD::ODBC module exists. (I'll have to come up to speed on > it. [1]) It's not bad. To get started, I'd recommend using ActivePerl and a Microsoft Access Database. Set up a data source for your Access database, and write a few simple Perl scripts to manipulate the data using DBI with DBD::ODBC. Then, move on to trying to access and manipulate the Act! data. > I'll have to build a DBD::application::emacs::BBDB interface, either > directly to its lisp-like textual file representation, or through the > behaviors coded in emacs' elisp as an API. Anyone done something > similar? Ideas? It's no small feat, I'd imagine. [2] If the data is really stored in a text format, you're probably better off writing a DBD::whatever module to interface with the text file directly. There should be at least a few pure-Perl DBD drivers out on CPAN that you could use as a starting point. The DBD::Sprite module is one that I can think of off hand. Best of luck! -- Terry Nightingale Web Developer, Philosopher, Geek "In theory, there is no difference between theory and practice. But, in practice, there is." -- Jan L.A. van de Snepscheut -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3411 bytes Desc: S/MIME Cryptographic Signature Url : http://mail.pm.org/pipermail/spug-list/attachments/20030515/2552d1e1/smime.bin From chris.nord at attws.com Thu May 15 18:33:34 2003 From: chris.nord at attws.com (Nord, Chris) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:Help with substitution Message-ID: <9FFAB51A2356F64CB24A852D11B99E0618048C@WA-MSG05-BTH.wireless.attws.com> I am having trouble with substitution when the variable $pattern contains non-word characters. See example 1. Ideas on how to make example 1 work like example 2? I have tried a few variations when creating $pattern, but so far have not got the substitution to work. Thanx, Chris Nord AT&T Wireless Services WNS Call Routing Translations office 425 288 2031 fax 425 806 3690 ################################################### #! /bin/perl -w $data = '(PREXLIDX 501) ( CARRMNC (TEST)$)$ $'; $pattern = '( CARRMNC (TEST)$)'; ## example 1 ($new_data = $data) =~ s/$pattern/something new/; print $new_data,"\n"; # output: (PREXLIDX 501) ( CARRMNC (TEST)$)$ $ ## example 2 ($new_data = $data) =~ s/\( CARRMNC \(TEST\)\$\)/something new /; print $new_data,"\n"; # output: (PREXLIDX 501) something new $ $ ################################################### From cansubaykan at hotmail.com Thu May 15 21:28:59 2003 From: cansubaykan at hotmail.com (John Subaykan) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:Help with substitution Message-ID: use \Q to disable pattern metacharacters (until \E) ($new_data = $data) =~ s/\Q$pattern\E/something new/; John ----Original Message Follows---- From: "Nord, Chris" To: Subject: SPUG:Help with substitution Date: Thu, 15 May 2003 16:33:34 -0700 I am having trouble with substitution when the variable $pattern contains non-word characters. See example 1. Ideas on how to make example 1 work like example 2? I have tried a few variations when creating $pattern, but so far have not got the substitution to work. Thanx, Chris Nord AT&T Wireless Services WNS Call Routing Translations office 425 288 2031 fax 425 806 3690 ################################################### #! /bin/perl -w $data = '(PREXLIDX 501) ( CARRMNC (TEST)$)$ $'; $pattern = '( CARRMNC (TEST)$)'; ## example 1 ($new_data = $data) =~ s/$pattern/something new/; print $new_data,"\n"; # output: (PREXLIDX 501) ( CARRMNC (TEST)$)$ $ ## example 2 ($new_data = $data) =~ s/\( CARRMNC \(TEST\)\$\)/something new /; print $new_data,"\n"; # output: (PREXLIDX 501) something new $ $ ################################################### _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From jay at scherrer.com Fri May 16 09:54:01 2003 From: jay at scherrer.com (Jay Scherrer) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:DB two-way synchronization In-Reply-To: References: Message-ID: <200305160754.01467.jay@scherrer.com> Is this the beginning of the rhetorical Internet street corner? "Will script Perl for food". Jay On Thursday 15 May 2003 03:50 pm, Michael R. Wolf wrote: > I have two sources of contact data (name, phone, email, etc), let's > call them A and B. There's no clear "source", since updates can occur > in either place. I'd like to do a bi-directional sync. > > Is there a DBI module or algorithm that would allow this? If not, do > you know of a pointer to an algorithm for doing this? (Did Edsger > Dijkstra tackle such problems?) > > It's the same problem as a PDA sync'ing to a PC for calendar, note, > email, or contact information. I know it's not an easy theoretical > algorithm, but at least it's one that's been solved. I'd like to build > my solution on top of that work rather than reinvent it. > > A and B are not just arbitrary names: > A is for ACT!, a contact manager that should be ODBC-accessible > B is for BBDB, emacs' Big Brother Data Base > > I know the DBD::ODBC module exists. (I'll have to come up to speed on > it. [1]) > > I'll have to build a DBD::application::emacs::BBDB interface, either > directly to its lisp-like textual file representation, or through the > behaviors coded in emacs' elisp as an API. Anyone done something > similar? Ideas? It's no small feat, I'd imagine. [2] > > Thanks, > Michael Wolf > > P.S. Have food, will barter.... > > [1] Anyone interested in trading a lunch or coffee for a JIT-training > on how to dig into an unknown ODBC interface? > > [2] Anyone in trading dinner for a down-n-dirty co-development/design > session to architect or create this DBI module? -- Personalized e-mail and domain names: http://www.netidentity.com/default.asp?p=BI3CCYFM From joshlanza at hotmail.com Fri May 16 12:30:10 2003 From: joshlanza at hotmail.com (Joshua Lanza) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:Fw: Software dev. engineers Message-ID: Software dev. engineersDon't know if this link has been posted to the list recently. Apparently some new positions. Josh Rebecca Barton wrote: Hey folks, Just want to throw it out there that we are seeking some SDE's - working primarily w/ C++, Unix and PERL. Y'all work in the hi-tech arena and I thought might know of some quality candidates. Here's the link for our job site - let me know if you have any questions. http://www.amazon.com/exec/obidos/tg/stores/static/-/jobs/locale/Seattle-Headquarters/103-4800324-5036603 Thanks RB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20030516/c30bfe66/attachment.htm From tim at consultix-inc.com Tue May 20 00:02:32 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:May Mtg: Web-Bugs and Perl for Shell Message-ID: <20030519220232.A30370@timji.consultix-inc.com> May 2003 Seattle Perl Users Group Meeting ----------------------------------------------------- Topic: "Perl and Web Bugs" Speaker: Meryll Larkin, Seattle Linux Chix Topic: "Perl for Shell Users and Programmers" Speaker: Tim Maher, Consultix Time: Tuesday, May 20, 2003 7-9pm Location: SAFECO bldg, Brooklyn St. and NE 45th St. Cost: Admission is free and open to the general public. Info: http://seattleperl.org/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * In the first of this month's two presentations, Meryll will talk about the use of Linux, Apache, MySQL, and Perl ("LAMP") to track Web visitors Topics will include: * a quick look at (Apache/Linux) Web access logs * Apache environmental variables * What is a Web bug: how to spot them and what do they do * a visitor counter in Perl-CGI * RDBMS (relational database management system using OO-Perl module, DBD, DBI and MySQL) * setting and retrieving cookies * a Perl-CGI Web page to view database contents * * * * * * * In whatever time remains, Tim Maher will continue where he left off in April's talk, featuring excerpts from his upcoming book and YAPC::America::North presentations on topics including: * Useful Perl scripts that improve on sed, grep, and awk * Programming Lazily for user interaction using Shell::POSIX::Select Pre- and Post- Meeting Activities --------------------------------- The pre-meeting dinner will be at the Cedars restaurant, at 50th St. and Brooklyn, in the University District, near the Safeco building where the meeting will take place. The phone number is 527-5247. If you're planning to be there, please RSVP to the list by 2pm on the meeting day with your expected arrival time (5:30-5:45pm is recommended). TO BE FAIR, from now on only those who comply with the RSVP policy (and are therefore counted in the seating reservation) will be allowed to sit at the speaker's table. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From tim at consultix-inc.com Tue May 20 00:09:27 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:White camel nominations Message-ID: <20030519220927.A30408@timji.consultix-inc.com> SPUGsters, As a White Camel award recipient for 2002 (http://teachmeperl.com/perl_com_interview.html), I'm on the nominating committee for this years winners. And I'd appreciate your input in identifying "unsung heroes of the Perl community" who have helped build our community and knit us together, without receiving appropriate recognition for their contributions. Any ideas? (NOTE: The efforts of nominees have to be primarily "cultural", not code-related.) -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From m3047 at inwa.net Tue May 20 00:49:21 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:RSVP: Cedars Message-ID: >your expected arrival time (5:30-5:45pm is recommended). Yah. -- Fred Morris m3047@inwa.net From schieb at centurytel.net Tue May 20 09:34:32 2003 From: schieb at centurytel.net (Islandman) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:May Mtg: Web-Bugs and Perl for Shell References: <20030519220232.A30370@timji.consultix-inc.com> Message-ID: <3ECA3CF8.C8559AFA@centurytel.net> I'm planning on being at Cedars. -Brian Schieber Tim Maher wrote: > > May 2003 Seattle Perl Users Group Meeting > ----------------------------------------------------- > > Topic: "Perl and Web Bugs" > Speaker: Meryll Larkin, Seattle Linux Chix > > Topic: "Perl for Shell Users and Programmers" > Speaker: Tim Maher, Consultix > > Time: Tuesday, May 20, 2003 7-9pm > Location: SAFECO bldg, Brooklyn St. and NE 45th St. > > Cost: Admission is free and open to the general public. > Info: http://seattleperl.org/ > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > > In the first of this month's two presentations, Meryll will talk about the > use of Linux, Apache, MySQL, and Perl ("LAMP") to track Web visitors > > Topics will include: > > * a quick look at (Apache/Linux) Web access logs > * Apache environmental variables > * What is a Web bug: how to spot them and what do they do > * a visitor counter in Perl-CGI > * RDBMS (relational database management system using OO-Perl module, > DBD, DBI and MySQL) > * setting and retrieving cookies > * a Perl-CGI Web page to view database contents > > * * * * * * * > > In whatever time remains, Tim Maher will continue where he left > off in April's talk, featuring excerpts from his upcoming book and > YAPC::America::North presentations on topics including: > > * Useful Perl scripts that improve on sed, grep, and awk > * Programming Lazily for user interaction using Shell::POSIX::Select > > Pre- and Post- Meeting Activities > --------------------------------- > The pre-meeting dinner will be at the Cedars restaurant, > at 50th St. and Brooklyn, in the University District, near > the Safeco building where the meeting will take place. The > phone number is 527-5247. If you're planning to be there, > please RSVP to the list by 2pm on the meeting day with > your expected arrival time (5:30-5:45pm is recommended). > > TO BE FAIR, from now on only those who comply with the > RSVP policy (and are therefore counted in the seating > reservation) will be allowed to sit at the speaker's table. > > ====================================================== > | Tim Maher, Ph.D. tim@timmaher.org | > | SPUG Founder & Leader spug@seattleperl.org | > | Seattle Perl Users Group www.seattleperl.org | > ====================================================== > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org From wyllie at dilex.net Tue May 20 15:12:54 2003 From: wyllie at dilex.net (Andrew Wyllie) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:May Mtg: Web-Bugs and Perl for Shell In-Reply-To: <20030519220232.A30370@timji.consultix-inc.com> References: <20030519220232.A30370@timji.consultix-inc.com> Message-ID: <20030520201254.GQ93248@sharkey.dilex.net> On Mon, 19 May 2003, Tim Maher wrote: I'm planning at being at Cedars. thanks! andrew > > May 2003 Seattle Perl Users Group Meeting > ----------------------------------------------------- > > Topic: "Perl and Web Bugs" > Speaker: Meryll Larkin, Seattle Linux Chix > > Topic: "Perl for Shell Users and Programmers" > Speaker: Tim Maher, Consultix > > Time: Tuesday, May 20, 2003 7-9pm > Location: SAFECO bldg, Brooklyn St. and NE 45th St. > > Cost: Admission is free and open to the general public. > Info: http://seattleperl.org/ > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > > In the first of this month's two presentations, Meryll will talk about the > use of Linux, Apache, MySQL, and Perl ("LAMP") to track Web visitors > > Topics will include: > > * a quick look at (Apache/Linux) Web access logs > * Apache environmental variables > * What is a Web bug: how to spot them and what do they do > * a visitor counter in Perl-CGI > * RDBMS (relational database management system using OO-Perl module, > DBD, DBI and MySQL) > * setting and retrieving cookies > * a Perl-CGI Web page to view database contents > > * * * * * * * > > In whatever time remains, Tim Maher will continue where he left > off in April's talk, featuring excerpts from his upcoming book and > YAPC::America::North presentations on topics including: > > * Useful Perl scripts that improve on sed, grep, and awk > * Programming Lazily for user interaction using Shell::POSIX::Select > > > Pre- and Post- Meeting Activities > --------------------------------- > The pre-meeting dinner will be at the Cedars restaurant, > at 50th St. and Brooklyn, in the University District, near > the Safeco building where the meeting will take place. The > phone number is 527-5247. If you're planning to be there, > please RSVP to the list by 2pm on the meeting day with > your expected arrival time (5:30-5:45pm is recommended). > > TO BE FAIR, from now on only those who comply with the > RSVP policy (and are therefore counted in the seating > reservation) will be allowed to sit at the speaker's table. > > ====================================================== > | Tim Maher, Ph.D. tim@timmaher.org | > | SPUG Founder & Leader spug@seattleperl.org | > | Seattle Perl Users Group www.seattleperl.org | > ====================================================== > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > From adamm at wazamatta.com Tue May 20 23:01:28 2003 From: adamm at wazamatta.com (Adam Monsen) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:help with good passwords In-Reply-To: <3EC1CEF9.8070408@wazamatta.com> References: <20030514001914.90736.qmail@web20909.mail.yahoo.com> <20030514004207.GE20058@ifokr.org> <3EC1CEF9.8070408@wazamatta.com> Message-ID: <3ECAFA18.4000507@wazamatta.com> Rewrote a more usable version. Here it is: #!/usr/bin/perl -w use strict; use Inline C => Config => LIBS => '-lcrack'; use Inline C => <<'END_C'; #include /* Returns explanation if the password check failed, * else returns NULL */ char *test_pw(const char *pw, const char *dict_path) { return FascistCheck(pw, dict_path); } END_C my $reason = test_pw($ARGV[0], "/usr/lib/cracklib_dict"); if ($reason) { print "BAD PASSWORD; $reason\n" } else { print "Password was OK!\n"; } Adam Monsen wrote: [...] > #!/usr/bin/perl -w > use strict; > > use Inline C => Config => LIBS => '-lcrack'; > use Inline C => <<'END_C'; > #include > void test_pw(const char *pw, const char *dict_path) > { > char *msg; > msg = FascistCheck(pw, dict_path); > if (msg) > printf("MSG: %s\n", msg); > else > printf("Password accepted.\n"); > return 0; Oops, can't return from a void function. Pretend that never happened. > } > END_C > > # intentionally designed to work only on my box. > # don't really use this. > test_pw("foo", "/usr/lib/cracklib_dict"); [...] From tim at consultix-inc.com Wed May 21 15:06:04 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:30% off EarlyBird price for TPC Message-ID: <20030521130604.A5955@timji.consultix-inc.com> SPUGsters, Register for the Perl Conference by Friday and save lots of money! ======================================================= | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White-Camel Award Recipient") | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ======================================================= Hi UG Leader, The O'Reilly Open Source Convention (OSCON) is coming to Portland, Oregon this year. Since it's our first conference in the beautiful Pacific Northwest, we're offering a special discount to the locals--User Group members in Oregon and Washington. With this "locals only" discount, your members get 30% off of OSCON registration. Anyone who registers by this Friday, May 23, gets a double discount--30% off of the Early Bird price. After the Early Bird Date, your members receive 30% off the regular conference pricing. Use code os03pug when you register online: To register, go to: http://conferences.oreillynet.com/cs/os2003/create/ord_os03 O'Reilly Open Source Convention Portland Marriott Downtown, Portland, OR July 7-11, 2003 http://conferences.oreilly.com/oscon/ Please let your members know ASAP! Thanks, Marsee -Tim *------------------------------------------------------------* | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Watch for my Book: "Minimal Perl for Shell Programmers" | *------------------------------------------------------------* From damian at conway.org Wed May 21 15:35:09 2003 From: damian at conway.org (Damian Conway) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:30% off EarlyBird price for TPC In-Reply-To: <20030521130604.A5955@timji.consultix-inc.com> References: <20030521130604.A5955@timji.consultix-inc.com> Message-ID: <3ECBE2FD.4030401@conway.org> Tim wrote: > Register for the Perl Conference by Friday and save lots of money! I'd just like to add a little insider information. I was talking with Nat Torkington, and he mentioned that in previous years registrations have been sluggish, so O'Reilly has usually extended these kinds of early-bird discounts well past the "official date". People may have gotten into the habit of delaying their decision to attend OSCon on that basis. Apparently this year ORA's getting very good numbers, so the early-bird discount *won't* be extended at all. So if you are planning on taking advantage of the discount, you'll need to grab it in the next few days. Damian From cansubaykan at hotmail.com Wed May 21 18:04:57 2003 From: cansubaykan at hotmail.com (John Subaykan) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:-e filecheck on windows web app Message-ID: I have copies of the same CGI script on two machines on my network. This script, somewhere along the line, checks the existence of a file or directory on a third machine on the same network: if (-e "//Machine3/path/to/file) when this script is runs on //Machine1, (as it has been running until now) the file is found, and the test evaluates to true. on //Machine2 (where this CGI will now reside), this test finds no such file. the pathname is hard-coded as a UNC path, but other tests in the same script (or one of its modules) test filenames stored in variables: if (-e $myFile) these all fail on //Machine2 But when I run a simple command line test on //Machine2 like this: if (-e "//Machine3/bla/bla) { print "it exists"; } else { print "no it doesn't"; } ... from the command line, this script tells me that the file exists. A web app running on the same machine tells me otherwise. Has anyone run into this problem before? (both //Machine1 and //Machine2 are Windows 2000 running IIS 5) Thanks, John _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From maherb at brimworks.com Wed May 21 21:50:09 2003 From: maherb at brimworks.com (Brian Maher) Date: Mon Aug 2 21:36:58 2004 Subject: SPUG:escaping HTML In-Reply-To: <200305120206.TAA01820@carios2.ca.boeing.com> Message-ID: <1A4AC269-8C00-11D7-BCD7-000393C50526@brimworks.com> If you want the text to display exactly as the string looks I would do this: my $string = "Foo & Bar >>\nYO!"; my %translations = ("&" => "&", "<" => "<", ">" => ">", '"' => """, "'" => "'", "\n" => "
\n"); my $regex = "([" . join('', map { quotemeta($_) } keys %translations) . "])"; $string =~ s/$regex/$translations{$1}/go; print $string; This will guarantee your text will be displayed as is. If this text will be displayed inside of a