From dbii at mudpuddle.com Tue Apr 1 00:06:09 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? Message-ID: Ahh, should have thought about it. It shouldn't count if you haven't gone to bed yet. >Jeez, it's just coming up on midnight now. Starting early... > > >dbii@mudpuddle.com (David Bluestein II): > >:Weird. I see the same thing, and it definitely wasn't that way Saturday >:morning as I was just there. Internal pages seem to be the same, and it is >:weirder that links on the main page to the old main CPAN page don't >:reference CPAN. Wonder if the domain expired/the server has had the main >:page replaced? >: >:David >: >:> Hey folks, >:> I went to cpan.org just now and discovered that the mainpage appears to >:>have been >:>changed. Some guy named Matt has made it his home page.... There's still >:>a link >:>to the cpan.org we all know but who the hell is Matt? > > >-- >DVS >Know Nyarlahotep, Know Chaos. No Nyarlahotep, No Chaos. ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From wwalker at broadq.com Tue Apr 1 00:04:39 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? In-Reply-To: <405A4B20FCF8D41192CF0050DA1802C250A731@MINIBOX> References: <405A4B20FCF8D41192CF0050DA1802C250A731@MINIBOX> Message-ID: <20030401060439.GD11645@broadq.com> I've sent this mail to the guy who runs cpan.org. I've checked DNS and it has not been hijacked. It's going where its supposed to. Just a misconfiguraion. On Mon, Mar 31, 2003 at 11:13:54PM -0600, jeremyb@univista.com wrote: > Hey folks, > I went to cpan.org just now and discovered that the mainpage appears to > have been > changed. Some guy named Matt has made it his home page.... There's still > a link > to the cpan.org we all know but who the hell is Matt? > > http://cpan.org > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From parkerm at pobox.com Tue Apr 1 07:19:39 2003 From: parkerm at pobox.com (Michael Parker) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? In-Reply-To: <405A4B20FCF8D41192CF0050DA1802C250A731@MINIBOX> References: <405A4B20FCF8D41192CF0050DA1802C250A731@MINIBOX> Message-ID: <20030401131938.GA11085@mail.herk.net> http://use.perl.org/article.pl?sid=03/04/01/1224229&mode=thread&tid=32 Michael From jeremyb at univista.com Tue Apr 1 08:03:41 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A732@MINIBOX> Frankly, this ticks me off. I feel as if my hard earned skills have just been cheapened. Why would he want to "buy out" cpan.org and yet make such comments about his own code? -Jeremy -----Original Message----- From: Michael Parker To: jeremyb@univista.com Cc: austin@mail.pm.org Sent: 4/1/03 7:19 AM Subject: Re: APM: cpan.org??? http://use.perl.org/article.pl?sid=03/04/01/1224229&mode=thread&tid=32 Michael From jason.smith at amd.com Tue Apr 1 08:46:51 2003 From: jason.smith at amd.com (Jason Smith) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? In-Reply-To: <405A4B20FCF8D41192CF0050DA1802C250A732@MINIBOX> References: <405A4B20FCF8D41192CF0050DA1802C250A732@MINIBOX> Message-ID: <20030401084651.B3647@hornitos.amd.com> I love April Fool's day.. hahaha.. -Jason jeremyb@univista.com wrote: > Frankly, this ticks me off. I feel as if my hard earned skills have just > been > cheapened. Why would he want to "buy out" cpan.org and yet make such > comments about his > own code? > > -Jeremy > > -----Original Message----- > From: Michael Parker > To: jeremyb@univista.com > Cc: austin@mail.pm.org > Sent: 4/1/03 7:19 AM > Subject: Re: APM: cpan.org??? > > http://use.perl.org/article.pl?sid=03/04/01/1224229&mode=thread&tid=32 > > Michael > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin From jeremyb at univista.com Tue Apr 1 08:55:33 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:16 2004 Subject: APM: cpan.org??? Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A734@MINIBOX> dude.... noway. ya think so? -----Original Message----- From: Jason Smith To: jeremyb@univista.com Cc: parkerm@pobox.com; austin@mail.pm.org Sent: 4/1/03 8:46 AM Subject: Re: APM: cpan.org??? I love April Fool's day.. hahaha.. -Jason jeremyb@univista.com wrote: > Frankly, this ticks me off. I feel as if my hard earned skills have just > been > cheapened. Why would he want to "buy out" cpan.org and yet make such > comments about his > own code? > > -Jeremy > > -----Original Message----- > From: Michael Parker > To: jeremyb@univista.com > Cc: austin@mail.pm.org > Sent: 4/1/03 7:19 AM > Subject: Re: APM: cpan.org??? > > http://use.perl.org/article.pl?sid=03/04/01/1224229&mode=thread&tid=32 > > Michael > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin From Goldilox at teachnet.edb.utexas.edu Tue Apr 1 12:08:18 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:16 2004 Subject: APM: running at 100% processor Message-ID: Hi, I'm back again. I guess I figured out that Perl doesn't handle NULL cells in a database at all (other than spewing warnings everywhere). Does anybody have a clue why this would be? My next question is in regards to running one of my scripts. I run one script (or plan to run it) every ten minutes to create a cache of database output for web users (since this server could easily be getting a lot of traffic during bad weather). On my machine here it runs at 100% processor power for the entire time it runs (couple minutes). I haven't tried it yet on the more powerful web server (Windows 2000 server), but I am curious if there is anything I need to do to make the script run at less than 100% to allow the server to accomplish its other tasks without being bogged down my my script running in the background? I guess this is probably a sysadmin question rather than a Perl question - but I figured someone here might have run into the same problem? Rhett From mike at stok.co.uk Tue Apr 1 12:24:34 2003 From: mike at stok.co.uk (Mike Stok) Date: Mon Aug 2 21:23:16 2004 Subject: APM: running at 100% processor In-Reply-To: Message-ID: On Tue, 1 Apr 2003, Goldilox wrote: > I guess I figured out that Perl doesn't handle NULL cells in a database at all > (other than spewing warnings everywhere). Does anybody have a clue why this > would be? What sort of warnings? Look for the string NULL in the DBI man page then you too might have a place to start looking... > My next question is in regards to running one of my scripts. I run one script > (or plan to run it) every ten minutes to create a cache of database output for > web users (since this server could easily be getting a lot of traffic during > bad weather). On my machine here it runs at 100% processor power for the entire > time it runs (couple minutes). I haven't tried it yet on the more powerful web > server (Windows 2000 server), but I am curious if there is anything I need to > do to make the script run at less than 100% to allow the server to accomplish > its other tasks without being bogged down my my script running in the > background? I guess this is probably a sysadmin question rather than a Perl > question - but I figured someone here might have run into the same problem? What system are you running on? What is the nature of the task? One way to go at it might beIt may be to run the cache creation task at a lower priority (it would still use 100% of the CPU, but would give it up more easily if another task came along.) Alternatively you could cache results as you generate them (if generating an individual result isn't too costly) and expire them after a while. There are modules on CPAN which can help out here. That is just some arm-waving, so feel free to torch it! Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA From wwalker at broadq.com Tue Apr 1 13:34:37 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:16 2004 Subject: APM: running at 100% processor In-Reply-To: References: Message-ID: <20030401193437.GG11645@broadq.com> On Tue, Apr 01, 2003 at 12:08:18PM -0600, Goldilox wrote: > Hi, I'm back again. > > I guess I figured out that Perl doesn't handle NULL cells in a database at all > (other than spewing warnings everywhere). Does anybody have a clue why this > would be? Be more specific. I use Perl::DBI for 99% of my database driven apps and there are lots of NULL fields. perl will normally return undef for a NULL field. > My next question is in regards to running one of my scripts. I run one script > (or plan to run it) every ten minutes to create a cache of database output for > web users (since this server could easily be getting a lot of traffic during > bad weather). On my machine here it runs at 100% processor power for the entire > time it runs (couple minutes). I haven't tried it yet on the more powerful web > server (Windows 2000 server), but I am curious if there is anything I need to > do to make the script run at less than 100% to allow the server to accomplish > its other tasks without being bogged down my my script running in the > background? I guess this is probably a sysadmin question rather than a Perl > question - but I figured someone here might have run into the same problem? Any well written application on a well written operating system will use 100% of the available processor if no other process needs the CPU. Find a BIG file (foo) and run this: gzip -9 foo & when your ap is using 100%. You should see that gzip almost immediately gets 50% of the CPU. Now run renice 20 gzip will probably get about 80% of the CPU now since your app has said it is "nice" and therefore should get a lesser amount of CPU when other higher priority processes need the CPU, but notice that even when "niced" the nice process still gets CPU, just not as much as it would have if "normal" priority. Now, kill gzip. Notice that even though your app is nice 20, giving up as much cpu as the scheduler will allow to other processes, your app is again using nearly 100% of the CPU time. As it should until another process wants the CPU. > > Rhett > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From msouth at fulcrum.org Tue Apr 1 15:04:20 2003 From: msouth at fulcrum.org (Mike South) Date: Mon Aug 2 21:23:16 2004 Subject: APM: running at 100% processor Message-ID: <200304012104.QAA18925@scan.shodor.org> >From austin-admin@mail.pm.org Tue Apr 1 13:11:34 2003 > >Hi, I'm back again. > >I guess I figured out that Perl doesn't handle NULL cells in a database at all >(other than spewing warnings everywhere). Does anybody have a clue why this >would be? > Is your problem that you are getting NULLs out of the database, and then trying to use the variables you stored them in as if there were something in it? Can you show us the smallest snippet of code that produces the warning, and the warning? For example (untested code): my ($fistname, $lastname) = $dbh->selectrow_array( 'select firstname, lastname from customers where id = 1 ' ); print "Hello, $fistname $lastname\n"; If, say, firstname is null for customer 1, that will produce a warning about usingn an unintialized value in a string. To avoid that you could do something like $firstname = '' unless defined $firstname; print "Hello, $fistname $lastname\n"; explicitly setting it to the empty string, rather than undef, if it's undefined. mike From Goldilox at teachnet.edb.utexas.edu Tue Apr 1 15:27:59 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: <200304012104.QAA18925@scan.shodor.org> References: <200304012104.QAA18925@scan.shodor.org> Message-ID: Thanks for all the response - I had sent an email (I thought) to this group and got no response about the NULL problem what's the difference between austin-pm@pm.org and austin@mail.pm.org? anyway I'll start over: >> Microsoft SQL7 database. I have various cells in the database >> that are set to >> >> NULL >> >> (I had to spend a lot of time tracking them down to find what >> was causing the >> warnings) use CGI;my $cg=new CGI; use DBI; use DBD::ODBC; my $dbh = DBI->connect('dbi:ODBC:HydrometSQL','user','pass') || die "Database connection not made: $DBI::errstr"; my $sql = qq{select sensordef.sensor_number, site.site_name from (sensordef INNER JOIN site ON sensordef.site_id = site.site_id) where sensordef.sensor_number > 99999 and site.in_service <> 0 and sensordef.in_service <> 0 order by site.site_number}; my $newsth = $dbh->prepare( $sql ) ||die "Couldn't prepare statement: $DBI::errstr"; > >> >> This one works the best so far, but still gives an >> uninitialized variable >> warning when a NULL is encountered: >> >> while(my @newdata = $newsth->fetchrow_array()){ >> print "Before: $newdata[1] - $newdata[2]\n"; >> $newdata[1] = "N/A" if $newdata[1] eq ""; >> $dataone=$newdata[1]; >> $newdata[2] = "N/A" if $newdata[2] eq ""; >> $datatwo=$newdata[2]; >> $newdata[3] = "N/A" if $newdata[3] eq ""; >> print "After: $newdata[1] - $newdata[2] - $newdata[3]\n"; >> $datathree=$newdata[3]; >> $htmldata=$htmldata.qq~$dataone> align="right">$datatwo> align="right">$datathree~; >> } >> >> I have tried: >> >> 1) >> $newdata[3] = "N/A" if undef $newdata[3]; >> >> >> 2) >> $newdata[3] = "N/A" if $newdata[3] eq "NULL";#(OK, this was >> dumb - but I wanted >> to say I tried it) >> >> >> 3) >> and I have tried: $newsth->fetchall_arrayref (with >> appropriate trappings) >> >> >> No matter what, I get an uninitialized variable warning >> whenever there is a >> database cell designated as NULL. I need the script to run >> without these >> warnings appearing. >> (the reason I need the warnings to disappear is: I want to >> use Perl for >> database needs, currently some Frontpage generated ASP code >> is being used, and >> the error handling of the ASP detects these NULL fields - I >> need Perl to run >> just as cleanly because the folks who maintain the ASP code >> don't want me using >> Perl since they only know ASP - it's a weird situation, I >> know, but I want to >> show Perl can do the job just as cleanly, but I haven't been >> able to do that >> yet) >> >> Help? >> >> Rhett I guess I'm hearing that the Perl script will let go of the processor as much as it needs when web server requests come in. I'll be going with that and trying it for now anyway. I hope I'm not being too confusing here. Rhett From dbii at mudpuddle.com Tue Apr 1 15:46:13 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor Message-ID: >>> while(my @newdata = $newsth->fetchrow_array()){ >>> print "Before: $newdata[1] - $newdata[2]\n"; >>> $newdata[1] = "N/A" if $newdata[1] eq ""; ... >>> 1) >>> $newdata[3] = "N/A" if undef $newdata[3]; Do you mean you tried: $newdata[3] = "N/A" if ! defined $newdata[3]; or what you wrote? undef undefines the value, while defined checks if it is defined. Maybe that was the problem? David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From Goldilox at teachnet.edb.utexas.edu Tue Apr 1 15:51:53 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: References: Message-ID: dbii@mudpuddle.com writes: >>>> while(my @newdata = $newsth->fetchrow_array()){ >>>> print "Before: $newdata[1] - $newdata[2]\n"; >>>> $newdata[1] = "N/A" if $newdata[1] eq ""; >... >>>> 1) >>>> $newdata[3] = "N/A" if undef $newdata[3]; > >Do you mean you tried: > > $newdata[3] = "N/A" if ! defined $newdata[3]; > >or what you wrote? undef undefines the value, while defined checks if it is >defined. Maybe that was the problem? > actually I tried > $newdata[3] = "N/A" unless > defined $newdata[3]; but I thought I was being dumb because defined is only for arrays and I am dealing with a scalar variable - so I didn't mention it here. It gave me the same warnings "uninitialized variable in string or concatenation". Rhett > > > > > From jimleona at cisco.com Tue Apr 1 16:12:35 2003 From: jimleona at cisco.com (Jim Leonard) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: Message-ID: <008d01c2f89b$cd00db80$6601a8c0@amer.cisco.com> The warnings sound like they are coming from perl using the "-w" option when you are doing the fetchrow. If everything is working well and the only problem is the warning for an unitialized variable ( the 'chatty' side of -w ) then by all means turn off -w. You can turn it back on when you are back editing or testing. Jim > -----Original Message----- > From: austin-admin@mail.pm.org > [mailto:austin-admin@mail.pm.org] On Behalf Of Goldilox > Sent: Tuesday, April 01, 2003 3:52 PM > To: austin@mail.pm.org > Subject: Re: APM: Null fields and 100% porcessor > > > dbii@mudpuddle.com writes: > >>>> while(my @newdata = $newsth->fetchrow_array()){ > >>>> print "Before: $newdata[1] - $newdata[2]\n"; > >>>> $newdata[1] = "N/A" if $newdata[1] eq ""; > >... > >>>> 1) > >>>> $newdata[3] = "N/A" if undef $newdata[3]; > > > >Do you mean you tried: > > > > $newdata[3] = "N/A" if ! defined $newdata[3]; > > > >or what you wrote? undef undefines the value, while defined > checks if it is > >defined. Maybe that was the problem? > > > actually I tried > > $newdata[3] = "N/A" > unless > > defined $newdata[3]; > > but I thought I was being dumb because defined is only for > arrays and I am > dealing with a scalar variable - so I didn't mention it here. > It gave me the > same warnings "uninitialized variable in string or concatenation". > > Rhett > > > > > > > > > > > > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin > From wwalker at broadq.com Tue Apr 1 16:20:17 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: References: <200304012104.QAA18925@scan.shodor.org> Message-ID: <20030401222017.GC18202@broadq.com> On Tue, Apr 01, 2003 at 03:27:59PM -0600, Goldilox wrote: > Thanks for all the response - I had sent an email (I thought) to this group and > got no response about the NULL problem > > what's the difference between austin-pm@pm.org and austin@mail.pm.org? Errmmm, I think Monday had a lot to do with it. I saw your other email yesterday but the Modays-suck monster kept me too busy to respond. I suspect others were similarly inundated. > I guess I'm hearing that the Perl script will let go of the processor as much > as it needs when web server requests come in. I'll be going with that and > trying it for now anyway. True. > I hope I'm not being too confusing here. Most problems that require help are sufficiently complex to create confusion :) > Rhett > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From wwalker at broadq.com Tue Apr 1 16:24:51 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: <008d01c2f89b$cd00db80$6601a8c0@amer.cisco.com> References: <008d01c2f89b$cd00db80$6601a8c0@amer.cisco.com> Message-ID: <20030401222451.GD18202@broadq.com> On Tue, Apr 01, 2003 at 04:12:35PM -0600, Jim Leonard wrote: > The warnings sound like they are coming from perl using the "-w" option > when you are doing the fetchrow. If everything is working well and the > only problem is the warning for an unitialized variable ( the 'chatty' > side of -w ) then by all means turn off -w. You can turn it back on when > you are back editing or testing. > > Jim OR, in your personal user account set: PERL5OPT='-w' export PERL5OPT or (for *csh users) setenv PERL5OPT '-w' Now when you run any program (theoretically for debug or development) warnings will be on. When it runs from cron or a webserver, PERL5OPT won't be set to -w so warnings will be off. YMMV, Wayne From msouth at fulcrum.org Wed Apr 2 08:06:20 2003 From: msouth at fulcrum.org (Mike South) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor Message-ID: <200304021406.JAA11882@scan.shodor.org> >From: "Goldilox" >Date: Tue, 01 Apr 2003 15:51:53 -0600 > >dbii@mudpuddle.com writes: >>>>> while(my @newdata = $newsth->fetchrow_array()){ >>>>> print "Before: $newdata[1] - $newdata[2]\n"; >>>>> $newdata[1] = "N/A" if $newdata[1] eq ""; >>... >>>>> 1) >>>>> $newdata[3] = "N/A" if undef $newdata[3]; >> >>Do you mean you tried: >> >> $newdata[3] = "N/A" if ! defined $newdata[3]; >> >>or what you wrote? undef undefines the value, while defined checks if it is >>defined. Maybe that was the problem? >> >actually I tried >> $newdata[3] = "N/A" > unless >> defined $newdata[3]; > >but I thought I was being dumb because defined is only for arrays and I am >dealing with a scalar variable - so I didn't mention it here. Actually, the use of defined() on arrays is deprecated (which I didn't know until I looked at 'perldoc -f defined'). defined() is good for scalars as well as subroutines and I can't remember what else. I'm not sure how literally to take your code, but, if I'm reading it right, nothing you do will fix the problem until you move that print statement down below the 'fix the problem' part: while(my @newdata = $newsth->fetchrow_array()){ # this print statement puts a potentionally uninitialized # variable in string, generating a warning print "Before: $newdata[1] - $newdata[2]\n"; # here is where you are trying to define potential undefs $newdata[1] = "N/A" if $newdata[1] eq ""; If you do something like this: while(my @newdata = $newsth->fetchrow_array()){ # every undef in @newdata will get set to "N/A" here for (@newdata) { $_ = 'N/A' unless defined $_ }; print "after: $newdata[1] - $newdata[2]\n"; ... } you won't be interpolating $newdata[1] into the string until after you have done the check/correction for undefs. It looks to me like you might have tried more than one thing that would have fixed your problem, but you were always doing it _after_ you had already used the undef variables in a print(), which generates the warning you say you are getting. mike >It gave me the >same warnings "uninitialized variable in string or concatenation". > >Rhett From mike at stok.co.uk Wed Apr 2 09:33:49 2003 From: mike at stok.co.uk (Mike Stok) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% porcessor In-Reply-To: <200304021406.JAA11882@scan.shodor.org> Message-ID: On Wed, 2 Apr 2003, Mike South wrote: > If you do something like this: > > while(my @newdata = $newsth->fetchrow_array()){ > > # every undef in @newdata will get set to "N/A" here > for (@newdata) { $_ = 'N/A' unless defined $_ }; > > print "after: $newdata[1] - $newdata[2]\n"; > > ... > } > > you won't be interpolating $newdata[1] into the string until after > you have done the check/correction for undefs. This may not be applicable to your particular code, but you can take advantage of .= not generating warnings when you catenate onto an undef value, so you can avoid an explicit test for definedness if you're just planning to print some strings e.g. #!/usr/bin/env perl use warnings; @list = ('foo', 'bar', undef, '', 'baz'); print "List is @list\n"; $_ .= '' foreach @list; print "List is @list\n"; __END__ The first print will grumble but the second is OK. This is foe interest's sake only. Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA From Goldilox at teachnet.edb.utexas.edu Fri Apr 4 00:08:09 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Null fields and 100% processor Message-ID: Hate to answer Jeopardy style - just wanted to say I had been trying all kinds of things - but I was seeing if the warning generated by the print "Before:.." would disappear in the print "After:.." statement. I had to watch for the warnings since they were in odd places I wasn't expecting. Thanks again to everyone for their patience with me. Rhett msouth@fulcrum.org writes: >>From: "Goldilox" >>Date: Tue, 01 Apr 2003 15:51:53 -0600 >>but I thought I was being dumb because defined is only for arrays and I am >>dealing with a scalar variable - so I didn't mention it here. > >Actually, the use of defined() on arrays is deprecated (which I didn't >know until I looked at 'perldoc -f defined'). defined() is good for >scalars as well as subroutines and I can't remember what else. > >I'm not sure how literally to take your code, but, if I'm reading it right, >nothing you do will fix the problem until you move that print statement >down below the 'fix the problem' part: > > while(my @newdata = $newsth->fetchrow_array()){ > > # this print statement puts a potentionally uninitialized > # variable in string, generating a warning > print "Before: $newdata[1] - $newdata[2]\n"; > > # here is where you are trying to define potential undefs > $newdata[1] = "N/A" if $newdata[1] eq ""; > >If you do something like this: > > while(my @newdata = $newsth->fetchrow_array()){ > > # every undef in @newdata will get set to "N/A" here > for (@newdata) { $_ = 'N/A' unless defined $_ }; > > print "after: $newdata[1] - $newdata[2]\n"; > > ... > } > >you won't be interpolating $newdata[1] into the string until after >you have done the check/correction for undefs. > >It looks to me like you might have tried more than one thing that >would have fixed your problem, but you were always doing it _after_ >you had already used the undef variables in a print(), which generates >the warning you say you are getting. > >mike > >>It gave me the >>same warnings "uninitialized variable in string or concatenation". >> >>Rhett >_______________________________________________ >Austin mailing list >Austin@mail.pm.org >http://mail.pm.org/mailman/listinfo/austin From Goldilox at teachnet.edb.utexas.edu Fri Apr 4 17:49:19 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: creating a hash Message-ID: I'm having trouble getting a hash to see everything like I want it too. I need some hash values to have single quotes around them, for example 'RA' And then other elements that have spaces Stage and Flow thus: %stypes={''RA''=>'Rainfall', ''ST''=>'Stage' }; Error: Bad name after RA' so I try this: %stypes={"'RA'"=>"Rainfall", "'ST'"=>"Stage and Flow" }; Error: Reference found where even-sized list expected I've created a reference? I'd like to do this: %stypes=qw{ 'RA' Rainfall 'ST' Stage and Flow }; but I'd have to change the input separator to take Stage and Flow as one element I've been able to find the special variable for the array output separator ( i.e. $" ) but not one for an input separator, nor one specifically for hashes either (input or output) any help? Rhett From ian at SKYLIST.net Fri Apr 4 17:56:40 2003 From: ian at SKYLIST.net (Ian Ragsdale) Date: Mon Aug 2 21:23:17 2004 Subject: APM: creating a hash In-Reply-To: Message-ID: On 4/4/03 5:49 PM, "Goldilox" wrote: > I'm having trouble getting a hash to see everything like I want it too. > I need some hash values to have single quotes around them, for example > so I try this: > > %stypes={"'RA'"=>"Rainfall", > "'ST'"=>"Stage and Flow" > }; > > Error: Reference found where even-sized list expected > > I've created a reference? > Yes, you've created a reference. The curly brackets make it a hash reference, so what you actually want is parentheses, like this: > %stypes=("'RA'"=>"Rainfall", > "'ST'"=>"Stage and Flow" > ); It's a common mistake - I've been writing perl for years and still do that every now and then. :) From Goldilox at teachnet.edb.utexas.edu Fri Apr 4 18:06:35 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: creating a hash In-Reply-To: References: Message-ID: Doh! OK, I'll go hide now. Rhett ian@skylist.net writes: >On 4/4/03 5:49 PM, "Goldilox" wrote: > >> I'm having trouble getting a hash to see everything like I want it too. >> I need some hash values to have single quotes around them, for example >> so I try this: >> >> %stypes={"'RA'"=>"Rainfall", >> "'ST'"=>"Stage and Flow" >> }; >> >> Error: Reference found where even-sized list expected >> >> I've created a reference? >> > >Yes, you've created a reference. The curly brackets make it a hash >reference, so what you actually want is parentheses, like this: > >> %stypes=("'RA'"=>"Rainfall", >> "'ST'"=>"Stage and Flow" >> ); > >It's a common mistake - I've been writing perl for years and still do that >every now and then. :) > > >_______________________________________________ >Austin mailing list >Austin@mail.pm.org >http://mail.pm.org/mailman/listinfo/austin From dbii at mudpuddle.com Tue Apr 8 10:06:27 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: CommerceSQL Shopping Cart? Message-ID: I have a client who wants to use the CommerceSQL Shopping Cart (http://www.commercesql.com/) on their site for various reasons. Anyone have any experience with it, or more importantly heard anything bad security or management wise? Looks easy to install, but didn't know if anyone had any experience with it that could comment. David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From wwalker at broadq.com Tue Apr 8 12:27:24 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: CommerceSQL Shopping Cart? In-Reply-To: References: Message-ID: <20030408172724.GB1149@broadq.com> It passes my first test: Google.com says: Your search - CommerceSQL bugtraq - did not match any documents. On Tue, Apr 08, 2003 at 10:06:27AM -0500, David Bluestein II wrote: > I have a client who wants to use the CommerceSQL Shopping Cart > (http://www.commercesql.com/) on their site for various reasons. > > Anyone have any experience with it, or more importantly heard anything bad > security or management wise? Looks easy to install, but didn't know if > anyone had any experience with it that could comment. > > David > > ---------- > David H. Bluestein II President & Lead Developer > dbii@interaction.net ii, inc. > > http://www.interaction.net > - Specializing in Designing Interactive Websites - > - and Searchable Internet Databases - > > > > > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From jeremyb at univista.com Thu Apr 10 11:39:13 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:17 2004 Subject: APM: follow HREF='Javascript.... Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A763@MINIBOX> I'm putting together an API of sorts for Outlook Web Access on Exchange 5.5 and 2000. I only need access to Calendar and Tasks. I have the Calendar portion figured out but the Tasks folder is a little more difficult to get to ....it requires more clicking from a browser. The frame source containing the private folders button has the following HREF to the private foldere list where the Tasks folder lives: new; $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1)); # use the username above to select a mailbox. ...Then login my $req = HTTP::Request->new(GET => "$url"); $req->authorization_basic($username, $password); print $ua->request($req)->as_string; my $rc = $ua->request($req); # Follow the "main_fr" frame ...this probably isn't needed but I'll get to that later. if ($rc->as_string =~ /SRC="(.*)"\sname="(main_fr)"/i) { print "found $2: $1\n appending to $root_url to GET: \n $root_url$1\n\n"; $req = new HTTP::Request("GET", "$root_url$1"); # try to select the private folder list $rc = $ua->request($req, 'Javascript:parent.SetNewFolderPick("0000000045B57431BE491B4D9D4DD0878C6C206 E0100405A4B20FCF8D41192CF0050DA1802C20000002D4CC10000")'); } # access peer_fr frame after selecting the private folder ID above. # Hope it gives you the list of folders. ...but it doesn't if ($rc->as_string =~ /SRC="(.*)"\sname="(peer_fr)"/i) { print "found $2: $1\n appending to $root_url to GET: \n $root_url$1\n\n"; $req = new HTTP::Request("GET", "$root_url$1"); $rc = $ua->request($req); print $rc->content; } -thanks in advance, Jeremy From jeremyb at univista.com Thu Apr 10 13:32:28 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:17 2004 Subject: APM: RE: follow HREF='Javascript.... Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A766@MINIBOX> well, I think I'm getting close... I need to find someway to support js in the script since LWP can't do it alone. Any tips would be greatly appreciated. -----Original Message----- From: jeremyb@univista.com To: austin@mail.pm.org Sent: 4/10/03 11:39 AM Subject: APM: follow HREF='Javascript.... I'm putting together an API of sorts for Outlook Web Access on Exchange 5.5 and 2000. I only need access to Calendar and Tasks. I have the Calendar portion figured out but the Tasks folder is a little more difficult to get to ....it requires more clicking from a browser. The frame source containing the private folders button has the following HREF to the private foldere list where the Tasks folder lives: new; $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1)); # use the username above to select a mailbox. ...Then login my $req = HTTP::Request->new(GET => "$url"); $req->authorization_basic($username, $password); print $ua->request($req)->as_string; my $rc = $ua->request($req); # Follow the "main_fr" frame ...this probably isn't needed but I'll get to that later. if ($rc->as_string =~ /SRC="(.*)"\sname="(main_fr)"/i) { print "found $2: $1\n appending to $root_url to GET: \n $root_url$1\n\n"; $req = new HTTP::Request("GET", "$root_url$1"); # try to select the private folder list $rc = $ua->request($req, 'Javascript:parent.SetNewFolderPick("0000000045B57431BE491B4D9D4DD0878C6 C206 E0100405A4B20FCF8D41192CF0050DA1802C20000002D4CC10000")'); } # access peer_fr frame after selecting the private folder ID above. # Hope it gives you the list of folders. ...but it doesn't if ($rc->as_string =~ /SRC="(.*)"\sname="(peer_fr)"/i) { print "found $2: $1\n appending to $root_url to GET: \n $root_url$1\n\n"; $req = new HTTP::Request("GET", "$root_url$1"); $rc = $ua->request($req); print $rc->content; } -thanks in advance, Jeremy _______________________________________________ Austin mailing list Austin@mail.pm.org http://mail.pm.org/mailman/listinfo/austin From hrunting at texas.net Thu Apr 10 13:52:23 2003 From: hrunting at texas.net (Philip Molter) Date: Mon Aug 2 21:23:17 2004 Subject: APM: RE: follow HREF='Javascript.... In-Reply-To: <405A4B20FCF8D41192CF0050DA1802C250A766@MINIBOX> Message-ID: On Thu, 10 Apr 2003 jeremyb@univista.com wrote: : well, I think I'm getting close... I need to find someway to support js : in the script : since LWP can't do it alone. Any tips would be greatly appreciated. There is a JavaScript module, but that is for executing embedded JavaScript code. That will work for simple things, like doing calculations, but most JavaScript found in web pages updates browser window form widgets and layers and form data structures, so unless you're willing to write, in essence, a web browser in Perl to handle such widgets, you'd be out of luck in those circumstances. You'd have to take a look at what SetNewFolderPick() actually does and see if you can emulate its functionality in your Perl code. --------------------------------------------- Hrunting -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GO/FA/CS d- s++: a--->? C++ US P+>++++ L+>++ E--- W+++$ N++ o-- K- w O- M-- V-- PS PE Y+ PGP++ t+ 5+ X+++ R* tv+ b++ DI++++ D++ G e>++++ h r+ y+ ------END GEEK CODE BLOCK------ From horshack at lisa.franken.de Sat Apr 12 07:42:57 2003 From: horshack at lisa.franken.de (Richard Lippmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: How to find out my current subroutine name? Message-ID: <5.1.1.2.2.20030412144025.05939cf0@gatekeeper.rosi13.de> Hi, for debugging purposes I want to find out the name of the current subroutine. How can I find it out? I usually do this, which is poor: sub drink { my $subr = "drink"; printf "%s is not yet implemented\n", $subr; } I tried caller(0), caller(1),... but it never tell me the subroutines name. Thanks for hints, Horshack -- Richard Lippmann, Findus Internet-OPAC Findus, see http://www.hultsfred.de Private, see http://lena.franken.de From lhunter at lhunter.com Sat Apr 12 09:00:50 2003 From: lhunter at lhunter.com (Larry Hunter) Date: Mon Aug 2 21:23:17 2004 Subject: APM: How to find out my current subroutine name? In-Reply-To: <5.1.1.2.2.20030412144025.05939cf0@gatekeeper.rosi13.de> Message-ID: <5.2.0.9.0.20030412085901.018bee68@lhunter.com> The bighorn book says you want (caller(0))[3] . caller(0) gives a list of things and the subroutine is the fourth element. At 02:42 PM 4/12/2003 +0200, Richard Lippmann wrote: >Hi, for debugging purposes I want to find out the name of the current >subroutine. How can I find it out? > >I usually do this, which is poor: > >sub drink { > my $subr = "drink"; > printf "%s is not yet implemented\n", $subr; >} > >I tried caller(0), caller(1),... but it never tell me the subroutines name. >Thanks for hints, >Horshack > >-- >Richard Lippmann, Findus Internet-OPAC >Findus, see http://www.hultsfred.de >Private, see http://lena.franken.de > >_______________________________________________ >Austin mailing list >Austin@mail.pm.org >http://mail.pm.org/mailman/listinfo/austin ------------------------------------------------------------------------ Larry Hunter lhunter@lhunter.com http://lhunter.com/ From msouth at fulcrum.org Sat Apr 12 09:09:46 2003 From: msouth at fulcrum.org (Mike South) Date: Mon Aug 2 21:23:17 2004 Subject: APM: How to find out my current subroutine name? Message-ID: <200304121409.KAA07801@scan.shodor.org> >From austin-admin@mail.pm.org Sat Apr 12 08:44:31 2003 >X-Sender: horshack@gatekeeper.rosi13.de > >Hi, for debugging purposes I want to find out the name of the current >subroutine. How can I find it out? > >I usually do this, which is poor: > >sub drink { > my $subr = "drink"; > printf "%s is not yet implemented\n", $subr; >} > >I tried caller(0), caller(1),... but it never tell me the subroutines name. >Thanks for hints, >Horshack caller() is weird, and perldoc -f caller doesn't really help much. You need to call it in list context with an argument of 0 and then item 3 of the array it returns will be what you want. &foo; sub foo { print "the sub is ", (caller(0))[3], "\n"; # or, less fancily @yo = caller(0); print "(again) the sub is ", $yo[3],"\n"; } __END__ Unrelated aside: For a second I thought I was going crazy because I had print (caller(0))[3]; and it was giving me a syntax error at ')['. Then I realized (I guess) that it was because that opening paren belongs to print(). I couldn't think of any satisfying way to get around that. Prepending with ''. was the best I could come up wtih. (You can name STDOUT explicitly, but that's both more typing and not equivalent, since STDOUT might not have been selected). mike PS I joined this list because my job was going to move me to Austin. That fell through, but we are still looking at moving there (to be near family). If anyone knows of any perl jobs there I would appreciate an email. I have a resume and perl summary up at http://fulcrum.org/msouth/resume.txt and http://fulcrum.org/msouth/perl_summary.txt. From horshack at lisa.franken.de Sat Apr 12 09:19:27 2003 From: horshack at lisa.franken.de (Richard Lippmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: How to find out my current subroutine name? In-Reply-To: <200304121409.KAA07801@scan.shodor.org> Message-ID: <5.1.1.2.2.20030412161432.0574fff8@gatekeeper.rosi13.de> At 10:09 12.04.2003 -0400, Mike South wrote: > >Hi, for debugging purposes I want to find out the name of the current > >subroutine. How can I find it out? You all are right, this made it for me: sub cmdStart { printf "%s not yet coded.\n", (caller(0))[3]; exit; } >PS I joined this list because my job was going to move me to >Austin. That fell through, but we are still looking at >moving there (to be near family). If anyone knows of any >perl jobs there I would appreciate an email. I have a >resume and perl summary up at http://fulcrum.org/msouth/resume.txt >and http://fulcrum.org/msouth/perl_summary.txt. Mike, this is Germany calling :-) I am for a visit in Austin in June 2003. Don't despair, Austin is a great city to live. There will be an opportinity. Greetings, Horshack -- Richard Lippmann, Findus Internet-OPAC Findus, see http://www.hultsfred.de Private, see http://lena.franken.de From jeremyb at univista.com Mon Apr 14 18:23:05 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:17 2004 Subject: APM: two part auth in CGI on Apache Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A770@MINIBOX> Perlites, I have a dir called content/ in a protected realm called owapi/ on my test Apache server. The content in content/ is regenerated every two minute by owapi.pl. Thus, the content can be served using Location: redirects to /content/stuff.html from the owapi.pl instead of having owapi.pl generate all the content on the fly. Users must authenticate themselves with a username and password prior to recieving the redirect. Furthermore, the interface used for authentication must be portable to WAP devices. That means that the pop-up authentication Apache uses on protected realms is out because it's too cumbersome for WAP. Given that stipulation, the authentication interface I'm using is a simple form that uses owapi.pl and it's internal auth mechanism to check param( username ) and param( password ) against and list of users and passwords. The same form is displayed in wml or html depending what Apache thinks your User-Agent is. The problem I'm anticipating, though I'm not there yet, is that once joeblow has authenticated using owapi.pl via the simple form, he may run into trouble when owapi.pl redirects his browser to a relative url like /content/stuff.html in the protected realm. He'll probably get another login prompt from Apache. This doesn't make for a pleasant user experience. I could get away with having owapi.pl render all the content and use no redirects but the traffic on this server will be very high and I want to minimize CGI run time as much as possible. ==Now, here's my question== To avoid getting the second login prompt from Apache upon redirect to a file in the protected realm, is it possible to use the values of param() to have owapi.pl authenticate to Apache on joeblow's behalf? ============================ thanks in advance, Jeremy From jeremyb at univista.com Mon Apr 14 22:15:28 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:17 2004 Subject: APM: two part auth in CGI on Apache Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A771@MINIBOX> Perlites, I have a dir called content/ in a protected realm called owapi/ on my test Apache server. The content in content/ is regenerated every two minute by owapi.pl. Thus, the content can be served using Location: redirects to /content/stuff.html from the owapi.pl instead of having owapi.pl generate all the content on the fly. Users must authenticate themselves with a username and password prior to recieving the redirect. Furthermore, the interface used for authentication must be portable to WAP devices. That means that the pop-up authentication Apache uses on protected realms is out because it's too cumbersome for WAP. Given that stipulation, the authentication interface I'm using is a simple form that uses owapi.pl and it's internal auth mechanism to check param( username ) and param( password ) against and list of users and passwords. The same form is displayed in wml or html depending what Apache thinks your User-Agent is. The problem I'm anticipating, though I'm not there yet, is that once joeblow has authenticated using owapi.pl via the simple form, he may run into trouble when owapi.pl redirects his browser to a relative url like /content/stuff.html in the protected realm. He'll probably get another login prompt from Apache. This doesn't make for a pleasant user experience. I could get away with having owapi.pl render all the content and use no redirects but the traffic on this server will be very high and I want to minimize CGI run time as much as possible. ==Now, here's my question== To avoid getting the second login prompt from Apache upon redirect to a file in the protected realm, is it possible to use the values of param() to have owapi.pl authenticate to Apache on joeblow's behalf? ============================ thanks in advance, Jeremy From mlehmann at marklehmann.com Tue Apr 15 11:14:01 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Meeting tommorow night. Message-ID: <16028.12233.834996.681579@lehmbrain.marklehmann.com> I appologize that I didn't send out an earlier announcment. Please respond to the *GROUP* if you are going to the meeting this Wednesday. If not enough people can go this Wednesday, I'll postpone to next week. -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From dbii at mudpuddle.com Tue Apr 15 12:05:57 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Tomorrow's Meeting Topic? Message-ID: Hey Mark- What's the meeting topic for tomorrow? Haven't seen a post to the list, and the website still has last months info. David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From wwalker at broadq.com Tue Apr 15 22:21:47 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Testing Message-ID: <20030416032147.GA7368@broadq.com> Testing number 3 Please reply to wwalker@broadq.com if you get this. -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From mlehmann at marklehmann.com Wed Apr 16 09:29:53 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Meeting postponed Message-ID: <16029.26849.75852.668372@lehmbrain.marklehmann.com> The Austin Perl Monger's meeting is postponed. The tentative new date is next Wednesday. In addition to November and December, we are going to add the month that Passover/Easter falls in for an irregular schedule. -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From wwalker at broadq.com Wed Apr 16 09:57:24 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Thanks for the replies Message-ID: <20030416145724.GB9841@broadq.com> Thanks for all the replies. The main pm.org server was pointed at a broken DNS server. I needed to be sure that most everyone was getting the messages (i.e., that changing DNS servers really fixed everything). No need to reply further. -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From dbii at mudpuddle.com Wed Apr 16 10:19:54 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Meeting Topic? Message-ID: Mark- Though the meeting is postponed until next week, can you tell us what the topic is so we can anticipate it all week? David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From wwalker at broadq.com Wed Apr 16 10:29:27 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Informal Social Meeting Message-ID: <20030416152926.GA10041@broadq.com> Although the official meeting is postponed, I plan to be at the PokeJo's for dinner at 6:00 any way. For anyone new to the group who decides to show, you can identify the table by looking for the bright blu/turquoise T-shirt (Perl Conference :) with a pony tail. Just figured some people already made a hole in their schedule... If you skip the dinner, use the time to write a post on the QCast Tuner thread on SlashDot. :) -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From itnomad at earthlink.net Wed Apr 16 14:21:49 2003 From: itnomad at earthlink.net (Jack Lupton) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Informal Social Meeting In-Reply-To: <20030416152926.GA10041@broadq.com> References: <20030416152926.GA10041@broadq.com> Message-ID: <1050520909.2664.89.camel@jacktosh> I'll be the guy in the MySQL conference t-shirt :) We'll have to compare notes. On Wed, 2003-04-16 at 10:29, Wayne Walker wrote: > Although the official meeting is postponed, I plan to be at the PokeJo's > for dinner at 6:00 any way. For anyone new to the group who decides to > show, you can identify the table by looking for the bright blu/turquoise > T-shirt (Perl Conference :) with a pony tail. > > Just figured some people already made a hole in their schedule... > > If you skip the dinner, use the time to write a post > on the QCast Tuner thread on SlashDot. :) -- Jack Lupton itnomad@earthlink.net This message was composed using Ximian Evolution on a Red Hat 9 desktop From mlehmann at marklehmann.com Wed Apr 16 16:13:53 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: I'll be at the dinner tonight. Message-ID: <16029.51089.515722.549656@lehmbrain.marklehmann.com> I hope that does not convince anyone to stay away. -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From itnomad at earthlink.net Wed Apr 16 19:42:33 2003 From: itnomad at earthlink.net (Jack Lupton) Date: Mon Aug 2 21:23:17 2004 Subject: APM: I got lost Message-ID: <1050540152.3406.13.camel@saloon> I got lost. Thought I knew where I was going, ended up at PokE-Joes on 5th Street, got stuck in traffic, wandered around the arboretum following a waiters directions, and went home. Just spent 3 days in San Jose, and 3 days in Oakland. Never had any problems getting around and have never been to either place before. Been here for three years and sometimes can't make my way to the nearest grocery store without construction detours and 4 or 5 four-way stops. I think I owe you guys some beers, too. Maybe next week. Y'all bail me out of my Linux problems on about a weekly basis lately. You know what they say about a little knowledge. Later on. -- Jack Lupton itnomad@earthlink.net This message has been composed using Ximian Evolution on a Red Hat 9 desktop From eharris at puremagic.com Fri Apr 18 01:41:00 2003 From: eharris at puremagic.com (Evan Harris) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Help with Sendmail::Milter Message-ID: I'm trying to write some code to test out some new theories on spam filtering with sendmail and milter. I've found the Sendmail::Milter project on sourceforge and tried to install it to get it to work, but am getting an error. I followed the instructions for building and installing it, but when trying to run the sample script that is distributed with it, I get: perl: relocation error: /usr/src/Sendmail-Milter-0.18/blib/arch/auto/Sendmail/Milter/Milter.so: undefined symbol: smfi_setconn I'm not familiar with that error, though smfi_setconn is supposed to be defined by the milter interface. Any ideas what might be wrong? The system is a Debian Linux install with sendmail 8.12.9. Or, if anyone has a better suggestion for how to easily interface with sendmail milter from perl, I'd love to hear about it. Evan From eharris at puremagic.com Fri Apr 18 02:06:21 2003 From: eharris at puremagic.com (Evan Harris) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Re: Help with Sendmail::Milter In-Reply-To: Message-ID: Well, I think I figured it out. I was apparently using a wrong directory as an argument to the perl Makefile.PL command. But, if anyone knows of another method to do sendmail milter from perl, I'd still like to hear about it. Thanks. Evan On Fri, 18 Apr 2003, Evan Harris wrote: > > I'm trying to write some code to test out some new theories on spam > filtering with sendmail and milter. I've found the Sendmail::Milter project > on sourceforge and tried to install it to get it to work, but am getting an > error. > > I followed the instructions for building and installing it, but when trying > to run the sample script that is distributed with it, I get: > > perl: relocation error: /usr/src/Sendmail-Milter-0.18/blib/arch/auto/Sendmail/Milter/Milter.so: undefined symbol: smfi_setconn > > I'm not familiar with that error, though smfi_setconn is supposed to be > defined by the milter interface. Any ideas what might be wrong? > > The system is a Debian Linux install with sendmail 8.12.9. > > Or, if anyone has a better suggestion for how to easily interface with > sendmail milter from perl, I'd love to hear about it. > > Evan > > From itnomad at earthlink.net Sat Apr 19 13:40:27 2003 From: itnomad at earthlink.net (Jack Lupton) Date: Mon Aug 2 21:23:17 2004 Subject: APM: encryption with Perl Message-ID: <1050777627.6206.222.camel@saloon> I have recently become very interested in encryption with Perl and PHP. The specifics of the different algorithms don't interest me as much as how to use them. Even downloading and installing the modules is turning out to be a challenge. Crypt::OpenPGP just would not install. The dependences could not all be satisfied. So I need help with how to install the modules, what the different types of encryption are good for, and how to use them in scripts. It occurs to me that everyone in the Austin PM is already fluent and capable with this. So maybe I am the only one that would be interested in a meeting topic devoted to this. If so, I would be able to pay a consulting fee for personal instruction. Are others interested in sharing the cost of a tutor? Is anyone interested in teaching such a class? Is anyone else interested in this a meeting topic? TIA, -- Jack Lupton itnomad@earthlink.net This message has been composed using Ximian Evolution on a Red Hat 9 desktop From jeremyb at univista.com Sat Apr 19 13:25:40 2003 From: jeremyb at univista.com (jeremyb@univista.com) Date: Mon Aug 2 21:23:17 2004 Subject: APM: RE: encryption with Perl Message-ID: <405A4B20FCF8D41192CF0050DA1802C250A780@MINIBOX> I'd be interested in learning more about the topic. However, I would not be willing to pay a consulting fee to do so. Dinner and drink, yes! -Jeremy -----Original Message----- From: Jack Lupton To: austin-pm@pm.org Sent: 4/19/03 1:40 PM Subject: APM: encryption with Perl I have recently become very interested in encryption with Perl and PHP. The specifics of the different algorithms don't interest me as much as how to use them. Even downloading and installing the modules is turning out to be a challenge. Crypt::OpenPGP just would not install. The dependences could not all be satisfied. So I need help with how to install the modules, what the different types of encryption are good for, and how to use them in scripts. It occurs to me that everyone in the Austin PM is already fluent and capable with this. So maybe I am the only one that would be interested in a meeting topic devoted to this. If so, I would be able to pay a consulting fee for personal instruction. Are others interested in sharing the cost of a tutor? Is anyone interested in teaching such a class? Is anyone else interested in this a meeting topic? TIA, -- Jack Lupton itnomad@earthlink.net This message has been composed using Ximian Evolution on a Red Hat 9 desktop _______________________________________________ Austin mailing list Austin@mail.pm.org http://mail.pm.org/mailman/listinfo/austin From msouth at fulcrum.org Sat Apr 19 15:11:27 2003 From: msouth at fulcrum.org (Mike South) Date: Mon Aug 2 21:23:17 2004 Subject: APM: encryption with Perl Message-ID: <200304192011.QAA06095@scan.shodor.org> >From austin-admin@mail.pm.org Sat Apr 19 14:28:08 2003 >From: Jack Lupton > >I have recently become very interested in encryption with Perl and PHP. >The specifics of the different algorithms don't interest me as much as >how to use them. Even downloading and installing the modules is turning >out to be a challenge. Crypt::OpenPGP just would not install. The >dependences could not all be satisfied. Hi, just to see what would happen, I tried installing (using CPAN). There was a significant number of dependencies, but the CPAN module did its magic. I'm not sure if you are one a system where this works, but here's what I did: (as root) perl -MCPAN -e shell cpan> install Crypt::OpenPGP there was much discussion of dependencies, and I always responded that I wanted all the modules (even the optional ones) installed. Then it went through the installation and finally got to Crypt::OpenPGP. It reported the installation as going ok. I have not tested it further. I saved off the list of dependencies in case it would be of use to you: - Data::Buffer ...failed! (needs 0.04) - MIME::Base64 ...loaded. (2.12) - Math::Pari ...failed! (needed) - Compress::Zlib ...loaded. (1.16) - LWP::UserAgent ...loaded. (1.80) - URI::Escape ...loaded. (3.19) - Crypt::DSA ...failed! (needed) - Crypt::RSA ...failed! (needed) ==> Do you wish to install the 4 mandatory module(s)? [y] [PGP2 Compatibility (Minimum)] - Crypt::IDEA ...failed! (needed) - Digest::MD5 ...loaded. (2.16) ==> Do you wish to install the 1 optional module(s)? [n] y [PGP5 Compatibility (Minimum)] - Crypt::DES_EDE3 ...failed! (needed) - Digest::SHA1 ...failed! (needed) ==> Do you wish to install the 2 optional module(s)? [n] y [GnuPG Compatibility (Minimum)] - Crypt::Rijndael ...failed! (needed) - Crypt::CAST5_PP ...failed! (needed) - Crypt::RIPEMD160 ...failed! (needed) ==> Do you wish to install the 3 optional module(s)? [n] y [Support for all ciphers] - Crypt::IDEA ...failed! (needed) - Crypt::DES_EDE3 ...failed! (needed) - Crypt::CAST5_PP ...failed! (needed) - Crypt::Blowfish ...failed! (needed) - Crypt::Twofish ...failed! (needs 2.00) - Crypt::Rijndael ...failed! (needed) ==> Do you wish to install the 6 optional module(s)? [n] y [Support for all digests] - Digest::MD5 ...loaded. (2.16) - Digest::SHA1 ...failed! (needed) - Crypt::RIPEMD160 ...failed! (needed) ==> Do you wish to install the 2 optional module(s)? [n] y If you tried this and it failed, you may be able to go through and make sure you have the modules that were already listed on my system as "loaded" above, and then try again. If CPAN doesn't work like that on your system (I have a vague notion that on Windows you have to use something else--ppm?), you could possibly use this list to help you do it by hand. mike From wwalker at broadq.com Sun Apr 20 16:42:34 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: emacs Message-ID: <20030420214233.GA1494@broadq.com> "On a normal ascii line, the only safe condition to detect is a 'BREAK' - everything else having been assigned functions by Gnu EMACS." (By Tarl Neustaedter) -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From mlehmann at marklehmann.com Mon Apr 21 17:10:40 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Debugging Perl this Wednesday Message-ID: <16036.27744.933922.976586@lehmbrain.marklehmann.com> When ==== The next APM meeting is next Wednesday, March 19 at 7:00 pm (ending at 8:30pm). What ==== Debugging Perl. Wayne Walker and Mark Lehmann will present ways to debug Perl programs. Some of the topics will include silent CGI tracing, finding where variables are called, capabilities inside the debugger. Where ===== Tek Systems is on the North side of Austin and is conveniently located close to 183. Maxim Group will again be catering the meeting. Dinner ====== Feel free to join us for dinner at Pok-e-Jo's BBQ in the Arboretum at 6:00pm. Drinking/Socializing ==================== After the meeting, a small group will be going out to socialize. The group typically meets at B.B. Rover's, which serves food and drinks. Here are the directions to the Tek System offices. Going North on 183: - Take the Oak Knoll Exit. - If you are going South on 183 take the Duvall exit and take the U turn so that you are heading North. - Take your First right at Riata Trace Parkway (which is before the Oak Knoll light) - Take your second right at Riata Corporate Park. (You'll see a Netsolve sign) - IMMEDIATELY turn right again (the sign does not have our name on it) You will be facing our building and turn left into the parking lot. Take the elevator to the second floor, turn right. Tek Systems is at the end of the hall. Address: 12331-1 Riata Trace Parkway, Suite 200 Austin, TX 78727 512-257-6907 -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From wwalker at broadq.com Mon Apr 21 17:22:29 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Debugging Perl this Wednesday In-Reply-To: <16036.27744.933922.976586@lehmbrain.marklehmann.com> References: <16036.27744.933922.976586@lehmbrain.marklehmann.com> Message-ID: <20030421222229.GH3360@broadq.com> > Dinner > ====== > > Feel free to join us for dinner at Pok-e-Jo's BBQ in the Arboretum at 6:00pm. It's actually NOT _in_ the Arboretum, It's "behind" the Macaroni Grill near the Arboretum (corner of Great Hills Trail and 183 southbound access road). -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From joe at swelltech.com Mon Apr 21 17:57:45 2003 From: joe at swelltech.com (Joe Cooper) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Debugging Perl this Wednesday In-Reply-To: <16036.27744.933922.976586@lehmbrain.marklehmann.com> References: <16036.27744.933922.976586@lehmbrain.marklehmann.com> Message-ID: <3EA47769.5000308@swelltech.com> Mark Lehmann wrote: > When > ==== > > The next APM meeting is next Wednesday, March 19 at 7:00 pm (ending at > 8:30pm). Will the meeting also cover "Time Travel with Perl?" ;-) -- Joe Cooper Web caching appliances and support. http://www.swelltech.com From rhaig at hackboy.com Mon Apr 21 18:23:21 2003 From: rhaig at hackboy.com (Robert Haig) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Debugging Perl this Wednesday In-Reply-To: <3EA47769.5000308@swelltech.com> References: <16036.27744.933922.976586@lehmbrain.marklehmann.com> <3EA47769.5000308@swelltech.com> Message-ID: <20030421232320.GA13620@hackboy.com> On Mon, Apr 21, 2003 at 05:57:45PM -0500, Joe Cooper wrote: > Will the meeting also cover "Time Travel with Perl?" ;-) That's already well documented in the Time::Travel module -- Rob From majcher at majcher.com Mon Apr 21 19:07:56 2003 From: majcher at majcher.com (Marc Majcher) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Debugging Perl this Wednesday In-Reply-To: <20030421232320.GA13620@hackboy.com> (message from Robert Haig on Mon, 21 Apr 2003 18:23:21 -0500) References: <16036.27744.933922.976586@lehmbrain.marklehmann.com> <3EA47769.5000308@swelltech.com> <20030421232320.GA13620@hackboy.com> Message-ID: <200304220007.h3M07unW018479@majcher.com> Robert Haig : : :On Mon, Apr 21, 2003 at 05:57:45PM -0500, Joe Cooper wrote: :> Will the meeting also cover "Time Travel with Perl?" ;-) : :That's already well documented in the Time::Travel module I think you mean Time::Warp. http://search.cpan.org/author/JPRIT/Time-Warp-0.5/Warp.pm And, I'm guessing the meeting is on May 21, which would be the third wednesday of next month, not last month. -- DVS Nobody puts Baby in a corner. From dbii at mudpuddle.com Mon Apr 21 19:58:00 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Revised APM Meeting Date Message-ID: Contrary to time travel talk, the meeting is THIS Wednesday, April 23, 2003. It is the fourth Wednesday this month, not the third one. So the announcement is for April, but this Wednesday. :) David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From mlehmann at marklehmann.com Tue Apr 22 10:03:44 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Perl Debugging meeting tomorrow April 23, 2003 A.D. Message-ID: <16037.22992.452404.477950@lehmbrain.marklehmann.com> When ==== The next APM meeting is this Wednesday, April 23 at 7:00 pm (ending at 8:30pm). What ==== Debugging Perl. Wayne Walker and Mark Lehmann will present ways to debug Perl programs. Some of the topics will include silent CGI tracing, finding where variables are called, capabilities inside the debugger. Where ===== Tek Systems is on the North side of Austin and is conveniently located close to 183. Maxim Group will again be catering the meeting. Dinner ====== Feel free to join us for dinner at Pok-e-Jo's behind the Macroni Grill, at the intersection of 183 and Great Hills Trail. Drinking/Socializing ==================== After the meeting, a small group will be going out to socialize. The group typically meets at B.B. Rover's, which serves food and drinks. Here are the directions to the Tek System offices. Going North on 183: - Take the Oak Knoll Exit. - If you are going South on 183 take the Duvall exit and take the U turn so that you are heading North. - Take your First right at Riata Trace Parkway (which is before the Oak Knoll light) - Take your second right at Riata Corporate Park. (You'll see a Netsolve sign) - IMMEDIATELY turn right again (the sign does not have our name on it) You will be facing our building and turn left into the parking lot. Take the elevator to the second floor, turn right. Tek Systems is at the end of the hall. Address: 12331-1 Riata Trace Parkway, Suite 200 Austin, TX 78727 512-257-6907 -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From mlehmann at marklehmann.com Tue Apr 22 11:53:54 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Dinner at Pok-e-Jo's tomorrow. Message-ID: <16037.29602.312707.216951@lehmbrain.marklehmann.com> The reference that we are meeting at Maxim Group and that they are catering dinner is wrong. We are meeting at Tek Systems for the meeting, and those who want to meet for dinner can get together at Pok-e-Jo's. Unfortunately no one is catering dinner. -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From dbii at mudpuddle.com Tue Apr 22 12:14:36 2003 From: dbii at mudpuddle.com (David Bluestein II) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Dinner at Pok-e-Jo's tomorrow. Message-ID: Pokejo's (my [incorrect] spelling) at 6:00 pm, be there! David ---------- David H. Bluestein II President & Lead Developer dbii@interaction.net ii, inc. http://www.interaction.net - Specializing in Designing Interactive Websites - - and Searchable Internet Databases - From eharris at puremagic.com Tue Apr 22 19:25:41 2003 From: eharris at puremagic.com (Evan Harris) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Question about installing perl without root Message-ID: What is the easiest/cleanest way to install a (or several) different version(s) of perl for use with things that require specific compiled-in features, but without touching anything outside the users home dir? Evan From wwalker at broadq.com Tue Apr 22 20:51:26 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Question about installing perl without root In-Reply-To: References: Message-ID: <20030423015126.GB1006@broadq.com> ncftpget ....perl-5.8.0.tar.gz tar xfz perl-5.8.0.tar.gz cd perl-5.8.0 # Though perl threads are safe now, too many modules are not thread safe # yet. build a special version of perl for threaded applications to use # if you must have threads. ./Configure -Dprefix=/home/evan/perl-5.8.0 -Dusethreads=undef -d make make test make install in your scripts: #!/home/evan/perl-5.8.0/bin/perl When you install things via CPAN module, they install into the tree of the perl that invoked CPAN. /home/evan/perl-5.8.0/bin/perl -MCPAN -e shell On Tue, Apr 22, 2003 at 07:25:41PM -0500, Evan Harris wrote: > > What is the easiest/cleanest way to install a (or several) different > version(s) of perl for use with things that require specific compiled-in > features, but without touching anything outside the users home dir? > > Evan > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From mlehmann at marklehmann.com Wed Apr 23 09:56:06 2003 From: mlehmann at marklehmann.com (Mark Lehmann) Date: Mon Aug 2 21:23:17 2004 Subject: APM: Reminder, Meeting Tonight: 7:00pm at TekSystems Message-ID: <16038.43398.153891.781248@lehmbrain.marklehmann.com> Dinner: 6:00pm at Pok-E-Jo's Meeting: 7:00pm at Tek Systems Socializing: 8:30pm at BB Rovers Topic: Perl Debugging techniques / Wayne Walker & Mark Lehmann -- Mark Lehmann email mlehmann@marklehmann.com | phone 512 689-7705 From Goldilox at teachnet.edb.utexas.edu Mon Apr 28 11:36:39 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: chmod doesn't die Message-ID: this script keeps dieing. the chmod failsafe is not working and the chmod fails everytime (since the files were uploaded by the site owner via ftp and are not owned by Perl? those files are all 0644 before this script runs). Do I need to have Perl take ownership of the files to be able to chmod them (the files are picture files)? But more importantly, why does the chmod fail and then continue on as if it hasn't failed? Let me know if I am not providing enough info (This is perl, v5.8.0 built for aix) Thanks again Rhett #!/usr/bin/perl use CGI; $cg=new CGI; $thumbsfile="/path"; chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; unlink ($thumbsfile) || die "Can't unlink $thumbsfile: $!"; print $cg->redirect("/path"); sub no_way{print $cg->header;print qq~Feature Not Available

This feature is not available. Please send an email to the webmaster requesting this feature.

Go back or wait and this page will automatically take you somewhere.

~;exit(0);} From bob at blacklab.com Mon Apr 28 12:29:37 2003 From: bob at blacklab.com (Bob Richards) Date: Mon Aug 2 21:23:17 2004 Subject: APM: RE: chmod doesn't die In-Reply-To: Message-ID: It's probably a ownership issue. On my servers the script must be owned by the same person who owns the file for this program to work. On the server you are on you may need the server to own the files. Bob Richards http://www.blacklab.com 888-654-8860 512-275-0099 bob@blacklab.com -----Original Message----- From: austin-admin@mail.pm.org [mailto:austin-admin@mail.pm.org]On Behalf Of Goldilox Sent: Monday, April 28, 2003 11:37 AM To: austin-pm@pm.org Subject: APM: chmod doesn't die this script keeps dieing. the chmod failsafe is not working and the chmod fails everytime (since the files were uploaded by the site owner via ftp and are not owned by Perl? those files are all 0644 before this script runs). Do I need to have Perl take ownership of the files to be able to chmod them (the files are picture files)? But more importantly, why does the chmod fail and then continue on as if it hasn't failed? Let me know if I am not providing enough info (This is perl, v5.8.0 built for aix) Thanks again Rhett #!/usr/bin/perl use CGI; $cg=new CGI; $thumbsfile="/path"; chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; unlink ($thumbsfile) || die "Can't unlink $thumbsfile: $!"; print $cg->redirect("/path"); sub no_way{print $cg->header;print qq~Feature Not Available

This feature is not available. Please send an email to the webmaster requesting this feature.

Go back or wait and this page will automatically take you somewhere.

~;exit(0);} _______________________________________________ Austin mailing list Austin@mail.pm.org http://mail.pm.org/mailman/listinfo/austin From renm at iname.com Mon Apr 28 14:33:30 2003 From: renm at iname.com (Ren Maddox) Date: Mon Aug 2 21:23:17 2004 Subject: APM: chmod doesn't die In-Reply-To: References: Message-ID: <1051558410.12049.2.camel@kraz.dynamic.austin.ibm.com> On Mon, 2003-04-28 at 11:36, Goldilox wrote: [...] > chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; [...] As long as $thumbsfile has a (true) value, no_way() will never be called. This is because "||" binds more tightly than ",". Instead, use either of: chmod(0766, $thumbsfile) || no_way(); chmod 0766, $thumbsfile or no_way(); -- Ren Maddox From msouth at shodor.org Mon Apr 28 15:06:12 2003 From: msouth at shodor.org (Mike South) Date: Mon Aug 2 21:23:17 2004 Subject: APM: chmod doesn't die Message-ID: <200304282006.h3SK6Cow015882@scan.shodor.org> >From: Ren Maddox >Date: 28 Apr 2003 14:33:30 -0500 > >On Mon, 2003-04-28 at 11:36, Goldilox wrote: >[...] >> chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; >[...] > >As long as $thumbsfile has a (true) value, no_way() will never be >called. This is because "||" binds more tightly than ",". Instead, use >either of: > >chmod(0766, $thumbsfile) || no_way(); >chmod 0766, $thumbsfile or no_way(); Ken is correct. Just in case anyone is not familiar with the phrasing "binds more tightly", here is a little more explanation. The way it was written originally: >> chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; is essentially equivalent to this, where I have added "virual parentheses" to show what Perl thinks you mean: chmod 0766, ( $thumbsfile || no_way() ); # "virtual parentheses" _toward_ the '||' with "or" instead of "||", as Ken suggested, it is interpreted like this: ( chmod 0766, $thumbsfile ) or no_way() );# "virtual parentheses" _away_ from the 'or' the "or" is "weak binding", which means it doesn't grab stuff next to it and put it in virtual parentheses, while the normal || does. As a basic rule of thumb, if you are making an execution path decision, like "open this file or die", or "do this or run this subroutine", you want "or", so that you don't accidentally enclose the last part in virtual parentheses. Another good rule of thumb is "when in doubt, parenthesize". That is, if you are coding along and you aren't sure how something is going to be imterpreted, force the interpretation that you mean by explicitly putting the parentheses in. mike From Goldilox at teachnet.edb.utexas.edu Tue Apr 29 09:49:53 2003 From: Goldilox at teachnet.edb.utexas.edu (Goldilox) Date: Mon Aug 2 21:23:18 2004 Subject: APM: chmod doesn't die In-Reply-To: <200304282006.h3SK6Cow015882@scan.shodor.org> References: <200304282006.h3SK6Cow015882@scan.shodor.org> Message-ID: Thanks for everyone's help and explanations. Related to this, I want to now chown the files to Perl so Perl can manipulate the files. Do I chown to 'nobody' for this purpose? (This is perl, v5.8.0 built for aix) Thanks again Rhett From wwalker at broadq.com Tue Apr 29 10:11:25 2003 From: wwalker at broadq.com (Wayne Walker) Date: Mon Aug 2 21:23:18 2004 Subject: APM: chmod doesn't die In-Reply-To: References: <200304282006.h3SK6Cow015882@scan.shodor.org> Message-ID: <20030429151125.GA3712@broadq.com> The issue here is who the CGI runs as. ps -elf | grep httpd 1 process should be root and all the others will be a different username. That's what you need to chown things to. (Unless apache is running in suexec mode, in which case you will have to read up on suexec). On Tue, Apr 29, 2003 at 09:49:53AM -0500, Goldilox wrote: > Thanks for everyone's help and explanations. Related to this, I want to now > chown the files to Perl so Perl can manipulate the files. Do I chown to > 'nobody' for this purpose? (This is perl, v5.8.0 built for aix) > > Thanks again > > Rhett > > _______________________________________________ > Austin mailing list > Austin@mail.pm.org > http://mail.pm.org/mailman/listinfo/austin -- Wayne Walker www.broadq.com :) Bringing digital video and audio to the living room From mike at stok.co.uk Tue Apr 29 10:50:30 2003 From: mike at stok.co.uk (Mike Stok) Date: Mon Aug 2 21:23:18 2004 Subject: APM: chmod doesn't die In-Reply-To: <200304282006.h3SK6Cow015882@scan.shodor.org> Message-ID: On Mon, 28 Apr 2003, Mike South wrote: [...] > >On Mon, 2003-04-28 at 11:36, Goldilox wrote: > >[...] > >> chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!"; > >[...] > > > >As long as $thumbsfile has a (true) value, no_way() will never be > >called. This is because "||" binds more tightly than ",". Instead, use > >either of: > > > >chmod(0766, $thumbsfile) || no_way(); > >chmod 0766, $thumbsfile or no_way(); > > Ken is correct. Just in case anyone is not familiar with the > phrasing "binds more tightly", here is a little more explanation. [...] > As a basic rule of thumb, if you are making an execution path decision, > like "open this file or die", or "do this or run this subroutine", > you want "or", so that you don't accidentally enclose the last part in > virtual parentheses. > > Another good rule of thumb is "when in doubt, parenthesize". That is, if you > are coding along and you aren't sure how something is going to be imterpreted, > force the interpretation that you mean by explicitly putting the parentheses > in. Another good rule of thumb is to understand perl's precedence, and failing that remember that there are modules which let you see "perl's interpretation" of what you wrote e.g. [mike@ratdog mike]$ perl -MO=Deparse,-p -e 'chmod 0766,$thumbsfile || no_way()' chmod(0766, ($thumbsfile || no_way())); -e syntax OK [mike@ratdog mike]$ perl -MO=Deparse,-p -e 'chmod 0766,$thumbsfile or no_way()' (chmod(0766, $thumbsfile) or no_way()); -e syntax OK perldoc B::Deparse will let you see more things you can use this for. Hope this helps, Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA