From nheller at silcon.com Tue Jun 3 14:49:15 2008 From: nheller at silcon.com (Neil Heller) Date: Tue, 3 Jun 2008 14:49:15 -0700 Subject: [sf-perl] [JOB] There might be interest Message-ID: <000c01c8c5c3$ab5ad350$021079f0$@com> I came across this email and thought I would re-post it here. Hello, I am working on a contractor search for a large high profile client of ours that is looking for a strong Perl Developer. The position is located in Walnut Creek, CA. and is 6+ months in length. If you know anyone interested please contact me right away! Thanks, Rob Tomlinson KCM Solutions 925 242-2318 Neil Heller -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080603/ae3f540b/attachment.html From Peter.Loo at source.wolterskluwer.com Tue Jun 3 15:03:28 2008 From: Peter.Loo at source.wolterskluwer.com (Loo, Peter # PHX) Date: Tue, 3 Jun 2008 15:03:28 -0700 Subject: [sf-perl] UNSUBSCRIBE Message-ID: <8E3D502A002DA04FADBDED4CB4D94D3A05E4AC6B@phxmail02.phx.ndchealth.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080603/7e7c1604/attachment.html From david at fetter.org Tue Jun 3 16:07:29 2008 From: david at fetter.org (David Fetter) Date: Tue, 3 Jun 2008 16:07:29 -0700 Subject: [sf-perl] SF Postgres Meeting Wednesday, June 11 Message-ID: <20080603230729.GC864@fetter.org> Folks, John Zarrella will be talking about parsers, and Josh Berkus will have news about PgCon. RSVP at for the usual logistical and courtesy reasons ;) Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter at gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate From josh at agliodbs.com Tue Jun 3 23:01:48 2008 From: josh at agliodbs.com (Josh Berkus) Date: Tue, 03 Jun 2008 23:01:48 -0700 Subject: [sf-perl] [sfpug] SF Postgres Meeting Wednesday, June 11 In-Reply-To: <20080603230729.GC864@fetter.org> References: <20080603230729.GC864@fetter.org> Message-ID: <48462FCC.2030103@agliodbs.com> All, Updated description of the talk: An Introduction to Parsing No matter what language you use to write software -- from Basic and C to Java, Python, Perl and SQL -- a parser is part of the behind-the-scenes machinery. The parser is an essential part of translating what you write into something that can be executed. It analyzes your code and breaks it down into contants, variables, statements, expressions, punctuation, etc. We'll talk about what parsing is, how a parser works, how parsing integrates with semantic analysis, and discuss some different types of parsers and compiler-compilers. We'll finish with a very brief look at the PostgreSQL parser. From kenuhl at berkeley.edu Wed Jun 4 13:43:36 2008 From: kenuhl at berkeley.edu (ken uhl) Date: Wed, 04 Jun 2008 13:43:36 -0700 Subject: [sf-perl] passing checkboxes as hidden fields Message-ID: <4846FE78.3080708@berkeley.edu> Hi, I have a question on how to determine the value of a checkbox ( checked or unchecked ) when passing check boxes as hidden fields to a separate cgi. The checkboxes are all all the named 'tagbucket' with different values, so I retrieve those this way use CGI; my $cgi = new CGI; my @boxes = $cgi->param('tagbucket'); This gives me a nice array of check box field names, but I don't know if they are selected, so I try retrieving each box : for my $box ( @boxes ) { my $box_data = $cgi->param($box); }; This give me nothing. By the way the check box is defined this way : my $cb_name = "bulkdeleteHost-type-$htype-row-$hrowid" ; my $be_bad = $cgi->checkbox( -name => "tagbucket" , -checked => 0, -value => "$cb_name" , -label => "Bulk Delete?") ; Any suggestions ? From garth.webb at gmail.com Wed Jun 4 14:16:21 2008 From: garth.webb at gmail.com (Garth Webb) Date: Wed, 4 Jun 2008 14:16:21 -0700 Subject: [sf-perl] passing checkboxes as hidden fields In-Reply-To: <4846FE78.3080708@berkeley.edu> References: <4846FE78.3080708@berkeley.edu> Message-ID: If a checkbox is unchecked, the browser will send nothing to you. Only if the box is checked will you get a name=value pair. On Wed, Jun 4, 2008 at 1:43 PM, ken uhl wrote: > Hi, > I have a question on how to determine the value of a checkbox ( checked > or unchecked ) when > passing check boxes as hidden fields to a separate cgi. > > The checkboxes are all all the named 'tagbucket' > with different values, > so I retrieve those this way > > use CGI; > my $cgi = new CGI; > > my @boxes = $cgi->param('tagbucket'); > > This gives me a nice array of check box field names, but I don't know if > they are selected, > > so I try retrieving each box : > > for my $box ( @boxes ) { > my $box_data = $cgi->param($box); > }; > > This give me nothing. > > By the way the check box is defined this way : > > my $cb_name = "bulkdeleteHost-type-$htype-row-$hrowid" ; > my $be_bad = $cgi->checkbox( -name => "tagbucket" , -checked => 0, > -value => "$cb_name" , -label => "Bulk Delete?") ; > > Any suggestions ? > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080604/23346ec2/attachment.html From thomas at brightbill.net Wed Jun 4 14:24:55 2008 From: thomas at brightbill.net (Thomas Brightbill) Date: Wed, 4 Jun 2008 14:24:55 -0700 (PDT) Subject: [sf-perl] passing checkboxes as hidden fields In-Reply-To: <4846FE78.3080708@berkeley.edu> References: <4846FE78.3080708@berkeley.edu> Message-ID: On Wed, 4 Jun 2008, ken uhl wrote: > The checkboxes are all all the named 'tagbucket' > with different values, > so I retrieve those this way > > use CGI; > my $cgi = new CGI; > > my @boxes = $cgi->param('tagbucket'); > > This gives me a nice array of check box field names, but I don't know if > they are selected, Isn't the name of all the checkboxes "tagbucket"? This should give you an array containing all the values of the *checked* checkboxes (e.g. $cb_name_X, $cb_name_Y, $cb_name_Z, ....) > Any suggestions ? check the HTML. are the names and values being properly generated for the 'tagbucket' checkboxes on your form. you could also add use Data::Dumper; and print Dumper(@boxes) to help troubleshoot. HTH, Thomas Thomas Brightbill thomas at brightbill.net http://www.brightbill.net From thomas at brightbill.net Wed Jun 4 14:36:05 2008 From: thomas at brightbill.net (Thomas Brightbill) Date: Wed, 4 Jun 2008 14:36:05 -0700 (PDT) Subject: [sf-perl] passing checkboxes as hidden fields In-Reply-To: References: <4846FE78.3080708@berkeley.edu> Message-ID: On Wed, 4 Jun 2008, ken uhl wrote: > so I try retrieving each box : > > for my $box ( @boxes ) { > my $box_data = $cgi->param($box); > }; > > This give me nothing. To expand a little more on my earlier message, I would think that this should give you nothing. Aren't the checkboxes named 'tagbucket'? Their values are $cb_name_X, $cb_name_Y, etc. The form shouldn't be passing the script any parameters named $cb_name_X, $cb_name_Y - only values in the tagbucket array. Also, I'm a little confused with the title of your posting - the fields are hidden? Thomas Thomas Brightbill thomas at brightbill.net http://www.brightbill.net From friedman at highwire.stanford.edu Wed Jun 4 14:51:05 2008 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Wed, 4 Jun 2008 14:51:05 -0700 Subject: [sf-perl] passing checkboxes as hidden fields In-Reply-To: References: <4846FE78.3080708@berkeley.edu> Message-ID: <940C1BD9-5B71-4BAD-9DBD-3860190464E1@highwire.stanford.edu> Er, also not to mention the scoping. 'my $box_data' is only available inside the braces of the for loop. But I assume that's an artifact of the way you cut down the example to post here and not a problem in your original code. -- Mike On Jun 4, 2008, at 2:36 PM, Thomas Brightbill wrote: > > On Wed, 4 Jun 2008, ken uhl wrote: > >> so I try retrieving each box : >> >> for my $box ( @boxes ) { >> my $box_data = $cgi->param($box); >> }; >> >> This give me nothing. > > To expand a little more on my earlier message, I would think that this > should give you nothing. Aren't the checkboxes named 'tagbucket'? > Their > values are $cb_name_X, $cb_name_Y, etc. > > The form shouldn't be passing the script any parameters named > $cb_name_X, > $cb_name_Y - only values in the tagbucket array. > > Also, I'm a little confused with the title of your posting - the > fields > are hidden? > > Thomas > > > > Thomas Brightbill > thomas at brightbill.net > http://www.brightbill.net > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From quinn at fairpath.com Wed Jun 4 21:51:48 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Wed, 4 Jun 2008 21:51:48 -0700 Subject: [sf-perl] Fwd: [sfpug] PostgreSQL training in Santa Clara, June 23 References: <48474DB8.3080204@agliodbs.com> Message-ID: <4C5DF815-0F8D-4E3C-9F65-8423AF2CBD04@fairpath.com> Sone info on an upcoming PostgreSQL course run by Josh Berkus. If you need the training, and your employer will pay for it, I can't imagine a better instructor. -- Quinn Weaver Full-stack web consultant http://fairpath.com/ 510-520-5217 (mobile) Begin forwarded message: > From: Josh Berkus > Date: June 4, 2008 7:21:44 PM PDT > To: SF Postgres > Subject: [sfpug] PostgreSQL training in Santa Clara, June 23 > > All, > > From project supporter Open Technology Group: > > I've got a confirmed-to-run PostgreSQL course going on in Santa > Clara, CA the week of June 23, 2008 . Currently it's a small class > (only 3 students), so folks who attend will definitely get lots of > one-on-one instructor time there. > If you know of anyone who might be interested, please do let them > know...or if its possible to pass this on to your local PUG, that > would be great... The price for the 5 day class is $2,195 ($100 > less for gov't/education customers, and group discounts are > available as well). A course outline and details is available at : http://otg-nc.com/training-courses/coursedetail.php?courseid=40 > . If you've got multiple PUG people who want to attend, I can > apply a multi-student discount to them..or make a donation to the PUG. > > Please forward! > > --Josh Berkus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080604/436cd737/attachment.html From josh at agliodbs.com Thu Jun 5 06:06:22 2008 From: josh at agliodbs.com (Josh Berkus) Date: Thu, 05 Jun 2008 09:06:22 -0400 Subject: [sf-perl] Fwd: [sfpug] PostgreSQL training in Santa Clara, June 23 In-Reply-To: <4C5DF815-0F8D-4E3C-9F65-8423AF2CBD04@fairpath.com> References: <48474DB8.3080204@agliodbs.com> <4C5DF815-0F8D-4E3C-9F65-8423AF2CBD04@fairpath.com> Message-ID: <4847E4CE.10205@agliodbs.com> Quinn Weaver wrote: > Sone info on an upcoming PostgreSQL course run by Josh Berkus. If you > need the training, and your employer will pay for it, I can't imagine a > better instructor. > Ooops! I'm not giving the course. This is from Open Technology Group, actually. The instructure is probably Robert Bernier. --Josh From kenuhl at berkeley.edu Thu Jun 5 12:17:03 2008 From: kenuhl at berkeley.edu (ken uhl) Date: Thu, 05 Jun 2008 12:17:03 -0700 Subject: [sf-perl] Those darn check boxes ... In-Reply-To: References: Message-ID: <48483BAF.8020101@berkeley.edu> Thanks all who chimed in, Garth, Tom, Mike : To respond to all your clarifying questions, and my progress so far: I am using hidden fields in HTML to pass check boxes to a different script, thusly: This way I retrieve all the check box field names, regardless of whether they are checked or not. if I simply pass the hidden fields as I get zippo - no check box names, no value pairs. I guess there is a different path I should be on.... Ken Uhl sanfrancisco-pm-request at pm.org wrote: ( snipped intervening text ) > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 04 Jun 2008 13:43:36 -0700 > From: ken uhl > Subject: [sf-perl] passing checkboxes as hidden fields > To: sanfrancisco-pm at pm.org > Message-ID: <4846FE78.3080708 at berkeley.edu> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, > I have a question on how to determine the value of a checkbox ( checked > or unchecked ) when > passing check boxes as hidden fields to a separate cgi. > > The checkboxes are all all the named 'tagbucket' > with different values, > so I retrieve those this way > > use CGI; > my $cgi = new CGI; > > my @boxes = $cgi->param('tagbucket'); > > This gives me a nice array of check box field names, but I don't know if > they are selected, > > so I try retrieving each box : > > for my $box ( @boxes ) { > my $box_data = $cgi->param($box); > }; > > This give me nothing. > > By the way the check box is defined this way : > > my $cb_name = "bulkdeleteHost-type-$htype-row-$hrowid" ; > my $be_bad = $cgi->checkbox( -name => "tagbucket" , -checked => 0, > -value => "$cb_name" , -label => "Bulk Delete?") ; > > Any suggestions ? > > > > > ------------------------------ > > Message: 2 > Date: Wed, 4 Jun 2008 14:16:21 -0700 > From: "Garth Webb" > Subject: Re: [sf-perl] passing checkboxes as hidden fields > To: "San Francisco Perl Mongers User Group" > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > If a checkbox is unchecked, the browser will send nothing to you. Only if > the box is checked will you get a name=value pair. > > On Wed, Jun 4, 2008 at 1:43 PM, ken uhl wrote: > > snip > ------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080604/23346ec2/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Wed, 4 Jun 2008 14:24:55 -0700 (PDT) > From: Thomas Brightbill > Subject: Re: [sf-perl] passing checkboxes as hidden fields > To: San Francisco Perl Mongers User Group > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII > > snip > On Wed, 4 Jun 2008, ken uhl wrote: > > Isn't the name of all the checkboxes "tagbucket"? > This should give you an array containing all the values of the *checked* > checkboxes (e.g. $cb_name_X, $cb_name_Y, $cb_name_Z, ....) > > > check the HTML. are the names and values being properly generated for > the 'tagbucket' checkboxes on your form. > > you could also add > > use Data::Dumper; > > and > > print Dumper(@boxes) > > to help troubleshoot. > > HTH, > > Thomas > > > Thomas Brightbill > thomas at brightbill.net > http://www.brightbill.net > > ------------------------------ > To expand a little more on my earlier message, I would think that this > should give you nothing. Aren't the checkboxes named 'tagbucket'? Their > values are $cb_name_X, $cb_name_Y, etc. > > The form shouldn't be passing the script any parameters named $cb_name_X, > $cb_name_Y - only values in the tagbucket array. > > Also, I'm a little confused with the title of your posting - the fields > are hidden? > > Thomas > > > snip From nheller at silcon.com Thu Jun 5 12:23:34 2008 From: nheller at silcon.com (Neil Heller) Date: Thu, 5 Jun 2008 12:23:34 -0700 Subject: [sf-perl] Those darn check boxes ... In-Reply-To: <48483BAF.8020101@berkeley.edu> References: <48483BAF.8020101@berkeley.edu> Message-ID: <004601c8c741$a5b84de0$f128e9a0$@com> I notice a lot of duplication in your object descriptions. Might it be advantageous to just pass the unique portions to a subroutine? Neil Heller -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of ken uhl Sent: Thursday, June 05, 2008 12:17 PM To: sanfrancisco-pm at pm.org Subject: [sf-perl] Those darn check boxes ... Thanks all who chimed in, Garth, Tom, Mike : To respond to all your clarifying questions, and my progress so far: I am using hidden fields in HTML to pass check boxes to a different script, thusly: This way I retrieve all the check box field names, regardless of whether they are checked or not. if I simply pass the hidden fields as I get zippo - no check box names, no value pairs. I guess there is a different path I should be on.... Ken Uhl sanfrancisco-pm-request at pm.org wrote: ( snipped intervening text ) > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 04 Jun 2008 13:43:36 -0700 > From: ken uhl > Subject: [sf-perl] passing checkboxes as hidden fields > To: sanfrancisco-pm at pm.org > Message-ID: <4846FE78.3080708 at berkeley.edu> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, > I have a question on how to determine the value of a checkbox ( checked > or unchecked ) when > passing check boxes as hidden fields to a separate cgi. > > The checkboxes are all all the named 'tagbucket' > with different values, > so I retrieve those this way > > use CGI; > my $cgi = new CGI; > > my @boxes = $cgi->param('tagbucket'); > > This gives me a nice array of check box field names, but I don't know if > they are selected, > > so I try retrieving each box : > > for my $box ( @boxes ) { > my $box_data = $cgi->param($box); > }; > > This give me nothing. > > By the way the check box is defined this way : > > my $cb_name = "bulkdeleteHost-type-$htype-row-$hrowid" ; > my $be_bad = $cgi->checkbox( -name => "tagbucket" , -checked => 0, > -value => "$cb_name" , -label => "Bulk Delete?") ; > > Any suggestions ? > > > > > ------------------------------ > > Message: 2 > Date: Wed, 4 Jun 2008 14:16:21 -0700 > From: "Garth Webb" > Subject: Re: [sf-perl] passing checkboxes as hidden fields > To: "San Francisco Perl Mongers User Group" > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > If a checkbox is unchecked, the browser will send nothing to you. Only if > the box is checked will you get a name=value pair. > > On Wed, Jun 4, 2008 at 1:43 PM, ken uhl wrote: > > snip > ------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080604/23346ec2/a ttachment-0001.html > > ------------------------------ > > Message: 3 > Date: Wed, 4 Jun 2008 14:24:55 -0700 (PDT) > From: Thomas Brightbill > Subject: Re: [sf-perl] passing checkboxes as hidden fields > To: San Francisco Perl Mongers User Group > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII > > snip > On Wed, 4 Jun 2008, ken uhl wrote: > > Isn't the name of all the checkboxes "tagbucket"? > This should give you an array containing all the values of the *checked* > checkboxes (e.g. $cb_name_X, $cb_name_Y, $cb_name_Z, ....) > > > check the HTML. are the names and values being properly generated for > the 'tagbucket' checkboxes on your form. > > you could also add > > use Data::Dumper; > > and > > print Dumper(@boxes) > > to help troubleshoot. > > HTH, > > Thomas > > > Thomas Brightbill > thomas at brightbill.net > http://www.brightbill.net > > ------------------------------ > To expand a little more on my earlier message, I would think that this > should give you nothing. Aren't the checkboxes named 'tagbucket'? Their > values are $cb_name_X, $cb_name_Y, etc. > > The form shouldn't be passing the script any parameters named $cb_name_X, > $cb_name_Y - only values in the tagbucket array. > > Also, I'm a little confused with the title of your posting - the fields > are hidden? > > Thomas > > > snip _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From thomas at brightbill.net Thu Jun 5 13:10:55 2008 From: thomas at brightbill.net (Thomas Brightbill) Date: Thu, 5 Jun 2008 13:10:55 -0700 (PDT) Subject: [sf-perl] Those darn check boxes ... In-Reply-To: <48483BAF.8020101@berkeley.edu> References: <48483BAF.8020101@berkeley.edu> Message-ID: On Thu, 5 Jun 2008, ken uhl wrote: > I am using hidden fields in HTML to pass check boxes to a different > script, thusly: > This way I retrieve all the check box field names, regardless of whether > they are checked or not. Ken, If I'm reading this - and your original post - correctly, the problem is that you're passing *all* checkboxes to a confirmation page as "" and then trying to figure out which of those hidden tags were orignally checked... Seems to me, only the *checked* checkboxes should be passed to the confirmation page. Thomas Thomas Brightbill thomas at brightbill.net http://www.brightbill.net From ddascalescu at gmail.com Thu Jun 5 17:17:11 2008 From: ddascalescu at gmail.com (Dan Dascalescu) Date: Thu, 5 Jun 2008 17:17:11 -0700 Subject: [sf-perl] Those darn check boxes ... In-Reply-To: <48483BAF.8020101@berkeley.edu> References: <48483BAF.8020101@berkeley.edu> Message-ID: <3561cc6d0806051717n46df0a69of0f964164e6b1089@mail.gmail.com> Maybe you'd like to consider using the Catalyst Framework and FormFu? http://www.catalystframework.org/calendar/2007/20 -- Dan On Thu, Jun 5, 2008 at 12:17 PM, ken uhl wrote: > > Thanks all who chimed in, Garth, Tom, Mike : > > To respond to all your clarifying questions, and my progress so far: > > I am using hidden fields in HTML to pass check boxes to a different > script, thusly: [...] From thomas at brightbill.net Thu Jun 5 17:57:41 2008 From: thomas at brightbill.net (Thomas Brightbill) Date: Thu, 5 Jun 2008 17:57:41 -0700 (PDT) Subject: [sf-perl] Those darn check boxes ... Message-ID: Ken, Does the following example get you closer to where you're trying to go? Thomas Brightbill thomas at brightbill.net http://www.brightbill.net ------------------------------------------------------------------------ #!/usr/bin/perl use CGI; use strict; my $q = new CGI; my $called_by = $q->param('submit'); my $confirmed = $q->param('confirmed'); my $script_name = "tagbucket_template"; my ($message,$formstuff); # check how we were called if ($called_by ne 'submit') { # this is the first time the form is displayed # get some names from a database # assume for now that the database returns an array # with something like the following my @results = ('red','orange','yellow','green','blue','indigo','violet'); $formstuff = $q->checkbox_group(-name=>'tagbucket', -values=>\@results, -linebreak=>'true'); } else { if ($confirmed ne 'yes') { # this is the confirmation page my @stuff_to_delete = $q->param('tagbucket'); $message = $q->p("Are you sure you want to delete the following items?"); $message .= $q->ul($q->li(\@stuff_to_delete)); $formstuff = $q->hidden(-name=>'tagbucket',\@stuff_to_delete); $formstuff .= $q->checkbox(-name=>'confirmed', -value=>'yes', -label=>'Yes, I want to delete this stuff!'); $formstuff .= $q->br(); } else { # this is the actual deletion my @stuff_to_delete = $q->param('tagbucket'); # delete stuff from database # create confirmation message $message = $q->p("The following stuff has been deleted:"); $message .= $q->ul($q->li(\@stuff_to_delete)); } } # page output print $q->header; print $q->start_html('Tagbucket Template'); print $q->p($message); print qq|
\n|; print $formstuff; print $q->submit( -name => 'submit', -value => 'submit'); print $q->end_form; print $q->end_html; From john_re at fastmail.us Fri Jun 6 05:28:56 2008 From: john_re at fastmail.us (john_re) Date: Fri, 06 Jun 2008 05:28:56 -0700 Subject: [sf-perl] ANNOUNCE: TOMORROW Sat June 7 INSTALLFEST TALKS POTLUCK, Berkeley 12N-6P Message-ID: <1212755336.32456.1257101883@webmail.messagingengine.com> Hi PERL Mongers. You might be especially interested in the 2PM-3PM PROGRAMMING/DATABASES OPEN DISCUSSION / TALKS session. See the "Details" "Talks" section below. :) ======================================================== YOU are INVITED to the 1st Berkeley BSD GNU/Linux Installfest, Talks, & Potluck. This is a FREE friendly, pleasant, fun, educational & productive event. LOCATION: EVANS HALL, or nearby, U. C. Berkeley, Berkeley, CA ROOM: Room 5 Evans Hall: Either we will meet in this room, or see directions posted there to the meeting location. (This is the building where UNIX was developed at Berkeley.) TIME: 12 Noon to 6 PM - come & leave as you like. Saturday June 7th This is the first meeting of what is planned to be a MONTHLY 1st Saturday or Sunday event. (Next month's meeting: July 5 or 6) There are 3 PARALLEL TRACKS of events: 1) INSTALLFEST Bring your computer & install BSD or GNU/Linux software. 2) TALKS Talks by various speakers 3) POTLUCK (Optional) Bring $4 of food to share: eat, conversation This meeting is being coordinated through the Berkeley Unix User Group buug.org mailing list: http://www.weak.org/pipermail/buug/2008-June/thread.html ===== DETAILS: ============================================ === INSTALLFEST: Bring your computer & install BSD or GNU/Linux software. This is a self reliant event. Bring everything you need. Computer, monitor, keyboard, mouse, laptop, power cord, MULTI OUTLET POWER EXTENSION CORD, network cord, network hub or router, WIFI, install software CD (people will likely have some installation CD's, but don't count on them having the one you want). For this first meeting, we _might_ NOT have any NETWORKING except through individuals CELL PHONE service. Please help clean up when through. Thank you. === TALKS: Eventually we hope to have 2-6 speakers. For this meeting, we have no planned talks. Instead, we have the following time slots reserved specifically for OPEN DISCUSSION about these TOPICS: 12N DISTRIBUTIONS - BSD's, Ubuntu Debian RH Suse etc 1P PROGRAMMING/DATABASES - Python, PERL, PHP, TCL, C/C++, Ruby, LISP, FORTRAN, COBOL, MSQL, etc. 2P VIDEOCONFERENCE testing; NETWORKING 3P BAD - Bay Area Debian MEETING. http://bad.debian.net 4P GUIs - KDE, GNOME. USER APPLICATIONS - Word Proc, Web Browser, Video, Audio 5P ORGANIZING future meetings, HOWTO: ETHICAL SPAMMING - ie how to announce to LUGs, etc. Note: Meeting Talks are ATTENDEE idea generated. Want to HEAR a talk: POST a request for speaker to the list. Know a SPEAKER: POST to the list. Speakers are CONFIRMED by an attendee guaranteeing to ATTEND that talk, POSTING that to the list, and HANDLING ARRANGEMENTS with the speaker. ---VIDEOCONFERENCE: Hopefully, this will become a WORLD WIDE SIMULTANEOUS event. We hope to LIVE VIDEO STREAM talks to other participating groups. At this meeting we might setup an IRC channel, BITP, (perhaps on freenode?). We might try to set up an audio or video streaming test. JULY tentative planned talk topic: BACKUPS See MORE TALK IDEAS BELOW, and post to the buug mail list if there is a talk you would like to HEAR or PRESENT. === POTLUCK: (Optional) If you want to: BRING $4 OF FOOD TO SHARE. Eat. Enjoy conversation with other attendees. Note: The food is only brought by attendees, there is no entity paying for the food, except each attendee pays for whatever they bring. So, obviously, be respectful of others and don't eat more than the value of what you yourself brought. You can BRING: MAIN COURSE, VEGETABLES, FRUIT, SALAD, DESERT, DRINK (no alcohol, please), SNACKS. It might be helpful for the first several meetings if people brought something from MORE THAN ONE CATEGORY of item. That way there will be more variety. It's great to get something ON SALE from the grocery store. Of course, you DON'T HAVE TO BRING anything, or $4 worth of items. But, please be considerate of others, and don't eat more than the value of what you brought. Thank you. Please help clean up when through. Thank you. ===== ===== === Please RSVP % If you think you _might_ come to the ITP, please send an RSVP % message to the buug.org mailing list http://www.weak.org/mailman/listinfo/buug stating your best current estimate of the probability you'd attend on Saturday Jun 7, using probability of 25 50 75 or 100 %, & PUT your % # IN THE SUBJECT LINE OF THE MESSAGE. Thank you. (Equation between probability % and english language concepts: 25 = small possibility 50 = maybe 75 = more likely than not 100 = definitely ) This will help us as a guide to planning. Thank you. Note: It is NOT NECESSARY to RSVP %, but would be helpful to us. If you aren't able to or didn't send an RSVP % message, please DO ATTEND. Here is a good subject line to use for your RSVP %: June 7 ITP RSVP %=## === DIRECTIONS: http://maps.google.com/maps?f=d&hl=en&geocode=&saddr=&daddr=37.873592,-122.257807&mra=mi&mrsp=0&sz=16&sll=37.873625,-122.257807&sspn=0.008825,0.012703&ie=UTF8&t=h&z=16 CAR: 580/80 Eastshore Freeway to Berkeley, University Ave. exit, up University to UCB. BART: Berkeley Downtown exit. Walk or Campus bus to Hearst Mining Circle. On Saturday there might be some on campus parking, but there is off campus street parking, and a big pay parking lot at the corner of Hearst & Gayley, at the Northeast corner of campus. You can drive to Evans Hall to unload something from your car. Evans Hall is at B5 in this map: http://www.berkeley.edu/map/maps/large_map.html === CARPOOLING: A GREAT IDEA! Post a request or announcement to the list. http://www.weak.org/mailman/listinfo/buug Here are handy email subject lines: CARPOOLING Ride WANTED from xyz Sat June 7 CARPOOLING Ride OFFERRED from xyz Sat June 7 === MORE TALK IDEAS: For the 1st meeting some talk possibilities are: 0) ETHICAL SPAMMING - Howto send announcement emails automatically to many group email lists. - Do you know how to do this? CAN YOU GIVE AN INFORMAL HOWTO TALK ABOUT THIS at the JUNE MEETING? 1) Difference between Ubuntu8.4 & Debian 2) OLPC - Sugar OS project 3) Google Summer of Code - how you can help 4) PGP & personal keysigning 5) Mozilla 3 - the beta's features & how to help - the "show me the code" session? 6) Python08 conference highlights 7) LinuxPicnic (in SiValley) preparations/planning/how to help 8) LinuxWorld Expo San Francisco group booths What other topics are HOT now & would be good to have talks on? What would YOU like to HEAR a talk on? Would YOU like to GIVE a talk? What SUBJECT? === FEEL FREE TO SEND THIS ANNOUNCEMENT TO ANY RELEVANT LISTS/PEOPLE. Thank you. I hope to see you there. :) -- http://www.fastmail.fm - Same, same, but different From dan at peeron.com Fri Jun 6 13:04:01 2008 From: dan at peeron.com (Dan Boger) Date: Fri, 6 Jun 2008 13:04:01 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) Message-ID: I'm a little bit confused here, maybe one of you guys can spot what I'm missing. I have some files on an NFS filesystem, that is set to root_squash. The file is owned by my network id (dboger), while I'm logged in locally as dan: dan at dbdb$ ls -l somefile.png -r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png I'm trying to figure out if a file is readable, so I do something like: dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png dan at dbdb$ That is correct - the file is owned by a different UID, and is set to 0400. Now, I try the same thing as root: dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png lies dan at dbdb$ sudo file somefile.png couldn't open file somefile.png: regular file, no read permission Is perl just assuming that if I'm root I can always read the file, even though the permissions say that's wrong? What am I missing? Dan -- Dan Boger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/9d8e8c72/attachment.html From garth.webb at gmail.com Fri Jun 6 13:10:54 2008 From: garth.webb at gmail.com (Garth Webb) Date: Fri, 6 Jun 2008 13:10:54 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: Message-ID: Your OS says that root can read everything: [garth at saba test]$ ls -l foo -r-------- 1 someuser someuser 5 2008-06-06 13:09 foo [garth at saba test]$ cat foo cat: foo: Permission denied [garth at saba test]$ su Password: [root at saba test]# cat foo Blah [root at saba test]# On Fri, Jun 6, 2008 at 1:04 PM, Dan Boger wrote: > I'm a little bit confused here, maybe one of you guys can spot what I'm > missing. > > I have some files on an NFS filesystem, that is set to root_squash. The > file is owned by my network id (dboger), while I'm logged in locally as dan: > > dan at dbdb$ ls -l somefile.png > -r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png > > I'm trying to figure out if a file is readable, so I do something like: > > dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png > dan at dbdb$ > > That is correct - the file is owned by a different UID, and is set to 0400. > > Now, I try the same thing as root: > > dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png > lies > dan at dbdb$ sudo file somefile.png > couldn't open file > somefile.png: regular file, no read permission > > Is perl just assuming that if I'm root I can always read the file, even > though the permissions say that's wrong? > > What am I missing? > > Dan > > -- > Dan Boger > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/02a945c3/attachment.html From biztos at mac.com Fri Jun 6 13:14:59 2008 From: biztos at mac.com (frosty) Date: Fri, 06 Jun 2008 13:14:59 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: Message-ID: <9957A25E-011A-1000-8637-195E450E75A2-Webmail-10023@mac.com> My first suspicion was that something funny is going on with either the NFS or the "file" command, most likely the former. I just checked and on a local filesystem it's consistent, at least in my world (Perl 5.8.6 on RHEL 4.5 i386). user at localhost ~ $ ls -l somefile -r-------- 1 postgres postgres 4 May 27 17:46 somefile user at localhost ~ $ sudo perl -le 'print "lies" if -r shift' somefile lies user at localhost ~ $ sudo file somefile somefile: ASCII text user at localhost ~ $ file somefile somefile: regular file, no read permission user at localhost ~ $ cat somefile cat: somefile: Permission denied user at localhost ~ $ sudo cat somefile yep user at localhost ~ $ -- f. On Friday, June 06, 2008, at 01:04PM, "Dan Boger" wrote: >I'm a little bit confused here, maybe one of you guys can spot what I'm >missing. > >I have some files on an NFS filesystem, that is set to root_squash. The >file is owned by my network id (dboger), while I'm logged in locally as dan: > >dan at dbdb$ ls -l somefile.png >-r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png > >I'm trying to figure out if a file is readable, so I do something like: > >dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png >dan at dbdb$ > >That is correct - the file is owned by a different UID, and is set to 0400. > >Now, I try the same thing as root: > >dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png >lies >dan at dbdb$ sudo file somefile.png >couldn't open file >somefile.png: regular file, no read permission > >Is perl just assuming that if I'm root I can always read the file, even >though the permissions say that's wrong? > >What am I missing? > >Dan > >-- >Dan Boger > From dan at peeron.com Fri Jun 6 13:49:23 2008 From: dan at peeron.com (Dan Boger) Date: Fri, 6 Jun 2008 13:49:23 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: <9957A25E-011A-1000-8637-195E450E75A2-Webmail-10023@mac.com> References: <9957A25E-011A-1000-8637-195E450E75A2-Webmail-10023@mac.com> Message-ID: I believe this is *only* on an NFS filesystem with root_squash. I guess it counts as a local-filesystem according to the manpage: Also note that, for the superuser on the local filesystems, the "-r", "-R", "-w", and "-W" tests always return 1, and "-x" and "-X" return 1 if any execute bit is set in the mode. Scripts run by the superuser may thus need to do a stat() to determine the actual mode of the file, or temporarily set their effective uid to something else. Dan On Fri, Jun 6, 2008 at 1:14 PM, frosty wrote: > My first suspicion was that something funny is going on with either the NFS > or the "file" command, most likely the former. > > I just checked and on a local filesystem it's consistent, at least in my > world (Perl 5.8.6 on RHEL 4.5 i386). > > user at localhost ~ $ ls -l somefile > -r-------- 1 postgres postgres 4 May 27 17:46 somefile > user at localhost ~ $ sudo perl -le 'print "lies" if -r shift' somefile > lies > user at localhost ~ $ sudo file somefile > somefile: ASCII text > user at localhost ~ $ file somefile > somefile: regular file, no read permission > user at localhost ~ $ cat somefile > cat: somefile: Permission denied > user at localhost ~ $ sudo cat somefile > yep > user at localhost ~ $ > > -- f. > > On Friday, June 06, 2008, at 01:04PM, "Dan Boger" wrote: > >I'm a little bit confused here, maybe one of you guys can spot what I'm > >missing. > > > >I have some files on an NFS filesystem, that is set to root_squash. The > >file is owned by my network id (dboger), while I'm logged in locally as > dan: > > > >dan at dbdb$ ls -l somefile.png > >-r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png > > > >I'm trying to figure out if a file is readable, so I do something like: > > > >dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png > >dan at dbdb$ > > > >That is correct - the file is owned by a different UID, and is set to > 0400. > > > >Now, I try the same thing as root: > > > >dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png > >lies > >dan at dbdb$ sudo file somefile.png > >couldn't open file > >somefile.png: regular file, no read permission > > > >Is perl just assuming that if I'm root I can always read the file, even > >though the permissions say that's wrong? > > > >What am I missing? > > > >Dan > > > >-- > >Dan Boger > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -- Dan Boger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/6e83321a/attachment.html From dat1965 at yahoo.com Fri Jun 6 13:50:34 2008 From: dat1965 at yahoo.com (David Thompson) Date: Fri, 6 Jun 2008 13:50:34 -0700 (PDT) Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: Message-ID: <286395.96448.qm@web55107.mail.re4.yahoo.com> --- Dan Boger wrote: > I'm a little bit confused here, maybe one of you guys can spot what I'm > missing. > > I have some files on an NFS filesystem, that is set to root_squash. The > file is owned by my network id (dboger), while I'm logged in locally as dan: > > dan at dbdb$ ls -l somefile.png > -r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png > > I'm trying to figure out if a file is readable, so I do something like: > > dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png > dan at dbdb$ > > That is correct - the file is owned by a different UID, and is set to 0400. > > Now, I try the same thing as root: > > dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png > lies I agree, I think this output is incorrect. If you're using root_squash, you should be accessing this file on the NFS server as user "nobody", right? What does the "nobody" account look like on the NFS server? > dan at dbdb$ sudo file somefile.png > couldn't open file > somefile.png: regular file, no read permission > > Is perl just assuming that if I'm root I can always read the file, even > though the permissions say that's wrong? > > What am I missing? From extasia at extasia.org Fri Jun 6 14:01:09 2008 From: extasia at extasia.org (David Alban) Date: Fri, 6 Jun 2008 14:01:09 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: <9957A25E-011A-1000-8637-195E450E75A2-Webmail-10023@mac.com> Message-ID: <4c714a9c0806061401x338b7ca3o7206d5372ae4e7b6@mail.gmail.com> "...depends on what the meaning of 'is' is..." then what does it mean for the file to be readable? it's file mode indicates some user,group or the entire world can read it or... some real user (whether root or not) can actually read it apparently there are situations where these aren't the same. On Fri, Jun 6, 2008 at 1:49 PM, Dan Boger wrote: > I believe this is *only* on an NFS filesystem with root_squash. I guess it > counts as a local-filesystem according to the manpage: > > Also note that, for the superuser on the local filesystems, > the "-r", "-R", "-w", and > "-W" tests always return 1, and "-x" and "-X" return 1 if any > execute bit is set in the > mode. Scripts run by the superuser may thus need to do a > stat() to determine the > actual mode of the file, or temporarily set their effective > uid to something else. -- Live in a world of your own, but always welcome visitors. From dan at peeron.com Fri Jun 6 14:09:15 2008 From: dan at peeron.com (Dan Boger) Date: Fri, 6 Jun 2008 14:09:15 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: <286395.96448.qm@web55107.mail.re4.yahoo.com> References: <286395.96448.qm@web55107.mail.re4.yahoo.com> Message-ID: On Fri, Jun 6, 2008 at 1:50 PM, David Thompson wrote: > If you're using root_squash, you should be accessing this > file on the NFS server as user "nobody", right? What does > the "nobody" account look like on the NFS server? what do you mean 'look like'? it exists, I assume (but I don't actually have access to it to check). Dan -- Dan Boger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/73c690b5/attachment.html From dan at peeron.com Fri Jun 6 14:11:48 2008 From: dan at peeron.com (Dan Boger) Date: Fri, 6 Jun 2008 14:11:48 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: <4c714a9c0806061401x338b7ca3o7206d5372ae4e7b6@mail.gmail.com> References: <9957A25E-011A-1000-8637-195E450E75A2-Webmail-10023@mac.com> <4c714a9c0806061401x338b7ca3o7206d5372ae4e7b6@mail.gmail.com> Message-ID: On Fri, Jun 6, 2008 at 2:01 PM, David Alban wrote: > "...depends on what the meaning of 'is' is..." > > then what does it mean for the file to be readable? > > it's file mode indicates some user,group or the entire world can read it > > or... > > some real user (whether root or not) can actually read it > > apparently there are situations where these aren't the same. Well, the definition, afaik, is "the current process will succeed if it tried to read this file". Dan -- Dan Boger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/72c5890c/attachment.html From asheesh at asheesh.org Fri Jun 6 14:13:14 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Fri, 6 Jun 2008 14:13:14 -0700 (PDT) Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: <286395.96448.qm@web55107.mail.re4.yahoo.com> Message-ID: On Fri, 6 Jun 2008, Dan Boger wrote: > On Fri, Jun 6, 2008 at 1:50 PM, David Thompson wrote: > >> If you're using root_squash, you should be accessing this >> file on the NFS server as user "nobody", right? What does >> the "nobody" account look like on the NFS server? > > > what do you mean 'look like'? it exists, I assume (but I don't actually > have access to it to check). The '"nobody" account' just means, use UID -1 (which wraps around to 65535 iirc). Anyway, I agree that this behavior in Perl is broken - what's the point of a 'read' test whose return value must be double-checked?! -- Asheesh. -- Good advice is something a man gives when he is too old to set a bad example. -- La Rouchefoucauld From not.com at gmail.com Fri Jun 6 17:13:08 2008 From: not.com at gmail.com (yary) Date: Fri, 6 Jun 2008 17:13:08 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: Message-ID: <75cbfa570806061713y786d51c7ia28f264f470dfd71@mail.gmail.com> On Fri, Jun 6, 2008 at 1:04 PM, Dan Boger wrote: ... > I have some files on an NFS filesystem, that is set to root_squash. To be clear, root_squash means that NFS requests from any client as root get turned into requests from "nobody": "root_squash - Requests from root clients are mapped to the nobody user and group ID " > The > file is owned by my network id (dboger), while I'm logged in locally as dan: > > dan at dbdb$ ls -l somefile.png > -r-------- 1 dboger 3813 2008-06-05 16:46 somefile.png > > I'm trying to figure out if a file is readable, so I do something like: > > dan at dbdb$ perl -le 'print "lies" if -r shift' somefile.png > dan at dbdb$ > > That is correct - the file is owned by a different UID, and is set to 0400. > > Now, I try the same thing as root: > > dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png > lies > dan at dbdb$ sudo file somefile.png > couldn't open file > somefile.png: regular file, no read permission > > Is perl just assuming that if I'm root I can always read the file, even > though the permissions say that's wrong? As Garth noted, perl is asking the OS, and the OS is saying root can read it- and the OS would let root read it, if it were on a local filesystem. But the NFS server sees that the client says it's root, and the NFS server then translates it into a request from "nobody", and then the NFS server refuses to serve the file... If you really want to treat NFS clients "root" as local "root", set the option to no_root_squash If you want a more reliable readability test, then use something like open IN,'<',$ARGV[0] or die "Cannot read file '$ARGV[0]': $!, stopped"; From sphink at gmail.com Fri Jun 6 17:28:05 2008 From: sphink at gmail.com (Steve Fink) Date: Fri, 6 Jun 2008 17:28:05 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: Message-ID: <7d7f2e8c0806061728l68aa7761o61cd987dc4d32329@mail.gmail.com> > dan at dbdb$ sudo perl -le 'print "lies" if -r shift' somefile.png > lies > dan at dbdb$ sudo file somefile.png > couldn't open file > somefile.png: regular file, no read permission > > Is perl just assuming that if I'm root I can always read the file, even > though the permissions say that's wrong? Does it do any better with: sudo perl -Mfiletest=access -le 'print "lies" if -r shift' somefile.png ? There's a good chance it still won't work: access() may not work correctly on NFS file systems with UID mapping enabled, because UID mapping is done on the server and hidden from the client, which checks permissions. Also... what are you doing it for? There are a number of legitimate uses, but it's also a common race condition -- just because something is readable at the moment you checked doesn't mean that it'll still be readable when you try to read it. So if you really depend on it being correct, then you'll have to just try to do the operation and check failure then. From not.com at gmail.com Fri Jun 6 17:30:29 2008 From: not.com at gmail.com (yary) Date: Fri, 6 Jun 2008 17:30:29 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: References: <286395.96448.qm@web55107.mail.re4.yahoo.com> Message-ID: <75cbfa570806061730x4b97c1c1h5eaae863f4440ca7@mail.gmail.com> On Fri, Jun 6, 2008 at 2:13 PM, Asheesh Laroia wrote: ... > > Anyway, I agree that this behavior in Perl is broken - what's the point of > a 'read' test whose return value must be double-checked?! You'll find it's not just perl- C, python, php, etc will all do the same, they all use the same system calls. The operating system looks at the permission bits (and access control list, if any) and returns its pronouncement based on the effective user/group ID. The OS doesn't know that some underlying filesystem will chose to disregard or change the user ID... that particular call "stat" predates the invention of NFS... Another time these calls may "fail" is when checking for writeability of files on a volume mounted read-only. One could argue that there needs to be a better OS level interface for testing files than 'stat'- which basically returns the directory entry, ie owner/group of file + permissions + access/change times, etc- and lets the caller decide readability, etc from that. Would be nice if you could ask the OS "can this user/group read/write/execute this file", have the OS ask the filesystem... which happens when you use "open", and then read/write/execute- so always check those return values! From dan at peeron.com Fri Jun 6 17:31:59 2008 From: dan at peeron.com (Dan Boger) Date: Fri, 6 Jun 2008 17:31:59 -0700 Subject: [sf-perl] Bug in perl (or does -r not do what I think?) In-Reply-To: <7d7f2e8c0806061728l68aa7761o61cd987dc4d32329@mail.gmail.com> References: <7d7f2e8c0806061728l68aa7761o61cd987dc4d32329@mail.gmail.com> Message-ID: On Fri, Jun 6, 2008 at 5:28 PM, Steve Fink wrote: > Also... what are you doing it for? There are a number of legitimate > uses, but it's also a common race condition -- just because something > is readable at the moment you checked doesn't mean that it'll still be > readable when you try to read it. So if you really depend on it being > correct, then you'll have to just try to do the operation and check > failure then. > I was just testing because a following operation blows up badly if the file isn't readable, and doesn't give useful error messages (specifically, GD's new PNG from file call). So I add this test so that I can post my own error and not try the GD call. I did end up adding an 'open' call to see if I can actually read it. -- Dan Boger -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080606/28433793/attachment.html From afife at untangle.com Mon Jun 9 23:20:18 2008 From: afife at untangle.com (Andrew Fife) Date: Mon, 9 Jun 2008 23:20:18 -0700 (PDT) Subject: [sf-perl] Andrew Morton @ BALUG (New Date = 6/24) Message-ID: <00e101c8cac2$140335c0$4101a8c0@afmeatloaf> Howdy Folks: BALUG is very proud to host Andrew Morton as our speaker on Tuesday, June 24th. (PLEASE NOTE: this is not our regular meeting date... There will be NO MEETING on the 3rd Tuesday) Andrew Morton is a lead linux kernel developer and a key kernel maintainer. Andrew Morton is curious what you want to hear him speak about, so please let us know if you have any questions for him. More on Andrew Morton here: http://en.wikipedia.org/wiki/Andrew_Morton_(computer_programmer) If you'd like to come, please RSVP: RSVP at balug.org ===Why RSVP?=== RSVPs are really important to BALUG, but don't worry we won't turn you away if you forget or decide to come last minute. However, if we don't have enough RSVPs by the Friday before the meeting, we won't be able to eat buffet style in the private banquet room upstairs. It's a much nicer meeting to have the upstairs banquet room, so please RSVP early... Why not now? Meeting Details... 6:30pm June 24th, 2008 (Tuesday) Four Seas Restaurant 731 Grant Ave. San Francisco, CA 94108 Easy $5 Parking: http://www.portsmouthsquaregarage.com/ Cost = $13 for dinner, but the meeting itself is free Upcoming 2008 speakers include: July - Mike Linksyaver (Creative Commons) Aug - TBD Sept - Ian Murdock (Debian & Sun) Signup for BALUG's extremely low volume announce list: http://lists.balug.org/listinfo.cgi/balug-announce-balug.org About BALUG: ------------ BALUG is lively gathering of Linux users & free software enthusiasts that combines great food, community & intimate access to featured speakers. We meet in the bar of the Four Seas Restaurant from 6:30pm. At 7pm, we share a family-style Chinese dinner, which is followed by our guest speaker. BALUG Mailing list Policy: -------------------------- BALUG promises not to abuse other LUGs mailing lists. Our current policy is to make one monthly announcement on other Bay Area LUGs mailing lists. On high volume lists, we may also post a reminder. If you feel this is not appropriate for a particular list, please tell us which list and what you feel would be a more appropriate policy for that list. We are very open to this feedback. Please send feedback to balug-contact at balug.org. -- Andrew Fife Untangle - The Open Source Network Gateway www.untangle.com/download 650.425.3327 desk 415.806.6028 cell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080609/b248deb0/attachment.html From kenuhl at berkeley.edu Fri Jun 13 17:01:44 2008 From: kenuhl at berkeley.edu (ken uhl) Date: Fri, 13 Jun 2008 17:01:44 -0700 Subject: [sf-perl] FORMS - page "navigation" Message-ID: <48530A68.6060105@berkeley.edu> Hi, my Forms are not "acting" nicely, page to page flow is not correct, Page one prompts for search criteria: ... $scriptname = $q->script_name(); ... ... .... The submit button goes nicely to second page results. Second page : Dispplays table of results, and buttons to do bulk delete, which should retrieve selected check box values: $scriptname = $q->script_name(); ... ... This goes back to page one. I want it to continue - checking page params - specifically to retrieve selected check boxes, but It does not progress. Any Help would be greatly appreciated . Ken Uhl UC Berkeley. From dave at wrightpopcorn.com Fri Jun 13 17:54:03 2008 From: dave at wrightpopcorn.com (Dave Turner) Date: Fri, 13 Jun 2008 17:54:03 -0700 Subject: [sf-perl] FORMS - page "navigation" In-Reply-To: <48530A68.6060105@berkeley.edu> References: <48530A68.6060105@berkeley.edu> Message-ID: <485316AB.8010408@wrightpopcorn.com> Try looking at a dispatch table. That way you can dispatch to a page based on your parameters. From Wikikpedia (http://en.wikipedia.org/wiki/Dispatch_table) |#define the table using one anonymous code-ref and one named code-ref my %dispatch = ( "-h" => sub { print "hello\n"; }, "-g" => \&say_goodbye ); sub say_goodbye { print "goodbye\n"; } #fetch the code ref from the table, and invoke it my $sub = $dispatch{$ARGV[0]}; and this: http://dren.ch/perl_dispatch_tables/ Hope that helps! print $sub ? $sub->() : "unknown argument\n"; | ken uhl wrote: > Hi, my Forms are not "acting" nicely, page to page flow is not correct, > > Page one prompts for search criteria: > ... > $scriptname = $q->script_name(); > ... > > ... > > .... > The submit button goes nicely to second page results. > > > Second page : > Dispplays table of results, and buttons to do bulk delete, which > should retrieve selected check box values: > > $scriptname = $q->script_name(); > ... > > ... > > > This goes back to page one. > I want it to continue - checking page params - specifically to retrieve > selected check boxes, > but It does not progress. > > Any Help would be greatly appreciated . > > Ken Uhl > UC Berkeley. > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG. > Version: 8.0.100 / Virus Database: 270.3.0/1501 - Release Date: 6/13/2008 6:33 AM > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080613/deb2cb58/attachment.html From vlb at cfcl.com Mon Jun 16 10:31:35 2008 From: vlb at cfcl.com (Vicki Brown) Date: Mon, 16 Jun 2008 10:31:35 -0700 Subject: [sf-perl] FS: Asus eee pc 8gb Message-ID: For sale: Essentially unused. * Asus Eee PC 8G 800 MHz Intel Celeron Processor, 1 GB RAM, 8 GB Solid-State Disk * Pearl white * Ultra-compact notebook with full QWERTY keyboard and 7-inch color display * Product Dimensions: 6.3 x 8.9 x 0.8 inches ; 2 pounds * Linux preloaded (compatible with Windows XP) * Over 40 built-in applications for learn, work and play; * 3.5-hour battery life * 8 GB solid-state flash memory drive; 1 GB RAM; 10/100 Fast Ethernet; 54g Wi-Fi (802.11b/g) * Connectivity: three USB 2.0; VGA output; microphone and headphone; Secure Digital card reader * external mouse; AC adaptor * 3rd party fitted leather case included ($29 value :) I paid $500. If you're interested, make me an offer. http://www.amazon.com/Asus-Celeron-Processor-Solid-State-Preloaded/dp/B000ZLO3D4/ref=pd_bbs_1?ie=UTF8&s=electronics&qid=1211681535&sr=8-1 http://www.amazon.com/review/R2E67U9U85NJAO/ref=cm_cr_rdp_perm -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://twitter.com/vlb From friedman at highwire.stanford.edu Mon Jun 16 10:55:38 2008 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Mon, 16 Jun 2008 10:55:38 -0700 Subject: [sf-perl] FS: Asus eee pc 8gb In-Reply-To: References: Message-ID: Ooh! Are you upgrading to a 901? I've been meaning to ask someone who owned an Eee: how is it for writing code? I've never used the KDE editor/IDE that comes pre- installed, but I'm curious how it does with perl code. (Perl is a litmus test for syntax highlighting prowess in my opinion. :-) ) Curious, -- Mike On Jun 16, 2008, at 10:31 AM, Vicki Brown wrote: > For sale: Essentially unused. > * Asus Eee PC 8G > 800 MHz Intel Celeron Processor, 1 GB RAM, 8 GB Solid-State Disk > * Pearl white > * Ultra-compact notebook with full QWERTY keyboard and 7-inch > color display > * Product Dimensions: 6.3 x 8.9 x 0.8 inches ; 2 pounds > * Linux preloaded (compatible with Windows XP) > * Over 40 built-in applications for learn, work and play; > * 3.5-hour battery life > * 8 GB solid-state flash memory drive; 1 GB RAM; 10/100 Fast > Ethernet; > 54g Wi-Fi (802.11b/g) > * Connectivity: three USB 2.0; VGA output; microphone and > headphone; > Secure Digital card reader > * external mouse; AC adaptor > * 3rd party fitted leather case included ($29 value :) > > I paid $500. If you're interested, make me an offer. > > http://www.amazon.com/Asus-Celeron-Processor-Solid-State-Preloaded/dp/B000ZLO3D4/ref=pd_bbs_1?ie=UTF8&s=electronics&qid=1211681535&sr=8-1 > > http://www.amazon.com/review/R2E67U9U85NJAO/ref=cm_cr_rdp_perm > -- > - Vicki > > ZZZ > zzZ San Francisco Bay Area, CA > z |\ _,,,---,,_ Books, Cats, Tech > zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb > |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog > '---''(_/--' `-'\_) http://twitter.com/vlb > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From biztos at mac.com Mon Jun 16 12:47:23 2008 From: biztos at mac.com (frosty) Date: Mon, 16 Jun 2008 12:47:23 -0700 Subject: [sf-perl] FS: Asus eee pc 8gb In-Reply-To: References: Message-ID: <93DBAB92-011A-1000-830D-52B87BF44514-Webmail-10011@mac.com> (veering even further off topic...) Kate, the KDE text editor, does a very good job of Perl syntax highlighting in my opinion. Not perfect of course, and not the gold standard of vim, but good enough for almost all work. I use TextMate now but used to use Kate, and I'd say the TextMate syntax highlighting is a tiny bit better, but not much. Also, Kate has *really* good printing, if you're into dead trees. However, I would be wary of using Kate on such a small screen. -- frosty On Monday, June 16, 2008, at 10:56AM, "Michael Friedman" wrote: >Ooh! Are you upgrading to a 901? > >I've been meaning to ask someone who owned an Eee: how is it for >writing code? I've never used the KDE editor/IDE that comes pre- >installed, but I'm curious how it does with perl code. (Perl is a >litmus test for syntax highlighting prowess in my opinion. :-) ) > >Curious, >-- Mike > >On Jun 16, 2008, at 10:31 AM, Vicki Brown wrote: > >> For sale: Essentially unused. >> * Asus Eee PC 8G >> 800 MHz Intel Celeron Processor, 1 GB RAM, 8 GB Solid-State Disk >> * Pearl white >> * Ultra-compact notebook with full QWERTY keyboard and 7-inch >> color display >> * Product Dimensions: 6.3 x 8.9 x 0.8 inches ; 2 pounds >> * Linux preloaded (compatible with Windows XP) >> * Over 40 built-in applications for learn, work and play; >> * 3.5-hour battery life >> * 8 GB solid-state flash memory drive; 1 GB RAM; 10/100 Fast >> Ethernet; >> 54g Wi-Fi (802.11b/g) >> * Connectivity: three USB 2.0; VGA output; microphone and >> headphone; >> Secure Digital card reader >> * external mouse; AC adaptor >> * 3rd party fitted leather case included ($29 value :) >> >> I paid $500. If you're interested, make me an offer. >> >> http://www.amazon.com/Asus-Celeron-Processor-Solid-State-Preloaded/dp/B000ZLO3D4/ref=pd_bbs_1?ie=UTF8&s=electronics&qid=1211681535&sr=8-1 >> >> http://www.amazon.com/review/R2E67U9U85NJAO/ref=cm_cr_rdp_perm >> -- >> - Vicki >> >> ZZZ >> zzZ San Francisco Bay Area, CA >> z |\ _,,,---,,_ Books, Cats, Tech >> zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb >> |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog >> '---''(_/--' `-'\_) http://twitter.com/vlb >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > >--------------------------------------------------------------------- >Michael Friedman HighWire Press >Phone: 650-725-1974 Stanford University >FAX: 270-721-8034 >--------------------------------------------------------------------- > > >_______________________________________________ >SanFrancisco-pm mailing list >SanFrancisco-pm at pm.org >http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > From rich.morin at reactrix.com Mon Jun 16 14:31:49 2008 From: rich.morin at reactrix.com (Rich Morin) Date: Mon, 16 Jun 2008 14:31:49 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help Message-ID: Chuck Clanton is looking for some folks who haven't played with out WAVEscape (interactive advertising) device for some user testing. If you have some free time, this might be a fun and interesting way to spend it... -r --- begin forwarded text I am conducting a very important user test of WAVEScape next Thursday, 19 June, at our Warehouse facility, about 5 minutes from here. I need help from everyone in the company to get subjects for this test. I am hoping that each of you knows at least one person, age 18-35, that would like to try out this incredibly fun and innovative experience. I need 30 subjects, 18-35 years old, equal numbers of men and women. Test sessions will begin at 10am, 11.30am, 1.30pm, 3pm, and 4.30pm, and last for 90 minutes each. We will not be paying cash to subjects for this play test but we will have a chocolate tasting at the end of each session to thank people for their help. Please ask your family and friends to try to find at least one person willing to participate in this play test. They will have a good time, enjoy munching some chocolate, and help us launch WAVEScape into Hilton and malls. Ask anyone willing to participate to send me an email (cclanton at reactrix.com), preferably with all the session times they are available on Thursday. Thanks! This is a vital test for WAVEScape. Your help is appreciated. Chuck --- end forwarded text This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. From biztos at mac.com Mon Jun 16 17:25:08 2008 From: biztos at mac.com (frosty) Date: Mon, 16 Jun 2008 17:25:08 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help In-Reply-To: References: Message-ID: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> Rich, What is a WAVEScape, what does it have to do with Perl, and why should we work for your company for free? Seriously, the message doesn't make much of a pitch. So it's an interactive sandwich board, or what? Also, it would be great if you could be more specific (and less urgent) in subject lines on future solicitation mails. thanks -- frosty On Monday, June 16, 2008, at 02:35PM, "Rich Morin" wrote: >Chuck Clanton is looking for some folks who haven't played with >out WAVEscape (interactive advertising) device for some user >testing. If you have some free time, this might be a fun and >interesting way to spend it... > >-r > > >--- begin forwarded text > >I am conducting a very important user test of WAVEScape next >Thursday, 19 June, at our Warehouse facility, about 5 minutes from >here. I need help from everyone in the company to get subjects for >this test. I am hoping that each of you knows at least one person, >age 18-35, that would like to try out this incredibly fun and >innovative experience. I need 30 subjects, 18-35 years old, equal >numbers of men and women. Test sessions will begin at 10am, 11.30am, >1.30pm, 3pm, and 4.30pm, and last for 90 minutes each. We will not >be paying cash to subjects for this play test but we will have a >chocolate tasting at the end of each session to thank people for >their help. > >Please ask your family and friends to try to find at least one person >willing to participate in this play test. They will have a good >time, enjoy munching some chocolate, and help us launch WAVEScape >into Hilton and malls. > >Ask anyone willing to participate to send me an email >(cclanton at reactrix.com), preferably with all the session times they >are available on Thursday. > >Thanks! This is a vital test for WAVEScape. Your help is appreciated. > >Chuck > >--- end forwarded text > > > >This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. >_______________________________________________ >SanFrancisco-pm mailing list >SanFrancisco-pm at pm.org >http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > From rdm at cfcl.com Mon Jun 16 20:49:11 2008 From: rdm at cfcl.com (Rich Morin) Date: Mon, 16 Jun 2008 20:49:11 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help In-Reply-To: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> References: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> Message-ID: At 17:25 -0700 6/16/08, frosty wrote: > What is a WAVEScape, what does it have to do with Perl, and why > should we work for your company for free? > > Seriously, the message doesn't make much of a pitch. So it's an > interactive sandwich board, or what? > > Also, it would be great if you could be more specific (and less > urgent) in subject lines on future solicitation mails. All fair questions. It doesn't have anything in particular to do with Perl. However, as a long-term member of SFPUG, I've made a number of friends, so I thought of this group as a possible source of volunteer testers. I've played with the system myself and I do think it's fun and interesting. Anyone who thinks it won't be fun should take a pass on the trial. I didn't make much of a sales pitch because (a) I'm a techie, not a salesperson and (b) I wasn't sure how much exposure Chuck wants the volunteers to have. That said, WAVEscape is an interactive advertising device (sort of like a video game or kiosk) that can interact with users up to 15' feet away, using 3D sensing. If you want to see one in action, cruise over to http://www.reactrix.com. Finally, I apologize for retaining the subject line. It simply didn't occur to me to change it. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From friedman at highwire.stanford.edu Mon Jun 16 22:19:26 2008 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Mon, 16 Jun 2008 22:19:26 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help In-Reply-To: References: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> Message-ID: Also, isn't this the thing installed at the Metreon that someone did a SFPM talk about? ... oh yeah, here it is, Nov. 2006: On 11/18/06 Steve Fink wrote: > On 11/10/06, Quinn Weaver wrote: >> You know that thing in the Metreon? The video game that's projected >> onto the floor, where you can run around and "kick" objects, and they >> bounce around? http://westfield.com/metreon/ >> >> Turns out it's written in Perl. Our own Steve Fink will talk >> about how he used XS and OpenGL to accomplish the task. This will be >> a highly technical talk. > > To clarify: the system is not really "written in Perl". It is > written in C++, but both extends and embeds Perl as a scripting > language for advanced functionality (or, not uncommonly, working > around bugs in the built-in functionality of the last release!) I > did it in such a way that you *could* implement almost anything in > Perl that you could in the C++ code, although in practice we limit > our use of Perl to areas where scripting is just a much better fit > (complex behavior, integration with external services, prototyping). So it is even Perl related. (or at least *was*, two years ago) -- Mike, armchair historian On Jun 16, 2008, at 8:49 PM, Rich Morin wrote: > At 17:25 -0700 6/16/08, frosty wrote: >> What is a WAVEScape, what does it have to do with Perl, and why >> should we work for your company for free? >> >> Seriously, the message doesn't make much of a pitch. So it's an >> interactive sandwich board, or what? >> >> Also, it would be great if you could be more specific (and less >> urgent) in subject lines on future solicitation mails. > > All fair questions. It doesn't have anything in particular to do > with Perl. However, as a long-term member of SFPUG, I've made a > number of friends, so I thought of this group as a possible source > of volunteer testers. I've played with the system myself and I do > think it's fun and interesting. Anyone who thinks it won't be fun > should take a pass on the trial. > > I didn't make much of a sales pitch because (a) I'm a techie, not > a salesperson and (b) I wasn't sure how much exposure Chuck wants > the volunteers to have. That said, WAVEscape is an interactive > advertising device (sort of like a video game or kiosk) that can > interact with users up to 15' feet away, using 3D sensing. If you > want to see one in action, cruise over to http://www.reactrix.com. > > Finally, I apologize for retaining the subject line. It simply > didn't occur to me to change it. > > -r > -- > http://www.cfcl.com/rdm Rich Morin > http://www.cfcl.com/rdm/resume rdm at cfcl.com > http://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From rdm at cfcl.com Tue Jun 17 04:04:56 2008 From: rdm at cfcl.com (Rich Morin) Date: Tue, 17 Jun 2008 04:04:56 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help In-Reply-To: References: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> Message-ID: > So it is even Perl related. (or at least *was*, two years ago) The (interactive) parts of the system that Steve talked about are still written in a combination of XML, Perl, and C++. My own work, on the server side, uses Rails for most things, but there are a few Perl scripts there, as well. Not that any of this would be visible from using the system (:-). -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From sphink at gmail.com Tue Jun 17 11:15:45 2008 From: sphink at gmail.com (Steve Fink) Date: Tue, 17 Jun 2008 11:15:45 -0700 Subject: [sf-perl] Fwd: RE: Important...I need your help In-Reply-To: References: <93DBAB92-011A-1000-89A6-52B87BF44514-Webmail-10011@mac.com> Message-ID: <7d7f2e8c0806171115l3607f3cfk950d1d5e043412a5@mail.gmail.com> On Mon, Jun 16, 2008 at 10:19 PM, Michael Friedman wrote: > So it is even Perl related. (or at least *was*, two years ago) Oh, that was STEPscape, a completely different system that is pretty much exactly the same internally. :-) Marketing people do odd things. We could make it more Perl-related and possibly more interesting by letting you run a shell against the live system. It's kind of a console that lets you type Perl code in and have the running system evaluate the code in between frames. (Or you could run the whole system under the Perl debugger, which would let you do the same thing, but has to be done in advance and is a bit trickier to configure.) You can do pretty much anything to the system that way, although I mostly use it for popping up insulting messages. Or not. I may not be in the office that day; my wife will be in Colorado, and it'll be my little maggot's first day without nursing, so I may have to be home to distract him. And nobody else here even knows that the shell exists. Err... well, now Rich does. If you're in the area, though, WAVEscape would be a fun system to see and play with. And you get chocolate. So it's not a bad deal -- eat chocolate and play with cool toy. And if I happen to be around, yell Perl at it. (But let me know if anyone's interested in that; it'd be kind of fun, so I could try to arrange my schedule to be around. Nanny's got to earn her pay somehow.) From extasia at extasia.org Tue Jun 17 19:34:50 2008 From: extasia at extasia.org (David Alban) Date: Tue, 17 Jun 2008 19:34:50 -0700 Subject: [sf-perl] matching digits in braces in globs Message-ID: <4c714a9c0806171934j16d04a24q3557a49e675f8444@mail.gmail.com> greetings, i'd like to use File::Glob::bsd_glob() to match paths which may or may not end in the regular expression: m{ - \d{3} }x i'm in the classic situation where yes, tmtowtdi, and i can easily find workarounds, but i'd like to know why what i'm trying doesn't work. here's some example code that shows what i'm experiencing: use Data::Dumper; use File::Glob qw( :glob ); print "files:\n"; system "ls /tmp/tmp2"; print "\nglob #1, matching with bsd_glob (fails):\n"; $glob = '/tmp/tmp2/foo{-[0-9][0-9][0-9],}'; print Dumper $glob; print Dumper [ bsd_glob( $glob, GLOB_BRACE ) ]; print "\nglob #1, matching with core glob (fails):\n"; print Dumper '/tmp/tmp2/foo{-[0-9][0-9][0-9],}'; my @matches = ; print Dumper \@matches; print "\nglob #1, matching with bash (succeeds):\n"; print Dumper $glob; system qq{ ls -l $glob }; print "\nglob #2, matching with bsd_glob (not matching digits inside braces, so succeeds):\n"; my $glob = '/tmp/tmp2/foo{-???,}'; print Dumper $glob; print Dumper [ bsd_glob( $glob, GLOB_BRACE ) ]; print "\nglob #3, matching with bsd_glob (not matching digits inside braces, so succeeds):\n"; $glob = '/tmp/tmp2/foo[0-9][0-9][0-9]'; print Dumper $glob; print Dumper [ bsd_glob( $glob, GLOB_BRACE ) ]; here's the output: files: foo foo001 foo-001 foo.bar junk.perl glob #1, matching with bsd_glob (fails): $VAR1 = '/tmp/tmp2/foo{-[0-9][0-9][0-9],}'; $VAR1 = [ '/tmp/tmp2/foo' ]; glob #1, matching with core glob (fails): $VAR1 = '/tmp/tmp2/foo{-[0-9][0-9][0-9],}'; $VAR1 = [ '/tmp/tmp2/foo' ]; glob #1, matching with bash (succeeds): $VAR1 = '/tmp/tmp2/foo{-[0-9][0-9][0-9],}'; -rw-r--r-- 1 root root 0 Jun 18 01:49 /tmp/tmp2/foo -rw-r--r-- 1 root root 0 Jun 18 01:49 /tmp/tmp2/foo-001 glob #2, matching with bsd_glob (not matching digits inside braces, so succeeds): $VAR1 = '/tmp/tmp2/foo{-???,}'; $VAR1 = [ '/tmp/tmp2/foo-001', '/tmp/tmp2/foo' ]; glob #3, matching with bsd_glob (not matching digits inside braces, so succeeds): $VAR1 = '/tmp/tmp2/foo[0-9][0-9][0-9]'; $VAR1 = [ '/tmp/tmp2/foo001' ]; can anyone tell me why i can't match '-[0-9][0-9][0-9]' inside the braces? i did find the following in the bash man page: Brace expansion is performed before any other expansions, and any char- acters special to other expansions are preserved in the result. It is strictly textual. Bash does not apply any syntactic interpretation to the context of the expansion or the text between the braces. even if bsd_glob behaves like bash, that doesn't explain it. it simply means that the '[0-9]' are preserved for a subsequent expansion, and indeed, bash does finally expand and match these constructs. thanks, david -- Live in a world of your own, but always welcome visitors. From not.com at gmail.com Tue Jun 17 21:39:51 2008 From: not.com at gmail.com (yary) Date: Tue, 17 Jun 2008 21:39:51 -0700 Subject: [sf-perl] matching digits in braces in globs In-Reply-To: <4c714a9c0806171934j16d04a24q3557a49e675f8444@mail.gmail.com> References: <4c714a9c0806171934j16d04a24q3557a49e675f8444@mail.gmail.com> Message-ID: <75cbfa570806172139j3c19bd6dse8a11dce29d15a3b@mail.gmail.com> I don't have an answer to "why", but I do have a simpler test case $ touch foo001 $ perl -de 1 ... DB<1> p foo001 DB<2> p DB<3> q $ perl -v This is perl, v5.8.8 built for amd64-freebsd (with 1 registered patch, see perl -V for more detail) From not.com at gmail.com Wed Jun 18 08:51:03 2008 From: not.com at gmail.com (yary) Date: Wed, 18 Jun 2008 08:51:03 -0700 Subject: [sf-perl] matching digits in braces in globs In-Reply-To: <75cbfa570806172139j3c19bd6dse8a11dce29d15a3b@mail.gmail.com> References: <4c714a9c0806171934j16d04a24q3557a49e675f8444@mail.gmail.com> <75cbfa570806172139j3c19bd6dse8a11dce29d15a3b@mail.gmail.com> Message-ID: <75cbfa570806180851l2964dbc1s9d26c419049e018e@mail.gmail.com> Other test cases- I think these should all return "f23" $ touch f23 $ perl -de 1 ... DB<1> p f23 DB<2> p <{f*}> f23 DB<3> p f23 DB<4> p <{f[0-9][0-9]}> DB<5> p DB<6> p f23 DB<7> p <{f[0-9][0-9]}*> DB<8> p <{f[0-9][0-9]*}> DB<9> @n = ; print $n[0]," L=",length $n[0]; # be sure no hidden char f23 L=3 $ perl -de 1 '-MFile::Glob(bsd_glob)' ... DB<1> p bsd_glob('f*') f23 DB<2> p bsd_glob('{f[0-9][0-9]}') DB<3> p bsd_glob('{f[0-9][0-9]}',GLOB_ERR); print "\nerr=$!"; err= DB<4> p bsd_glob('{f[0-9][0-9]}',GLOB_LIMIT); print "\nerr=$!" err= I checked the tests in File/Glob/t and there's only test a simple case for brackets {a,b}- no cases with special characters inside the braces. It looks like a bug to me. Not completely sure though. From not.com at gmail.com Fri Jun 20 12:48:50 2008 From: not.com at gmail.com (yary) Date: Fri, 20 Jun 2008 12:48:50 -0700 Subject: [sf-perl] When/where was uppercase EQ, NE, etc ok? Message-ID: <75cbfa570806201248y53992481x3cf2ac08902d07b6@mail.gmail.com> I recently fixed up an old site being migrated from a WinNT box to a Win2003 server with Perl 5.10. The issue causing most pages to fail were pages that used 'EQ' and 'NE' instead of 'eq' and 'ne' for string comparisons. The original programmer is unavailable, and I don't have access to the old system, so I can't be sure if it worked on the old system, or if the original coder ran it through a processor, or if it was just a typo during a mass edit that went undetected... just curious, so asking here- Was there a flavor/edition/version of perl >=4 that allowed uppercase string comparison operators? This is in vanilla "pl" files, no templating, no source filters- in fact there are no "use"s or BEGINs or even packages. Which makes me suspect that perhaps it was originally written with perl v4... I started on perl4 but my memory of those days are a bit hazy. Just the unsightly single-quote package specifier! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080620/cb06e7de/attachment.html From merlyn at stonehenge.com Fri Jun 20 12:54:18 2008 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Fri, 20 Jun 2008 12:54:18 -0700 Subject: [sf-perl] When/where was uppercase EQ, NE, etc ok? In-Reply-To: <75cbfa570806201248y53992481x3cf2ac08902d07b6@mail.gmail.com> (not.com@gmail.com's message of "Fri, 20 Jun 2008 12:48:50 -0700") References: <75cbfa570806201248y53992481x3cf2ac08902d07b6@mail.gmail.com> Message-ID: <86od5vkhlh.fsf@blue.stonehenge.com> >>>>> "yary" == yary writes: yary> Was there a flavor/edition/version of perl >=4 that allowed uppercase yary> string comparison operators? This is in vanilla "pl" files, no yary> templating, no source filters- in fact there are no "use"s or BEGINs or yary> even packages. Which makes me suspect that perhaps it was originally yary> written with perl v4... I started on perl4 but my memory of those days yary> are a bit hazy. Just the unsightly single-quote package specifier! I believe it was deprecated in early Perl 5, and finally removed in 5.6, or maybe earlier. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion From rdm at cfcl.com Sun Jun 22 11:44:25 2008 From: rdm at cfcl.com (Rich Morin) Date: Sun, 22 Jun 2008 11:44:25 -0700 Subject: [sf-perl] BASS Meeting (SF), Wed. June 25 Message-ID: The Beer and Scripting SIG rides again! If you'd like to eat good Italian food, chat with other local scripters, and possibly take a look at laptop-demoed scripting hacks, this is the place to do it! For your convenience, here are the critical details: Date: Wednesday, June 25, 2008 (4th. Wed.) Time: 8:00 pm Place: Pasquales Pizzeria 701 Irving St. (At 8th. Ave.) San Francisco, California, USA 415/661-2140 See the BASS web page for more information: http://cfcl.com/rdm/bass/ -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From doom at kzsu.stanford.edu Mon Jun 23 09:26:38 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Mon, 23 Jun 2008 09:26:38 -0700 Subject: [sf-perl] meeting? Message-ID: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> Is there a meeting tomorrow? (Or do I get to go to the poetry reading at the 3300 Club this time? Having a fourth tuesdays commitment doesn't leave a lot of opportunitites to do a last tuesdays event... One of these days I'm going to start a series on first prime Wednesdays.) From friedman at highwire.stanford.edu Mon Jun 23 09:34:22 2008 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Mon, 23 Jun 2008 09:34:22 -0700 Subject: [sf-perl] meeting? In-Reply-To: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> References: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> Message-ID: Perl Poetry! Now there's a subject for a meeting... :-) -- Mike On Jun 23, 2008, at 9:26 AM, Joe Brenner wrote: > > Is there a meeting tomorrow? > > > (Or do I get to go to the poetry reading at the 3300 Club this time? > Having a fourth tuesdays commitment doesn't leave a lot of > opportunitites to do a last tuesdays event... One of these days I'm > going to start a series on first prime Wednesdays.) > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From quinn at fairpath.com Mon Jun 23 10:39:55 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Mon, 23 Jun 2008 10:39:55 -0700 Subject: [sf-perl] meeting? In-Reply-To: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> References: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> Message-ID: <20080623173955.GA4306@mtn.fairpath.com> On Mon, Jun 23, 2008 at 09:26:38AM -0700, Joe Brenner wrote: > > Is there a meeting tomorrow? Yes, tomorrow is indeed the fourth Tuesday. Let's try Yum Yum House this time: http://tinyurl.com/5czdsx 7:00 pm RSVPs admired but not required. : ) -- Quinn Weaver Full-stack web consultant quinn at fairpath.com 510-520-5217 (mobile) From doom at kzsu.stanford.edu Mon Jun 23 15:11:04 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Mon, 23 Jun 2008 15:11:04 -0700 Subject: [sf-perl] meeting? In-Reply-To: <20080623173955.GA4306@mtn.fairpath.com> References: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> <20080623173955.GA4306@mtn.fairpath.com> Message-ID: <200806232211.m5NMB5fw013601@kzsu.stanford.edu> Quinn Weaver wrote: > Joe Brenner wrote: > > Is there a meeting tomorrow? > > Yes, tomorrow is indeed the fourth Tuesday. Let's try Yum Yum House > this time: > > http://tinyurl.com/5czdsx > > 7:00 pm > > RSVPs admired but not required. : ) Actually... I might skip this one. This month BALUG is meeting on an odd day so that Andrew Morton can speak (he's essentially the #2 man on linux kernel development): This is a reminder that Andrew Morton (key Linux Kernel maintainer) is speaking at BALUG tomorrow, June 24th. If you plan on coming PRETTY PLEASE rsvp now so that I can give the restraunt and idea of how much food to prepare. We won't turn anyone away, but the RSVPs are really helpful. RSVP at balug.org Meeting Details... 6:30pm June 24th, 2008 (Tomorrow) Four Seas Restaurant 731 Grant Ave. San Francisco, CA 94108 Easy $5 Parking: http://www.portsmouthsquaregarage.com/ Cost = $13 for dinner, but the meeting itself is free Upcoming 2008 speakers include: July - Mike Linksyaver (Creative Commons) Aug - Chris Dibona (Google) Sept - Ian Murdock (Debian & Sun) From josh at agliodbs.com Mon Jun 23 17:50:40 2008 From: josh at agliodbs.com (Josh Berkus) Date: Mon, 23 Jun 2008 17:50:40 -0700 Subject: [sf-perl] [job] need Ubuntu sysadmin help Message-ID: <200806231750.40849.josh@agliodbs.com> Folks, I'm looking for some help and advice from someone who has extensive experience setting up mailservers and related services on Ubuntu. I'll be doing a lot of the work myself, but could use and pay for some professional guidance. This is for my own server. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco From vlb at cfcl.com Tue Jun 24 11:26:03 2008 From: vlb at cfcl.com (Vicki Brown) Date: Tue, 24 Jun 2008 11:26:03 -0700 Subject: [sf-perl] meeting? In-Reply-To: <200806232211.m5NMB5fw013601@kzsu.stanford.edu> References: <200806231626.m5NGQcwY005571@kzsu.stanford.edu> <20080623173955.GA4306@mtn.fairpath.com> <200806232211.m5NMB5fw013601@kzsu.stanford.edu> Message-ID: If you can't make Yum Yum House on Tuesday... we're having pizza at Pasquales (9th and Irving) on Wednesday. http://www.cfcl.com/rdm/bass/ -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://twitter.com/vlb From gregc at cnet.com Tue Jun 24 16:46:42 2008 From: gregc at cnet.com (greg lee coleman [1482]) Date: Tue, 24 Jun 2008 16:46:42 -0700 (PDT) Subject: [sf-perl] Q: arbitrary diffs and SVN::Notify::HTML Message-ID: (purrhaps this should be titled paging David Wheeler since i thought he was on this list...) i'm wondering if SVN::Notify or any other package can do diffs in HTML --with just a simple diff of 2 scalars, eg. my $diff = diff_these_things( $a, $b ) where $a and $b are scalars (optimal), or filehandles ( less optimal) or files (even further from the point). i'm looking for a quick way to get HTML diffs of 2 arbitrary files (ie. they are not in rcs,cvs or svn). I'd love to leverage the beauty of SVN::Notify::HTML thanks in advance! -gleeco ________________________________________________________________ Gregory Coleman Adv. Search Technologies, CNET Networks, Inc. From biztos at mac.com Wed Jun 25 00:59:27 2008 From: biztos at mac.com (Kevin Frost) Date: Wed, 25 Jun 2008 00:59:27 -0700 Subject: [sf-perl] Q: arbitrary diffs and SVN::Notify::HTML In-Reply-To: References: Message-ID: <7D4F41DA-B29C-4DA1-A0A5-A2DDFF265D16@mac.com> You can do all of these things with Text::Diff together with Text::Diff::HTML. It assumes very little about your ultimate purpose, leaving you free to assemble and style things as you see fit. Example: use strict; use warnings; use Text::Diff qw(diff); use Text::Diff::HTML; my $old = "I'm \nWooha!\n"; my $new = "I'm \nWooha!\n"; my $frag = diff( \$old, \$new, { STYLE => 'Text::Diff::HTML' } ); # Now do something better than this: print "
$frag
\n"; http://search.cpan.org/~rbs/Text-Diff-0.35/lib/Text/Diff.pm http://search.cpan.org/~dwheeler/Text-Diff-HTML-0.05/lib/Text/Diff/HTML.pm I'm not sure if Dave Wheeler is on the list, but that's his code so this might serve as a temporary proxy until he says something smarter. ;-) cheers -- frosty On Jun 24, 2008, at 4:46 PM, greg lee coleman [1482] wrote: > > (purrhaps this should be titled paging David Wheeler since i thought > he was on > this list...) > > > i'm wondering if SVN::Notify or any other package can do diffs in > HTML --with > just a simple diff of 2 scalars, eg. > > my $diff = diff_these_things( $a, $b ) > > where $a and $b are scalars (optimal), or filehandles ( less > optimal) or files > (even further from the point). > > i'm looking for a quick way to get HTML diffs of 2 arbitrary files > (ie. they are > not in rcs,cvs or svn). I'd love to leverage the beauty of > SVN::Notify::HTML > > > thanks in advance! > > -gleeco > > ________________________________________________________________ > Gregory Coleman Adv. Search Technologies, CNET Networks, Inc. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm