From rdice at pobox.com Tue Jul 1 07:06:02 2008 From: rdice at pobox.com (Richard Dice) Date: Tue, 1 Jul 2008 10:06:02 -0400 Subject: [tpm] A reminder - Damian Conway to speak in Toronto Wednesday July 16th (evening); talk and venue details here Message-ID: <5bef4baf0807010706r2545c00drbb1813bc9ddb3b4e@mail.gmail.com> Hi everyone, We're getting close to the event, so here's a reminder - The evening of Wed 16 July 2008, Damian Conway, Perl expert extraordinaire, Open Source luminary, and long-time friend of the Toronto Perl Mongers, will deliver -- free and to the public -- one of his signature tour-de-force completely insane talks that is 1/3 high-end IT, 1/3 showmanship and 1/3 peyote-fuelled hallucination. Here are the details: Talk: "Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces... Made Easy" This will be the world premiere of the talk. Date: Wednesday 16 July 2008 Time: 6:30pm - 9pm Location: Bahen Centre for Information Technology, University of Toronto 40 St. George Street (w. side of street, just north of College Ave. Room # BA 1160 http://maps.google.com/maps?f=q&hl=en&geocode=&q=+40+St.+George+Street,+Toronto&sll=37.0625,-95.677068&sspn=37.052328,95.009766&ie=UTF8&ll=43.659986,-79.396745&spn=0.004137,0.011598&z=17&iwloc=addr As I have done the past 4 times Damian has come to Toronto to give talks I will take up a collection. This is to help defray expenses and to provide Damian with an honorarium for the talk. Donations are completely voluntary. If you feel motivated and/or in the right place financially to make a donation please get in touch with me or visit the Paypal links at http://hew.ca/. The Toronto Perl Mongers and the other groups who have attended Damian's talks have always been incredibly generous in supporting Damian whenever he has visited in the past and both he and I thank everyone for all the support he has received over the years. FWIW, I have Facebook and Upcoming events for this set up now too -- http://www.facebook.com/event.php?eid=22670172852&ref=mf and http://upcoming.yahoo.com/event/818803/ Cheers, - Richard PS For those of you who don't know Damian, here is some background info on him. He's _not_ just a Perl hacker. If you're into IT in any way, shape or form prepare to have your mind blown... http://en.wikipedia.org/wiki/Damian_Conway http://damian.conway.org/About_us//Bio_formal.html http://www.googlism.com/index.htm?ism=damian+conway&type=1 -- I like the "... is my personal savior" one http://en.oreilly.com/oscon2008/public/schedule/speaker/4710 -- we are getting his OSCON 2008 keynote delivered here first! http://itc.conversationsnetwork.org/shows/detail880.html -- to hear one of his previous OSCON keynote talks (although this talk, as is the case with all his talks, is really enhanced by the slideshow that goes along with it) -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux at alteeve.com Tue Jul 8 08:00:40 2008 From: linux at alteeve.com (Madison Kelly) Date: Tue, 08 Jul 2008 11:00:40 -0400 Subject: [tpm] Regex question Message-ID: <48738118.5050705@alteeve.com> Hi all, I've got a simple problem I often come across, and I've got a way to make it work. However, I've always felt there must be a more ... elegant way of doing it. For example, let's say I want to copy a variable and strip a bit off the end; my $foo="ABC-987-01"; my $bar=$foo; $bar=~s/(\w+-\d+)-\d+/$1/; # $bar now 'ABC-987'. That's three lines. Is there a way to do this in one line? Specifically, is there a way to assign '$1' to a new variable in one go? Thanks! Madi From fulko.hew at gmail.com Tue Jul 8 08:19:24 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 8 Jul 2008 11:19:24 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: <8204a4fe0807080819h754f5159x170ee544f1536956@mail.gmail.com> On Tue, Jul 8, 2008 at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way to make > it work. However, I've always felt there must be a more ... elegant way of > doing it. > > For example, let's say I want to copy a variable and strip a bit off the > end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? Specifically, is > there a way to assign '$1' to a new variable in one go? > ($bar) = ($foo =~ /(\w+-\d+)-\d+/); -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.a.graham at gmail.com Tue Jul 8 08:20:30 2008 From: james.a.graham at gmail.com (Jim Graham) Date: Tue, 8 Jul 2008 11:20:30 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: Hi You can do my $foo='ABC-987-01'; ( my $bar = $foo ) =~ s{(\w+-\d+)-\d+}{$1}; print $bar, "\n"; #-- prints #ABC-987 That cuts one line - jim On 8-Jul-08, at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way > to make it work. However, I've always felt there must be a more ... > elegant way of doing it. > > For example, let's say I want to copy a variable and strip a bit off > the end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? > Specifically, is there a way to assign '$1' to a new variable in one > go? > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From rdice at pobox.com Tue Jul 8 08:40:26 2008 From: rdice at pobox.com (Richard Dice) Date: Tue, 8 Jul 2008 11:40:26 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: <5bef4baf0807080840s39d4acfew4dc18bb3a5682740@mail.gmail.com> Here's something that shaves one line off, but it's not particularly pretty either. Also, it might not work in the context of your larger problem. I find the most annoying thing in this situation is that $foo and $bar are both new 'my' variables, and the 'my' declaration syntax is difficult to work with in other contexts that might create more elegance. richardmbp:~ rdice$ cat ./test.pl #!/usr/bin/perl use warnings; use strict; my ($foo, $bar); ($bar = $foo = "ABC-987-01") =~ s/(\w+-\d+)-\d+/$1/; print "foo = $foo\n"; print "bar = $bar\n"; exit 0; richardmbp:~ rdice$ perl ./test.pl foo = ABC-987-01 bar = ABC-987 Alternatively, richardmbp:~ rdice$ cat ./test2.pl #!/usr/bin/perl use warnings; use strict; my ($foo, $bar) = ("ABC-987-01"); ($bar = $foo) =~ s/(\w+-\d+)-\d+/$1/; print "foo = $foo\n"; print "bar = $bar\n"; exit 0; richardmbp:~ rdice$ perl ./test.pl foo = ABC-987-01 bar = ABC-987 Cheers, - Richard On Tue, Jul 8, 2008 at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way to make > it work. However, I've always felt there must be a more ... elegant way of > doing it. > > For example, let's say I want to copy a variable and strip a bit off the > end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? Specifically, is > there a way to assign '$1' to a new variable in one go? > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.s.doyle at gmail.com Tue Jul 8 08:19:45 2008 From: dave.s.doyle at gmail.com (Dave Doyle) Date: Tue, 8 Jul 2008 11:19:45 -0400 Subject: [tpm] Regex question In-Reply-To: References: <48738118.5050705@alteeve.com> Message-ID: As an aside, if the first part of the string is always the same length you can always do a simple substr call. my $foo="ABC-987-01"; my $bar = substr( $foo, 0, 7); On Tue, Jul 8, 2008 at 11:16 AM, Dave Doyle wrote: > my $foo="ABC-987-01"; > my ($bar) = $foo =~ /^(B\w+-\d+)-\d+$/; > > This'll do the trick but you'd still have to test that $bar is defined > (i.e. the match was successful). > > > On Tue, Jul 8, 2008 at 11:00 AM, Madison Kelly wrote: >> Hi all, >> >> I've got a simple problem I often come across, and I've got a way to make >> it work. However, I've always felt there must be a more ... elegant way of >> doing it. >> >> For example, let's say I want to copy a variable and strip a bit off the >> end; >> >> my $foo="ABC-987-01"; >> my $bar=$foo; >> $bar=~s/(\w+-\d+)-\d+/$1/; >> # $bar now 'ABC-987'. >> >> That's three lines. Is there a way to do this in one line? Specifically, is >> there a way to assign '$1' to a new variable in one go? >> >> Thanks! >> >> Madi >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > > > -- > dave.s.doyle at gmail.com > -- dave.s.doyle at gmail.com From linux at alteeve.com Tue Jul 8 09:03:06 2008 From: linux at alteeve.com (Madison Kelly) Date: Tue, 08 Jul 2008 12:03:06 -0400 Subject: [tpm] I love this list! (was: Re: Regex question - Solved) In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: <48738FBA.5060603@alteeve.com> So many people replied so quickly, thank you all! I should have been more clear; '$foo' is set further up; I set in manually for this email only. I've got this working (real-world where I want two variables): my ($bar, $baz)=$foo=~/(\w+-\d+)-(\d+)/; May I extend the question? How would I go about working with '$1', '$2', etc if I wanted to do something odd, like say (totally fabricated, broken example): my $bar="$2 - $1"=$foo=~/(\w+-\d+)-(\d+)/; Again, thanks all. This list rocks, if only because of the enthusiasm shown for code optimization (of course, for more reasons, too!). Madi Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way to > make it work. However, I've always felt there must be a more ... elegant > way of doing it. > > For example, let's say I want to copy a variable and strip a bit off the > end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? Specifically, > is there a way to assign '$1' to a new variable in one go? > > Thanks! > > Madi From andy+lists at veracity.ca Tue Jul 8 08:30:44 2008 From: andy+lists at veracity.ca (Andy Jack) Date: Tue, 8 Jul 2008 11:30:44 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: <20080708153043.GC5920@seahorse.localdomain> my $foo="ABC-987-01"; ( my $bar ) = $foo =~ m#(\w+-\d+)#; # check $bar for defined-ness in case regexp didn't match Note slightly different syntax if you want to have $bar be a substituted version of $foo: my $foo = "ABC-987-01"; ( my $bar = $foo ) =~ s/ABC/DEF/; # $bar now "DEF-987-01" Andy Jack On Tue, Jul 08, 2008 at 11:00:40AM -0400, Madison Kelly wrote: > I've got a simple problem I often come across, and I've got a way to > make it work. However, I've always felt there must be a more ... > elegant way of doing it. From fernandocorrea at gmail.com Tue Jul 8 09:38:06 2008 From: fernandocorrea at gmail.com (Fernando Oliveira) Date: Tue, 8 Jul 2008 13:38:06 -0300 Subject: [tpm] I love this list! (was: Re: Regex question - Solved) In-Reply-To: <48738FBA.5060603@alteeve.com> References: <48738118.5050705@alteeve.com> <48738FBA.5060603@alteeve.com> Message-ID: $bar="$2 - $1" if $foo=~/(\w+-\d+)-(\d+)/; is the best way... 2008/7/8 Madison Kelly : > So many people replied so quickly, thank you all! > > I should have been more clear; '$foo' is set further up; I set in manually > for this email only. > > I've got this working (real-world where I want two variables): > > my ($bar, $baz)=$foo=~/(\w+-\d+)-(\d+)/; > > May I extend the question? > > How would I go about working with '$1', '$2', etc if I wanted to do > something odd, like say (totally fabricated, broken example): > > my $bar="$2 - $1"=$foo=~/(\w+-\d+)-(\d+)/; > > Again, thanks all. This list rocks, if only because of the enthusiasm > shown for code optimization (of course, for more reasons, too!). > > Madi > > Madison Kelly wrote: > >> Hi all, >> >> I've got a simple problem I often come across, and I've got a way to make >> it work. However, I've always felt there must be a more ... elegant way of >> doing it. >> >> For example, let's say I want to copy a variable and strip a bit off the >> end; >> >> my $foo="ABC-987-01"; >> my $bar=$foo; >> $bar=~s/(\w+-\d+)-\d+/$1/; >> # $bar now 'ABC-987'. >> >> That's three lines. Is there a way to do this in one line? Specifically, >> is there a way to assign '$1' to a new variable in one go? >> >> Thanks! >> >> Madi >> > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Just another Perl Hacker, Fernando (SmokeMachine) http://perl-e.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From talexb at gmail.com Tue Jul 8 08:28:23 2008 From: talexb at gmail.com (Alex Beamish) Date: Tue, 8 Jul 2008 11:28:23 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: Hi Madi, I would suggest my $foo="ABC-987-01"; my ($bar) = $foo =~ m/^(.+)-\d\d$/; This produces $bar with a value of 'ABC-987'. Alex On Tue, Jul 8, 2008 at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way to make > it work. However, I've always felt there must be a more ... elegant way of > doing it. > > For example, let's say I want to copy a variable and strip a bit off the > end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? Specifically, is > there a way to assign '$1' to a new variable in one go? > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Alex Beamish Toronto, Ontario aka talexb -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandocorrea at gmail.com Tue Jul 8 09:42:16 2008 From: fernandocorrea at gmail.com (Fernando Oliveira) Date: Tue, 8 Jul 2008 13:42:16 -0300 Subject: [tpm] I love this list! (was: Re: Regex question - Solved) In-Reply-To: References: <48738118.5050705@alteeve.com> <48738FBA.5060603@alteeve.com> Message-ID: but you can do something like this too: $bar = join " - ", ($foo=~/(\w+-\d+)-(\d+)/g)[0,1]; or $bar = join " - ", reverse $foo=~/(\w+-\d+)-(\d+)/g; but $bar="$2 - $1" if $foo=~/(\w+-\d+)-(\d+)/; is the better way (sorry, i dont speak english...) 2008/7/8 Fernando Oliveira : > $bar="$2 - $1" if $foo=~/(\w+-\d+)-(\d+)/; > is the best way... > > 2008/7/8 Madison Kelly : > >> So many people replied so quickly, thank you all! >> >> >> I should have been more clear; '$foo' is set further up; I set in >> manually for this email only. >> >> I've got this working (real-world where I want two variables): >> >> my ($bar, $baz)=$foo=~/(\w+-\d+)-(\d+)/; >> >> May I extend the question? >> >> How would I go about working with '$1', '$2', etc if I wanted to do >> something odd, like say (totally fabricated, broken example): >> >> my $bar="$2 - $1"=$foo=~/(\w+-\d+)-(\d+)/; >> >> Again, thanks all. This list rocks, if only because of the enthusiasm >> shown for code optimization (of course, for more reasons, too!). >> >> Madi >> >> Madison Kelly wrote: >> >>> Hi all, >>> >>> I've got a simple problem I often come across, and I've got a way to >>> make it work. However, I've always felt there must be a more ... elegant way >>> of doing it. >>> >>> For example, let's say I want to copy a variable and strip a bit off the >>> end; >>> >>> my $foo="ABC-987-01"; >>> my $bar=$foo; >>> $bar=~s/(\w+-\d+)-\d+/$1/; >>> # $bar now 'ABC-987'. >>> >>> That's three lines. Is there a way to do this in one line? Specifically, >>> is there a way to assign '$1' to a new variable in one go? >>> >>> Thanks! >>> >>> Madi >>> >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > > > -- > Just another Perl Hacker, > Fernando (SmokeMachine) > http://perl-e.org > -- Just another Perl Hacker, Fernando (SmokeMachine) http://perl-e.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.s.doyle at gmail.com Tue Jul 8 08:16:23 2008 From: dave.s.doyle at gmail.com (Dave Doyle) Date: Tue, 8 Jul 2008 11:16:23 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: my $foo="ABC-987-01"; my ($bar) = $foo =~ /^(B\w+-\d+)-\d+$/; This'll do the trick but you'd still have to test that $bar is defined (i.e. the match was successful). On Tue, Jul 8, 2008 at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way to make > it work. However, I've always felt there must be a more ... elegant way of > doing it. > > For example, let's say I want to copy a variable and strip a bit off the > end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? Specifically, is > there a way to assign '$1' to a new variable in one go? > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- dave.s.doyle at gmail.com From linux at alteeve.com Tue Jul 8 12:29:20 2008 From: linux at alteeve.com (Madison Kelly) Date: Tue, 08 Jul 2008 15:29:20 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem Message-ID: <4873C010.4010407@alteeve.com> Hi all, second question of the day! I've got a problem INSERTing a value into my DB. It's a French character '?', and my DB is set to UTF8, but the error is: INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, added_user, added_date, modified_user, modified_date) VALUES (1, 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UTF8": 0xe97369 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". When I manually run the INSERT, it works, so I know the problem is in perl somewhere. Now then, I setup my script with this: # Setup for UTF-8 mode. binmode STDOUT, ":utf8:"; $ENV{'PERL_UNICODE'}=1; When I create my PgSQL connection, I use: $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, $$conf{db}{pass}, { RaiseError => 1, AutoCommit => 1, pg_enable_utf8 => 1 } ) or die ...; I push a pile of queries into an array (referenced) and run them like this: # Sanity checks stripped for the email $dbh->begin_work; foreach my $query (@{$sql}) { print "Query: [$query]\n"; $dbh->do($query) or $error.=$DBI::errstr.", "; } $dbh->commit; Lastly, my database itself is set to UTF8: SET client_encoding = 'UTF8'; I've tried knocking out the 'pg_enable_utf8 => 1' line in case I was dealing with double-encoding, but that didn't help. Any tips/ideas? Thanks! Madi From mike at stok.ca Tue Jul 8 08:22:02 2008 From: mike at stok.ca (Mike Stok) Date: Tue, 8 Jul 2008 11:22:02 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: <5F87EB07-D666-4211-8E02-6DBC5627260E@stok.ca> On Jul 8, 2008, at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way > to make it work. However, I've always felt there must be a more ... > elegant way of doing it. > > For example, let's say I want to copy a variable and strip a bit off > the end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? > Specifically, is there a way to assign '$1' to a new variable in one > go? In the debugger: DB<1> $foo="ABC-987-01" DB <2> ($bar = $foo) =~ s/(\w+-\d+)-\d+/$1/ DB <3> x $foo, $bar 0 'ABC-987-01' 1 'ABC-987' or if you *really* want 1 line: DB<1> (my $bar = my $foo = "ABC-987-01") =~ s/(\w+-\d+)-\d+/$1/; print "$foo\n$bar" ABC-987-01 ABC-987 Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. From janes.rob at gmail.com Tue Jul 8 14:51:17 2008 From: janes.rob at gmail.com (Rob Janes) Date: Tue, 8 Jul 2008 17:51:17 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <83eac04d0807081341o7eb9e25fgdaa1ddc886a8895c@mail.gmail.com> References: <4873C010.4010407@alteeve.com> <83eac04d0807081341o7eb9e25fgdaa1ddc886a8895c@mail.gmail.com> Message-ID: <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> oops, first reply went to Madison alone ... I think this is better ... use Encode qw(from_to decode); my $data = "R?sidence"; from_to($data, "iso-8859-1", "utf8"); ## assuming R?sidence is encoded in 8859-1 or my $data = decode("iso-8859-1", "R?sidence"); both of these will create a utf8 string from R?sidence. However, depending on the original encoding of R?sidence, what's stored in the database may or may not be what you want. In other words, the lack of an error message is not indicative of it working. -rob On Tue, Jul 8, 2008 at 4:41 PM, Rob Janes wrote: > methinks your perl script is encoded in iso-8859-1, or a windows code > page. just cause you can see the accent doesn't mean it's right. set your > editor to utf-8. or use character conversions. > > use utf8; ## not sure about this, is pragma > $blob = utf8::encode( 'R?sidence' ) > > or > use Encode; > $blob = encode("utf8", 'R?sidence' ); > > Encode doesn't make any statements about the encoding of your script, it > might be the better way. > > iconv is another possibility. > > look at the man page for charnames. > > use charnames ":full"; > print "R\N{LATIN SMALL LETTER E WITH ACUTE}sidence\n"; > > -rob > > > On Tue, Jul 8, 2008 at 3:29 PM, Madison Kelly wrote: > >> Hi all, second question of the day! >> >> I've got a problem INSERTing a value into my DB. It's a French character >> '?', and my DB is set to UTF8, but the error is: >> >> INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, added_user, >> added_date, modified_user, modified_date) VALUES (1, >> 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); >> >> DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UTF8": >> 0xe97369 >> HINT: This error can also happen if the byte sequence does not match the >> encoding expected by the server, which is controlled by "client_encoding". >> >> When I manually run the INSERT, it works, so I know the problem is in >> perl somewhere. Now then, I setup my script with this: >> >> # Setup for UTF-8 mode. >> binmode STDOUT, ":utf8:"; >> $ENV{'PERL_UNICODE'}=1; >> >> When I create my PgSQL connection, I use: >> >> $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, $$conf{db}{pass}, >> { >> RaiseError => 1, >> AutoCommit => 1, >> pg_enable_utf8 => 1 >> } >> ) or die ...; >> >> I push a pile of queries into an array (referenced) and run them like >> this: >> >> # Sanity checks stripped for the email >> $dbh->begin_work; >> foreach my $query (@{$sql}) >> { >> print "Query: [$query]\n"; >> $dbh->do($query) or $error.=$DBI::errstr.", "; >> } >> $dbh->commit; >> >> Lastly, my database itself is set to UTF8: >> >> SET client_encoding = 'UTF8'; >> >> I've tried knocking out the 'pg_enable_utf8 => 1' line in case I was >> dealing with double-encoding, but that didn't help. >> >> Any tips/ideas? >> >> Thanks! >> >> Madi >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From indy at indigostar.com Tue Jul 8 08:50:00 2008 From: indy at indigostar.com (Indy Singh) Date: Tue, 8 Jul 2008 11:50:00 -0400 Subject: [tpm] Regex question References: <48738118.5050705@alteeve.com> Message-ID: <012601c8e112$47a389a0$6600a8c0@roadhog> Use this code: 1: my $foo="ABC-987-01"; 2: my ($bar) = $foo =~ /(\w+-\d+)-\d+/; 3: # $bar is now 'ABC-987'. 4: print "$bar\n"; Note that on line 2, the left side of the assignment is in list context because $bar is enclosed in brackets. my $bar = ... will not work because it is n scalar context. Indy Singh IndigoSTAR Software -- www.indigostar.com ----- Original Message ----- From: "Madison Kelly" To: "Toronto Perl Mongers" Sent: Tuesday, July 08, 2008 11:00 AM Subject: [tpm] Regex question > Hi all, > > I've got a simple problem I often come across, and I've got a way to > make it work. However, I've always felt there must be a more ... > elegant way of doing it. > > For example, let's say I want to copy a variable and strip a bit off > the end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? > Specifically, is there a way to assign '$1' to a new variable in one > go? > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From mike at stok.ca Tue Jul 8 08:25:53 2008 From: mike at stok.ca (Mike Stok) Date: Tue, 8 Jul 2008 11:25:53 -0400 Subject: [tpm] Regex question In-Reply-To: <48738118.5050705@alteeve.com> References: <48738118.5050705@alteeve.com> Message-ID: On Jul 8, 2008, at 11:00 AM, Madison Kelly wrote: > Hi all, > > I've got a simple problem I often come across, and I've got a way > to make it work. However, I've always felt there must be a more ... > elegant way of doing it. > > For example, let's say I want to copy a variable and strip a bit off > the end; > > my $foo="ABC-987-01"; > my $bar=$foo; > $bar=~s/(\w+-\d+)-\d+/$1/; > # $bar now 'ABC-987'. > > That's three lines. Is there a way to do this in one line? > Specifically, is there a way to assign '$1' to a new variable in one > go? Maybe I misunderstood the question... You can say my ($bar) = $foo =~ /(\w+-\d+)-\d+/; which will assing $1 to $bar if the match succeeds. Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. From uri at stemsystems.com Tue Jul 8 18:13:03 2008 From: uri at stemsystems.com (Uri Guttman) Date: Tue, 08 Jul 2008 21:13:03 -0400 Subject: [tpm] Regex question In-Reply-To: (Mike Stok's message of "Tue, 8 Jul 2008 11:25:53 -0400") References: <48738118.5050705@alteeve.com> Message-ID: >>>>> "MS" == Mike Stok writes: MS> Maybe I misunderstood the question... You can say MS> my ($bar) = $foo =~ /(\w+-\d+)-\d+/; MS> which will assing $1 to $bar if the match succeeds. and it will assign undef if it fails. and since the grabbed string will always be true (it can't be '' or '0') you can test $bar to see if the match succeeded. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From ceeshek at gmail.com Tue Jul 8 18:41:52 2008 From: ceeshek at gmail.com (Cees Hek) Date: Wed, 9 Jul 2008 11:41:52 +1000 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <4873C010.4010407@alteeve.com> References: <4873C010.4010407@alteeve.com> Message-ID: On Wed, Jul 9, 2008 at 5:29 AM, Madison Kelly wrote: > Hi all, second question of the day! > > I've got a problem INSERTing a value into my DB. It's a French character > '?', and my DB is set to UTF8, but the error is: > > INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, added_user, > added_date, modified_user, modified_date) VALUES (1, > 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); > > DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UTF8": > 0xe97369 > HINT: This error can also happen if the byte sequence does not match the > encoding expected by the server, which is controlled by "client_encoding". > > When I manually run the INSERT, it works, so I know the problem is in perl > somewhere. Now then, I setup my script with this: > > # Setup for UTF-8 mode. > binmode STDOUT, ":utf8:"; > $ENV{'PERL_UNICODE'}=1; > > When I create my PgSQL connection, I use: > > $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, $$conf{db}{pass}, > { > RaiseError => 1, > AutoCommit => 1, > pg_enable_utf8 => 1 > } > ) or die ...; > > I push a pile of queries into an array (referenced) and run them like this: > > # Sanity checks stripped for the email > $dbh->begin_work; > foreach my $query (@{$sql}) > { > print "Query: [$query]\n"; > $dbh->do($query) or $error.=$DBI::errstr.", "; > } > $dbh->commit; > > Lastly, my database itself is set to UTF8: > > SET client_encoding = 'UTF8'; > > I've tried knocking out the 'pg_enable_utf8 => 1' line in case I was > dealing with double-encoding, but that didn't help. > > Any tips/ideas? Hi Madison, You have told everything in the app that you are dealing only with UTF8 data, but somewhere you are getting data that is not in UTF8. What you didn't tell us is where that accented character came from. Was it from a file? Was it from a POST in a web request? Was it from another database? Was it entered on the commandline? Regardless of where it came from, this data source is not giving you UTF8 data, so you will have to convert it, or you need to get postgres to convert it for you. Luckily, postgresql is very good at handling this sort of thing for you. You have already mentioned that you called: SET client_encoding = 'UTF8'. That tells postgres that everything you send it will be in UTF8. If you change that to SET client_encoding = 'LATIN1', then postgres will assume all data you send it is in LATIN1, and it will magically convert it to UTF8 for you before inserting it into the database (since your database is set to store UTF8 characters). Also remember that when you retrieve data from postgres, it also obeys the client_encoding setting, and it will convert all those UTF8 characters back into LATIN1 for you. So what you need to find out is what encoding your source data is in, and then tell postgres that you are sending it in that encoding. it will do the dirty work for you. Alternatively you can use Rob's method of converting the data yourself. That should also work, and that would be the route you want to go if you want to use UTF8 throughout your entire application (which isn't that bad of an idea if you deal with lots of special characters). Cheers, Cees From tigerpeng2001 at yahoo.com Tue Jul 8 19:44:46 2008 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Tue, 8 Jul 2008 19:44:46 -0700 (PDT) Subject: [tpm] Regex question Message-ID: <842159.64397.qm@web58713.mail.re1.yahoo.com> Two efficient ways 1. Using anchor ($) to make it match faster -> perl -le '$foo="ABC-987-01"; $bar=$foo; $bar =~s/-\d+$//;print $bar' ABC-987 2. Using non-regex. -> perl -le '$foo="ABC-987-01"; print substr($foo, 0, rindex($foo, "-"))' ABC-987 -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux at alteeve.com Wed Jul 9 04:59:22 2008 From: linux at alteeve.com (Madison Kelly) Date: Wed, 09 Jul 2008 07:59:22 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: References: <4873C010.4010407@alteeve.com> Message-ID: <4874A81A.6010806@alteeve.com> Cees Hek wrote: > On Wed, Jul 9, 2008 at 5:29 AM, Madison Kelly wrote: >> Hi all, second question of the day! >> >> I've got a problem INSERTing a value into my DB. It's a French character >> '?', and my DB is set to UTF8, but the error is: >> >> INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, added_user, >> added_date, modified_user, modified_date) VALUES (1, >> 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); >> >> DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UTF8": >> 0xe97369 >> HINT: This error can also happen if the byte sequence does not match the >> encoding expected by the server, which is controlled by "client_encoding". >> >> When I manually run the INSERT, it works, so I know the problem is in perl >> somewhere. Now then, I setup my script with this: >> >> # Setup for UTF-8 mode. >> binmode STDOUT, ":utf8:"; >> $ENV{'PERL_UNICODE'}=1; >> >> When I create my PgSQL connection, I use: >> >> $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, $$conf{db}{pass}, >> { >> RaiseError => 1, >> AutoCommit => 1, >> pg_enable_utf8 => 1 >> } >> ) or die ...; >> >> I push a pile of queries into an array (referenced) and run them like this: >> >> # Sanity checks stripped for the email >> $dbh->begin_work; >> foreach my $query (@{$sql}) >> { >> print "Query: [$query]\n"; >> $dbh->do($query) or $error.=$DBI::errstr.", "; >> } >> $dbh->commit; >> >> Lastly, my database itself is set to UTF8: >> >> SET client_encoding = 'UTF8'; >> >> I've tried knocking out the 'pg_enable_utf8 => 1' line in case I was >> dealing with double-encoding, but that didn't help. >> >> Any tips/ideas? > > Hi Madison, > > You have told everything in the app that you are dealing only with > UTF8 data, but somewhere you are getting data that is not in UTF8. > What you didn't tell us is where that accented character came from. > Was it from a file? Was it from a POST in a web request? Was it from > another database? Was it entered on the commandline? > > Regardless of where it came from, this data source is not giving you > UTF8 data, so you will have to convert it, or you need to get postgres > to convert it for you. Luckily, postgresql is very good at handling > this sort of thing for you. You have already mentioned that you > called: SET client_encoding = 'UTF8'. That tells postgres that > everything you send it will be in UTF8. If you change that to SET > client_encoding = 'LATIN1', then postgres will assume all data you > send it is in LATIN1, and it will magically convert it to UTF8 for you > before inserting it into the database (since your database is set to > store UTF8 characters). > > Also remember that when you retrieve data from postgres, it also obeys > the client_encoding setting, and it will convert all those UTF8 > characters back into LATIN1 for you. > > So what you need to find out is what encoding your source data is in, > and then tell postgres that you are sending it in that encoding. it > will do the dirty work for you. > > Alternatively you can use Rob's method of converting the data > yourself. That should also work, and that would be the route you want > to go if you want to use UTF8 throughout your entire application > (which isn't that bad of an idea if you deal with lots of special > characters). > > Cheers, > > Cees > Oh well, now don't I deserve a whack about the head? >_< I use 'WWW::Mechanize' to grab data off of an SSL encrypted website. I've not yet figured out a way to determine what encoding the website uses or, more relevantly, what encoding the WWW::Mechanize object uses. I had started looking into this when I sent the original email, but had a senior's moment and forgot to include that. Thus far, I've tried reloading the database without the 'client_encoding' pragma, without the 'pg_enable_utf8', without the 'binmode STDOUT, ":utf8:";' or '$ENV{'PERL_UNICODE'}=1;' and various combinations thereof in hopes that "magic" would happen, as much as I hate that, but it never worked. I do believe that 'LATIN1' is the default, though I would need to confirm that. As I mentioned to Rob, I will play with the Encode module when I get into the office this morning. I *MUCH* prefer to handle conversions manually given the control freak I am. :) Joking aside, I do really want to control conversion myself so that I can honestly say that my program is fully UTF-8 through and through. Thanks kindly for your reply! I will report my success or failure "for the record". Madi From linux at alteeve.com Wed Jul 9 04:52:02 2008 From: linux at alteeve.com (Madison Kelly) Date: Wed, 09 Jul 2008 07:52:02 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> References: <4873C010.4010407@alteeve.com> <83eac04d0807081341o7eb9e25fgdaa1ddc886a8895c@mail.gmail.com> <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> Message-ID: <4874A662.4090905@alteeve.com> Thanks for the reply, Rob! I will play with Encode as soon as I get into the office. As for the source encoding, let me follow that up in my reply to Cees. Madi Rob Janes wrote: > oops, first reply went to Madison alone ... > > I think this is better ... > > use Encode qw(from_to decode); > > my $data = "R?sidence"; > from_to($data, "iso-8859-1", "utf8"); ## assuming R?sidence is encoded > in 8859-1 > or > my $data = decode("iso-8859-1", "R?sidence"); > > both of these will create a utf8 string from R?sidence. However, > depending on the original encoding of R?sidence, what's stored in the > database may or may not be what you want. > > In other words, the lack of an error message is not indicative of it > working. > > -rob > > On Tue, Jul 8, 2008 at 4:41 PM, Rob Janes > wrote: > > methinks your perl script is encoded in iso-8859-1, or a windows > code page. just cause you can see the accent doesn't mean it's > right. set your editor to utf-8. or use character conversions. > > use utf8; ## not sure about this, is pragma > $blob = utf8::encode( 'R?sidence' ) > > or > use Encode; > $blob = encode("utf8", 'R?sidence' ); > > Encode doesn't make any statements about the encoding of your > script, it might be the better way. > > iconv is another possibility. > > look at the man page for charnames. > > use charnames ":full"; > print "R\N{LATIN SMALL LETTER E WITH ACUTE}sidence\n"; > > -rob > > > On Tue, Jul 8, 2008 at 3:29 PM, Madison Kelly > wrote: > > Hi all, second question of the day! > > I've got a problem INSERTing a value into my DB. It's a French > character '?', and my DB is set to UTF8, but the error is: > > INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, > added_user, added_date, modified_user, modified_date) VALUES (1, > 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); > > DBD::Pg::db do failed: ERROR: invalid byte sequence for > encoding "UTF8": 0xe97369 > HINT: This error can also happen if the byte sequence does not > match the encoding expected by the server, which is controlled > by "client_encoding". > > When I manually run the INSERT, it works, so I know the problem > is in perl somewhere. Now then, I setup my script with this: > > # Setup for UTF-8 mode. > binmode STDOUT, ":utf8:"; > $ENV{'PERL_UNICODE'}=1; > > When I create my PgSQL connection, I use: > > $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, > $$conf{db}{pass}, > { > RaiseError => 1, > AutoCommit => 1, > pg_enable_utf8 => 1 > } > ) or die ...; > > I push a pile of queries into an array (referenced) and run > them like this: > > # Sanity checks stripped for the email > $dbh->begin_work; > foreach my $query (@{$sql}) > { > print "Query: [$query]\n"; > $dbh->do($query) or $error.=$DBI::errstr.", "; > } > $dbh->commit; > > Lastly, my database itself is set to UTF8: > > SET client_encoding = 'UTF8'; > > I've tried knocking out the 'pg_enable_utf8 => 1' line in case > I was dealing with double-encoding, but that didn't help. > > Any tips/ideas? > > Thanks! > > Madi From janes.rob at gmail.com Wed Jul 9 06:06:40 2008 From: janes.rob at gmail.com (Rob Janes) Date: Wed, 9 Jul 2008 09:06:40 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <4874A81A.6010806@alteeve.com> References: <4873C010.4010407@alteeve.com> <4874A81A.6010806@alteeve.com> Message-ID: <83eac04d0807090606u4e6940bal331aab2ca63ffca1@mail.gmail.com> The character encoding is named in the http header. I'll bet it isn't exactly named the way that any of the converters would like, so you'll have to map it to what the converter expects. Here's a snippet from the man page for WWW::Mech on getting the http headers. my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get( 'http://my.site.com' ); my $res = $mech->response(); for my $key ( $response->header_field_names() ) { print $key, " : ", $response->header( $key ), "\n"; } Here's the http header of interest: Content-Type: text/html; charset=utf-8 see http://www.w3.org/International/O-charset and http://www.iana.org/assignments/character-sets. iconv is a utility for character conversions that seems to be available on most unixes. there may be more platform coverage for iconv. especially if your perl isn't always 5.8.1 and up. latin1 is the same as iso-8859-1. decide on the encoding in your program, and convert all inputs to that encoding. if latin1 and not utf8, you'll need to ensure some conversion happens when writing to postgres. you may find it easier to have postgres do the latin1->utf8 conversion, especially since the editor you use seems to like latin1. so you want to be a utf8 purist. maybe a "use utf8;" at the top is best. use utf8::decode to convert inputs to utf8 with the utf8 flag set. make your ide use utf8 for editing and display. -rob On Wed, Jul 9, 2008 at 7:59 AM, Madison Kelly wrote: > Cees Hek wrote: > >> On Wed, Jul 9, 2008 at 5:29 AM, Madison Kelly wrote: >> >>> Hi all, second question of the day! >>> >>> I've got a problem INSERTing a value into my DB. It's a French character >>> '?', and my DB is set to UTF8, but the error is: >>> >>> INSERT INTO customer_data (cd_cust_id, cd_variable, cd_value, added_user, >>> added_date, modified_user, modified_date) VALUES (1, >>> 'CustServiceTypeDisplay_F', 'R?sidence', 1, now(), 1, now()); >>> >>> DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding "UTF8": >>> 0xe97369 >>> HINT: This error can also happen if the byte sequence does not match the >>> encoding expected by the server, which is controlled by >>> "client_encoding". >>> >>> When I manually run the INSERT, it works, so I know the problem is in >>> perl >>> somewhere. Now then, I setup my script with this: >>> >>> # Setup for UTF-8 mode. >>> binmode STDOUT, ":utf8:"; >>> $ENV{'PERL_UNICODE'}=1; >>> >>> When I create my PgSQL connection, I use: >>> >>> $dbh=DBI->connect($db_connect_string, $$conf{db}{user}, $$conf{db}{pass}, >>> { >>> RaiseError => 1, >>> AutoCommit => 1, >>> pg_enable_utf8 => 1 >>> } >>> ) or die ...; >>> >>> I push a pile of queries into an array (referenced) and run them like >>> this: >>> >>> # Sanity checks stripped for the email >>> $dbh->begin_work; >>> foreach my $query (@{$sql}) >>> { >>> print "Query: [$query]\n"; >>> $dbh->do($query) or $error.=$DBI::errstr.", "; >>> } >>> $dbh->commit; >>> >>> Lastly, my database itself is set to UTF8: >>> >>> SET client_encoding = 'UTF8'; >>> >>> I've tried knocking out the 'pg_enable_utf8 => 1' line in case I was >>> dealing with double-encoding, but that didn't help. >>> >>> Any tips/ideas? >>> >> >> Hi Madison, >> >> You have told everything in the app that you are dealing only with >> UTF8 data, but somewhere you are getting data that is not in UTF8. >> What you didn't tell us is where that accented character came from. >> Was it from a file? Was it from a POST in a web request? Was it from >> another database? Was it entered on the commandline? >> >> Regardless of where it came from, this data source is not giving you >> UTF8 data, so you will have to convert it, or you need to get postgres >> to convert it for you. Luckily, postgresql is very good at handling >> this sort of thing for you. You have already mentioned that you >> called: SET client_encoding = 'UTF8'. That tells postgres that >> everything you send it will be in UTF8. If you change that to SET >> client_encoding = 'LATIN1', then postgres will assume all data you >> send it is in LATIN1, and it will magically convert it to UTF8 for you >> before inserting it into the database (since your database is set to >> store UTF8 characters). >> >> Also remember that when you retrieve data from postgres, it also obeys >> the client_encoding setting, and it will convert all those UTF8 >> characters back into LATIN1 for you. >> >> So what you need to find out is what encoding your source data is in, >> and then tell postgres that you are sending it in that encoding. it >> will do the dirty work for you. >> >> Alternatively you can use Rob's method of converting the data >> yourself. That should also work, and that would be the route you want >> to go if you want to use UTF8 throughout your entire application >> (which isn't that bad of an idea if you deal with lots of special >> characters). >> >> Cheers, >> >> Cees >> >> > Oh well, now don't I deserve a whack about the head? >_< > > I use 'WWW::Mechanize' to grab data off of an SSL encrypted website. I've > not yet figured out a way to determine what encoding the website uses or, > more relevantly, what encoding the WWW::Mechanize object uses. I had started > looking into this when I sent the original email, but had a senior's moment > and forgot to include that. > > Thus far, I've tried reloading the database without the 'client_encoding' > pragma, without the 'pg_enable_utf8', without the 'binmode STDOUT, > ":utf8:";' or '$ENV{'PERL_UNICODE'}=1;' and various combinations thereof in > hopes that "magic" would happen, as much as I hate that, but it never > worked. I do believe that 'LATIN1' is the default, though I would need to > confirm that. > > As I mentioned to Rob, I will play with the Encode module when I get into > the office this morning. I *MUCH* prefer to handle conversions manually > given the control freak I am. :) Joking aside, I do really want to control > conversion myself so that I can honestly say that my program is fully UTF-8 > through and through. > > Thanks kindly for your reply! I will report my success or failure "for the > record". > > Madi > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arocker at vex.net Wed Jul 9 08:51:32 2008 From: arocker at vex.net (arocker at vex.net) Date: Wed, 9 Jul 2008 11:51:32 -0400 (EDT) Subject: [tpm] Regex question In-Reply-To: References: <48738118.5050705@alteeve.com> Message-ID: <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> Madi's original question, and one typical response: >> my $foo="ABC-987-01"; >> my $bar=$foo; >> $bar=~s/(\w+-\d+)-\d+/$1/; >> # $bar now 'ABC-987'. >> >> That's three lines. Is there a way to do this in one line? > > Maybe I misunderstood the question... You can say > > my ($bar) = $foo =~ /(\w+-\d+)-\d+/; > > which will assing $1 to $bar if the match succeeds. > Compressing the assignment (which really doesn't include the original setting of $foo) saves one line ad one naming of $bar at the expense of complexity and inflexibility. To comprehend the expression, you have to keep an extra level on the mental stack, and if you want to change the destination you risk changing the regex. (The two expressions aren't completely equivalent; the original doesn't change $foo, the other, like most of the suggestions, does.) Sometimes, it pays to remember the KISS principle, and the joke (?) about a gentleman being a man who knows how to play the accordion, but doesn't. From mike at stok.ca Wed Jul 9 09:31:34 2008 From: mike at stok.ca (Mike Stok) Date: Wed, 9 Jul 2008 12:31:34 -0400 Subject: [tpm] Regex question In-Reply-To: <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> References: <48738118.5050705@alteeve.com> <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> Message-ID: On Jul 9, 2008, at 11:51 AM, arocker at vex.net wrote: > Madi's original question, and one typical response: > >>> my $foo="ABC-987-01"; >>> my $bar=$foo; >>> $bar=~s/(\w+-\d+)-\d+/$1/; >>> # $bar now 'ABC-987'. >>> >>> That's three lines. Is there a way to do this in one line? >> >> Maybe I misunderstood the question... You can say >> >> my ($bar) = $foo =~ /(\w+-\d+)-\d+/; >> >> which will assing $1 to $bar if the match succeeds. >> > Compressing the assignment (which really doesn't include the original > setting of $foo) saves one line ad one naming of $bar at the expense > of > complexity and inflexibility. > > To comprehend the expression, you have to keep an extra level on the > mental stack, and if you want to change the destination you risk > changing > the regex. (The two expressions aren't completely equivalent; the > original > doesn't change $foo, the other, like most of the suggestions, does.) > > Sometimes, it pays to remember the KISS principle, and the joke (?) > about > a gentleman being a man who knows how to play the accordion, but > doesn't. Maybe I have missed something subtle ;-) The correct answer to Madi's question is "Yes." (Code or the suggestion to remove newlines in the source were extras...) Doing it in one line is possible, but whether it's a good thing is another issue. I don't think that the suggestion above changes $foo, as all it does is a match in list context so $1 gets assigned to $bar if the match succeeds. Have I missed an obvious "gotcha" ? #!/usr/bin/env perl use strict; use warnings; my $foo="ABC-987-01"; my ($bar) = $foo =~ /(\w+-\d+)-\d+/; print "$foo $bar\n"; __END__ => ABC-987-01 ABC-987 All error / success/failure checking has been left out. Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. From indy at indigostar.com Wed Jul 9 09:27:35 2008 From: indy at indigostar.com (Indy Singh) Date: Wed, 9 Jul 2008 12:27:35 -0400 Subject: [tpm] Regex question References: <48738118.5050705@alteeve.com> <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> Message-ID: <002e01c8e1e0$b20b7b80$6600a8c0@roadhog> Alan, If you are suggesting that it is better to have left it as the original multi line code instead of the compressed version, I am not sure that I agree with that. Here is an example using different variable names to clarify the intent: First written your way: 1: $name = "Alan Rocker"; 2: $first_name = $name; 3: $first_name =~ s/\s.*$//; # remove the last name The problem I have with this code is that if you look at line 2, it is temporarily wrong. At this point $first_name contains the full name so it is wrong. Then we correct the error on line 3. Since I read code one line at a time, my brain throws an exception when I see line 2. It is possible to somewhat clarify the intent my merging line 2 and 3: $first_name = $name; $first_name =~ s/\s.*$//; But I really prefer the following method: 1: $full_name = "Alan Rocker"; 2: ($first_name) = $full_name =~ /(*?)\s/; In this example at any point the varaibles only ever contain what they are supposed to contain, i.e. $first_name actually contains the first name. To further expand the example to include a common need to split fields from a line: 1: $full_name = "Alan Rocker"; 2: ($first_name, $last_name) = $full_name =~ /(*?)\s(.*)/; (Note untested code, may contain bugs) Now, where did I put my accordian? ... Indy Singh IndigoSTAR Software -- www.indigostar.com ----- Original Message ----- From: To: "Toronto Perl Mongers" Sent: Wednesday, July 09, 2008 11:51 AM Subject: Re: [tpm] Regex question > Madi's original question, and one typical response: > >>> my $foo="ABC-987-01"; >>> my $bar=$foo; >>> $bar=~s/(\w+-\d+)-\d+/$1/; >>> # $bar now 'ABC-987'. >>> >>> That's three lines. Is there a way to do this in one line? >> >> Maybe I misunderstood the question... You can say >> >> my ($bar) = $foo =~ /(\w+-\d+)-\d+/; >> >> which will assing $1 to $bar if the match succeeds. >> > Compressing the assignment (which really doesn't include the original > setting of $foo) saves one line ad one naming of $bar at the expense > of > complexity and inflexibility. > > To comprehend the expression, you have to keep an extra level on the > mental stack, and if you want to change the destination you risk > changing > the regex. (The two expressions aren't completely equivalent; the > original > doesn't change $foo, the other, like most of the suggestions, does.) > > Sometimes, it pays to remember the KISS principle, and the joke (?) > about > a gentleman being a man who knows how to play the accordion, but > doesn't. > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From fernandocorrea at gmail.com Wed Jul 9 09:41:34 2008 From: fernandocorrea at gmail.com (Fernando Oliveira) Date: Wed, 9 Jul 2008 13:41:34 -0300 Subject: [tpm] Regex question In-Reply-To: <002e01c8e1e0$b20b7b80$6600a8c0@roadhog> References: <48738118.5050705@alteeve.com> <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> <002e01c8e1e0$b20b7b80$6600a8c0@roadhog> Message-ID: in this case, I would prefer: $name = "Alan Rocker"; ($first_name, @other_names) = split/\s+/, $name; 2008/7/9 Indy Singh : > Alan, > If you are suggesting that it is better to have left it as the original > multi line code instead of the compressed version, I am not sure that I > agree with that. > > Here is an example using different variable names to clarify the intent: > First written your way: > 1: $name = "Alan Rocker"; > 2: $first_name = $name; > 3: $first_name =~ s/\s.*$//; # remove the last name > > The problem I have with this code is that if you look at line 2, it is > temporarily wrong. At this point $first_name contains the full name so it > is wrong. Then we correct the error on line 3. Since I read code one line > at a time, my brain throws an exception when I see line 2. It is possible > to somewhat clarify the intent my merging line 2 and 3: > > $first_name = $name; $first_name =~ s/\s.*$//; > > But I really prefer the following method: > 1: $full_name = "Alan Rocker"; > 2: ($first_name) = $full_name =~ /(*?)\s/; > > In this example at any point the varaibles only ever contain what they are > supposed to contain, i.e. $first_name actually contains the first name. > > To further expand the example to include a common need to split fields from > a line: > 1: $full_name = "Alan Rocker"; > 2: ($first_name, $last_name) = $full_name =~ /(*?)\s(.*)/; > > (Note untested code, may contain bugs) > > Now, where did I put my accordian? ... > > Indy Singh > IndigoSTAR Software -- www.indigostar.com > > > ----- Original Message ----- From: > To: "Toronto Perl Mongers" > Sent: Wednesday, July 09, 2008 11:51 AM > Subject: Re: [tpm] Regex question > > > > Madi's original question, and one typical response: >> >> my $foo="ABC-987-01"; >>>> my $bar=$foo; >>>> $bar=~s/(\w+-\d+)-\d+/$1/; >>>> # $bar now 'ABC-987'. >>>> >>>> That's three lines. Is there a way to do this in one line? >>>> >>> >>> Maybe I misunderstood the question... You can say >>> >>> my ($bar) = $foo =~ /(\w+-\d+)-\d+/; >>> >>> which will assing $1 to $bar if the match succeeds. >>> >>> Compressing the assignment (which really doesn't include the original >> setting of $foo) saves one line ad one naming of $bar at the expense of >> complexity and inflexibility. >> >> To comprehend the expression, you have to keep an extra level on the >> mental stack, and if you want to change the destination you risk changing >> the regex. (The two expressions aren't completely equivalent; the original >> doesn't change $foo, the other, like most of the suggestions, does.) >> >> Sometimes, it pays to remember the KISS principle, and the joke (?) about >> a gentleman being a man who knows how to play the accordion, but doesn't. >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Just another Perl Hacker, Fernando (SmokeMachine) http://perl-e.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.a.graham at gmail.com Wed Jul 9 09:45:25 2008 From: james.a.graham at gmail.com (Jim Graham) Date: Wed, 9 Jul 2008 12:45:25 -0400 Subject: [tpm] Regex question In-Reply-To: <002e01c8e1e0$b20b7b80$6600a8c0@roadhog> References: <48738118.5050705@alteeve.com> <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> <002e01c8e1e0$b20b7b80$6600a8c0@roadhog> Message-ID: To follow up ... The code I posted a while back ... my $foo='ABC-987-01'; ( my $bar = $foo ) =~ s{(\w+-\d+)-\d+}{$1}; does do a replace (not just a match), but not on $foo. The replace is done on $bar immediately following the assignment. Whether this triggers an ILE (Indy Line Exception) I don't know ... - Jim On 9-Jul-08, at 12:27 PM, Indy Singh wrote: > Alan, > If you are suggesting that it is better to have left it as the > original multi line code instead of the compressed version, I am > not sure that I agree with that. > > Here is an example using different variable names to clarify the > intent: > First written your way: > 1: $name = "Alan Rocker"; > 2: $first_name = $name; > 3: $first_name =~ s/\s.*$//; # remove the last name > > The problem I have with this code is that if you look at line 2, it > is temporarily wrong. At this point $first_name contains the full > name so it is wrong. Then we correct the error on line 3. Since I > read code one line at a time, my brain throws an exception when I > see line 2. It is possible to somewhat clarify the intent my > merging line 2 and 3: > > $first_name = $name; $first_name =~ s/\s.*$//; > > But I really prefer the following method: > 1: $full_name = "Alan Rocker"; > 2: ($first_name) = $full_name =~ /(*?)\s/; > > In this example at any point the varaibles only ever contain what > they are supposed to contain, i.e. $first_name actually contains > the first name. > > To further expand the example to include a common need to split > fields from a line: > 1: $full_name = "Alan Rocker"; > 2: ($first_name, $last_name) = $full_name =~ /(*?)\s(.*)/; > > (Note untested code, may contain bugs) > > Now, where did I put my accordian? ... > > Indy Singh > IndigoSTAR Software -- www.indigostar.com > > > ----- Original Message ----- From: > To: "Toronto Perl Mongers" > Sent: Wednesday, July 09, 2008 11:51 AM > Subject: Re: [tpm] Regex question > > >> Madi's original question, and one typical response: >> >>>> my $foo="ABC-987-01"; >>>> my $bar=$foo; >>>> $bar=~s/(\w+-\d+)-\d+/$1/; >>>> # $bar now 'ABC-987'. >>>> >>>> That's three lines. Is there a way to do this in one line? >>> >>> Maybe I misunderstood the question... You can say >>> >>> my ($bar) = $foo =~ /(\w+-\d+)-\d+/; >>> >>> which will assing $1 to $bar if the match succeeds. >>> >> Compressing the assignment (which really doesn't include the original >> setting of $foo) saves one line ad one naming of $bar at the >> expense of >> complexity and inflexibility. >> >> To comprehend the expression, you have to keep an extra level on the >> mental stack, and if you want to change the destination you risk >> changing >> the regex. (The two expressions aren't completely equivalent; the >> original >> doesn't change $foo, the other, like most of the suggestions, does.) >> >> Sometimes, it pays to remember the KISS principle, and the joke (?) >> about >> a gentleman being a man who knows how to play the accordion, but >> doesn't. >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From linux at alteeve.com Wed Jul 9 09:50:32 2008 From: linux at alteeve.com (Madison Kelly) Date: Wed, 09 Jul 2008 12:50:32 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> References: <4873C010.4010407@alteeve.com> <83eac04d0807081341o7eb9e25fgdaa1ddc886a8895c@mail.gmail.com> <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> Message-ID: <4874EC58.8070000@alteeve.com> Rob Janes wrote: > oops, first reply went to Madison alone ... > > I think this is better ... > > use Encode qw(from_to decode); > > my $data = "R?sidence"; > from_to($data, "iso-8859-1", "utf8"); ## assuming R?sidence is encoded > in 8859-1 > or > my $data = decode("iso-8859-1", "R?sidence"); > > both of these will create a utf8 string from R?sidence. However, > depending on the original encoding of R?sidence, what's stored in the > database may or may not be what you want. > > In other words, the lack of an error message is not indicative of it > working. > > -rob I am not sure if this is the most ... appropriate way to solve the problem, so I would still love to have some feedback if you (or anyone) has any. I got it working this way: - Read the data from the website and push it into a hash (hidden input values stored as "$input{name}=value;". - Loop through the '%input' hash keys and populate a new hash '%enc_input' with the same format. - Read the old values from the database into a matching hash called '%old_input'. - Pseduo-code: foreach $key (keys %input) { if ( $input{$key} ne $old_input{$key} ) { # Update the DB using the '$enc_input' hash value. } } It's ugly as sin, but it seems like the only time I need to use 'Encode' functions are in the actual PgSQL INPUT or UPDATE calls; not in the comparison of the value either from the HTML page or from the database. Odd. Thanks for your help, Rob and Cees! Madi From janes.rob at gmail.com Wed Jul 9 10:51:59 2008 From: janes.rob at gmail.com (Rob Janes) Date: Wed, 9 Jul 2008 13:51:59 -0400 Subject: [tpm] PostgreSQL INSERT/UTF-8 problem In-Reply-To: <4874EC58.8070000@alteeve.com> References: <4873C010.4010407@alteeve.com> <83eac04d0807081341o7eb9e25fgdaa1ddc886a8895c@mail.gmail.com> <83eac04d0807081451v46f9adefwff4b629c3e0b462e@mail.gmail.com> <4874EC58.8070000@alteeve.com> Message-ID: <83eac04d0807091051r6dff5520hb33b966d17818033@mail.gmail.com> the code won't fail, but you would do an UPDATE more often that you need to. the key-value from the database is utf8, "foo=bar" the key-value from the http form is, say, ebcdic, "foo=bar" utf8 "bar" does not equal ebcdic "bar" update database with decode("ebcdic", $input_form{foo}) , which will update the database with exactly the same string as what's already there. to save on database updates, one would my $charset_from_http_header; ... set $charset_from_http_header ... while (my ($key, $value) = each %new_input_from_http_form) { my $decoded_key = decode($charset_from_http_header, $key); my $decoded_value = decode($charset_from_http_header, $value); ## or $new_input_from_http_form{$key} if ( $decoded_value ne $old_input_saved_in_db{$decoded_key} ) ## important that $decoded_key is used here { # Update the DB using the '$decoded_value' value. } } well ... the http form keys are probably ascii, since you would have designed the form, and therefore $decoded_key is the same as $key. the form's key and value pairs will be encoded as per the http header charset. if the browser is set to an ebcdic code page, you'll be in trouble if you don't decode the key. that would be really wierd though, having a browser doing ebcdic. however, i wouldn't be surprised if there weren't other code pages that are not ascii friendly, like maybe mandarin, thai, tibet, whatever. the binary representation of an ascii string is the same in latin1 as it is in any of the iso-8859 dialects, and in utf8. but if you render that same string in ebcdic, kansas goes bye bye. -rob On Wed, Jul 9, 2008 at 12:50 PM, Madison Kelly wrote: > Rob Janes wrote: > >> oops, first reply went to Madison alone ... >> >> I think this is better ... >> >> use Encode qw(from_to decode); >> >> my $data = "R?sidence"; >> from_to($data, "iso-8859-1", "utf8"); ## assuming R?sidence is encoded in >> 8859-1 >> or >> my $data = decode("iso-8859-1", "R?sidence"); >> >> both of these will create a utf8 string from R?sidence. However, >> depending on the original encoding of R?sidence, what's stored in the >> database may or may not be what you want. >> >> In other words, the lack of an error message is not indicative of it >> working. >> >> -rob >> > > I am not sure if this is the most ... appropriate way to solve the problem, > so I would still love to have some feedback if you (or anyone) has any. > > I got it working this way: > > - Read the data from the website and push it into a hash (hidden input > values stored as "$input{name}=value;". > - Loop through the '%input' hash keys and populate a new hash '%enc_input' > with the same format. > - Read the old values from the database into a matching hash called > '%old_input'. > - Pseduo-code: > foreach $key (keys %input) > { > if ( $input{$key} ne $old_input{$key} ) > { > # Update the DB using the '$enc_input' hash value. > } > } > > It's ugly as sin, but it seems like the only time I need to use 'Encode' > functions are in the actual PgSQL INPUT or UPDATE calls; not in the > comparison of the value either from the HTML page or from the database. > > Odd. > > Thanks for your help, Rob and Cees! > > Madi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arocker at vex.net Wed Jul 9 13:42:30 2008 From: arocker at vex.net (arocker at vex.net) Date: Wed, 9 Jul 2008 16:42:30 -0400 (EDT) Subject: [tpm] Regex question In-Reply-To: References: <48738118.5050705@alteeve.com> <61696.67.204.17.34.1215618692.squirrel@webmail.vex.net> Message-ID: <38757.192.30.202.21.1215636150.squirrel@webmail.vex.net> >From "Mike Stok": > > Maybe I have missed something subtle ;-) > .... > I don't think that the suggestion above changes $foo, as all it does > is a match in list context so $1 gets assigned to $bar if the match > succeeds. Have I missed an obvious "gotcha" ? > Now I'm not sure; you may well be right. I shouldn't have posted without proof at hand. However, in a sense that illustrated the point I was trying to make; it's harder to understand the shorter complex expression than the simpler one. (There's a trade-off there, as well. Spreading an expression over too many lines can lead to earlier processes being overlooked or forgotten.) From mfowle at navicominc.com Fri Jul 11 12:45:07 2008 From: mfowle at navicominc.com (Mark Fowle) Date: Fri, 11 Jul 2008 15:45:07 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> Message-ID: <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> I want to slice an array using info passed in a text string (in my example $slice). Maybe it's because its Friday, but my forehead is starting to hurt from the banging. Any help would be appreciated. Thanks in advance. Mark ---- Snipit ---- #!/usr/bin/perl use strict; use warnings; my $slice = "1..3"; my @in = qw(a b c d e f g h); my @out = $in[$slice]; my $p = join(" ", at out); print "$p\n"; ---- Output ---- Argument "1..3" isn't numeric in array slice at ./test.pl line 7. b ---- I wanted ---- b c d From xdaveg at gmail.com Fri Jul 11 12:57:10 2008 From: xdaveg at gmail.com (David Golden) Date: Fri, 11 Jul 2008 15:57:10 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> Message-ID: <5d4beb40807111257i1885609esb5dcf79234d13a49@mail.gmail.com> eval $slice But be sure you can trust the string before you do that. David On Fri, Jul 11, 2008 at 3:45 PM, Mark Fowle wrote: > I want to slice an array using info passed in a text string (in my > example $slice). > Maybe it's because its Friday, but my forehead is starting to hurt from > the banging. > > Any help would be appreciated. > > Thanks in advance. > > Mark > > ---- Snipit ---- > #!/usr/bin/perl > use strict; > use warnings; > > my $slice = "1..3"; > my @in = qw(a b c d e f g h); > my @out = $in[$slice]; > my $p = join(" ", at out); > print "$p\n"; > > ---- Output ---- > Argument "1..3" isn't numeric in array slice at ./test.pl line 7. > b > > > ---- I wanted ---- > b c d > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From mfowle at navicominc.com Fri Jul 11 13:00:28 2008 From: mfowle at navicominc.com (Mark Fowle) Date: Fri, 11 Jul 2008 16:00:28 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <5d4beb40807111257i1885609esb5dcf79234d13a49@mail.gmail.com> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> <5d4beb40807111257i1885609esb5dcf79234d13a49@mail.gmail.com> Message-ID: <759E3F14A23281479A85A082BBCFA542492476@sbsa.NavicomInc.local> Eval was my first thought but I'm not getting anywhere with it. The input it fully tested in the real program, which runs in taint mode, but thanks for the reminder. -----Original Message----- From: David Golden [mailto:xdaveg at gmail.com] Sent: Friday, July 11, 2008 3:57 PM To: Mark Fowle Cc: Toronto Perl Mongers Subject: Re: [tpm] Array slice using a variable question eval $slice But be sure you can trust the string before you do that. David On Fri, Jul 11, 2008 at 3:45 PM, Mark Fowle wrote: > I want to slice an array using info passed in a text string (in my > example $slice). > Maybe it's because its Friday, but my forehead is starting to hurt from > the banging. > > Any help would be appreciated. > > Thanks in advance. > > Mark > > ---- Snipit ---- > #!/usr/bin/perl > use strict; > use warnings; > > my $slice = "1..3"; > my @in = qw(a b c d e f g h); > my @out = $in[$slice]; > my $p = join(" ", at out); > print "$p\n"; > > ---- Output ---- > Argument "1..3" isn't numeric in array slice at ./test.pl line 7. > b > > > ---- I wanted ---- > b c d > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From samogon at gmail.com Fri Jul 11 13:04:23 2008 From: samogon at gmail.com (Ilia Lobsanov) Date: Fri, 11 Jul 2008 16:04:23 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> Message-ID: <4AE6B0F5-F516-4A6E-AB96-E24A277328ED@gmail.com> my @slice = (1..3); my @in = qw(a b c d e f g h); my @out = @in[@slice]; my $p = join(" ", at out); print "$p\n"; ilia. On 11-Jul-08, at 3:45 PM, Mark Fowle wrote: > I want to slice an array using info passed in a text string (in my > example $slice). > Maybe it's because its Friday, but my forehead is starting to hurt > from > the banging. > > Any help would be appreciated. > > Thanks in advance. > > Mark > > ---- Snipit ---- > #!/usr/bin/perl > use strict; > use warnings; > > my $slice = "1..3"; > my @in = qw(a b c d e f g h); > my @out = $in[$slice]; > my $p = join(" ", at out); > print "$p\n"; > > ---- Output ---- > Argument "1..3" isn't numeric in array slice at ./test.pl line 7. > b > > > ---- I wanted ---- > b c d > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From samogon at gmail.com Fri Jul 11 13:07:19 2008 From: samogon at gmail.com (Ilia Lobsanov) Date: Fri, 11 Jul 2008 16:07:19 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <4AE6B0F5-F516-4A6E-AB96-E24A277328ED@gmail.com> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> <4AE6B0F5-F516-4A6E-AB96-E24A277328ED@gmail.com> Message-ID: <4CBCA01D-0FAC-4800-AB17-E66B4BAB2340@gmail.com> Or... my $slice = "1..3"; my @slice = eval "($slice)"; my @in = qw(a b c d e f g h); my @out = @in[@slice]; my $p = join(" ", at out); print "$p\n"; On 11-Jul-08, at 4:04 PM, Ilia Lobsanov wrote: > my @slice = (1..3); > my @in = qw(a b c d e f g h); > my @out = @in[@slice]; > my $p = join(" ", at out); > print "$p\n"; > > > ilia. > > On 11-Jul-08, at 3:45 PM, Mark Fowle wrote: > >> I want to slice an array using info passed in a text string (in my >> example $slice). >> Maybe it's because its Friday, but my forehead is starting to hurt >> from >> the banging. >> >> Any help would be appreciated. >> >> Thanks in advance. >> >> Mark >> >> ---- Snipit ---- >> #!/usr/bin/perl >> use strict; >> use warnings; >> >> my $slice = "1..3"; >> my @in = qw(a b c d e f g h); >> my @out = $in[$slice]; >> my $p = join(" ", at out); >> print "$p\n"; >> >> ---- Output ---- >> Argument "1..3" isn't numeric in array slice at ./test.pl line 7. >> b >> >> >> ---- I wanted ---- >> b c d >> >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > From mfowle at navicominc.com Fri Jul 11 13:09:39 2008 From: mfowle at navicominc.com (Mark Fowle) Date: Fri, 11 Jul 2008 16:09:39 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <4CBCA01D-0FAC-4800-AB17-E66B4BAB2340@gmail.com> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> <4AE6B0F5-F516-4A6E-AB96-E24A277328ED@gmail.com> <4CBCA01D-0FAC-4800-AB17-E66B4BAB2340@gmail.com> Message-ID: <759E3F14A23281479A85A082BBCFA542492477@sbsa.NavicomInc.local> Thanks. -----Original Message----- From: Ilia Lobsanov [mailto:samogon at gmail.com] Sent: Friday, July 11, 2008 4:07 PM To: Mark Fowle Cc: Toronto Perl Mongers Subject: Re: [tpm] Array slice using a variable question Or... my $slice = "1..3"; my @slice = eval "($slice)"; my @in = qw(a b c d e f g h); my @out = @in[@slice]; my $p = join(" ", at out); print "$p\n"; On 11-Jul-08, at 4:04 PM, Ilia Lobsanov wrote: > my @slice = (1..3); > my @in = qw(a b c d e f g h); > my @out = @in[@slice]; > my $p = join(" ", at out); > print "$p\n"; > > > ilia. > > On 11-Jul-08, at 3:45 PM, Mark Fowle wrote: > >> I want to slice an array using info passed in a text string (in my >> example $slice). >> Maybe it's because its Friday, but my forehead is starting to hurt >> from >> the banging. >> >> Any help would be appreciated. >> >> Thanks in advance. >> >> Mark >> >> ---- Snipit ---- >> #!/usr/bin/perl >> use strict; >> use warnings; >> >> my $slice = "1..3"; >> my @in = qw(a b c d e f g h); >> my @out = $in[$slice]; >> my $p = join(" ", at out); >> print "$p\n"; >> >> ---- Output ---- >> Argument "1..3" isn't numeric in array slice at ./test.pl line 7. >> b >> >> >> ---- I wanted ---- >> b c d >> >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > From uri at stemsystems.com Fri Jul 11 14:51:18 2008 From: uri at stemsystems.com (Uri Guttman) Date: Fri, 11 Jul 2008 17:51:18 -0400 Subject: [tpm] Array slice using a variable question In-Reply-To: <759E3F14A23281479A85A082BBCFA542492477@sbsa.NavicomInc.local> (Mark Fowle's message of "Fri, 11 Jul 2008 16:09:39 -0400") References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> <759E3F14A23281479A85A082BBCFA542492472@sbsa.NavicomInc.local> <4AE6B0F5-F516-4A6E-AB96-E24A277328ED@gmail.com> <4CBCA01D-0FAC-4800-AB17-E66B4BAB2340@gmail.com> <759E3F14A23281479A85A082BBCFA542492477@sbsa.NavicomInc.local> Message-ID: >>>>> "MF" == Mark Fowle writes: MF> my $slice = "1..3"; MF> my @slice = eval "($slice)"; eval may be simpler and even cleaner but it should be avoided at all costs. if the input format is exactly like what you show then you can grab out the numbers and get a range from that. my $slice = "1..3"; my @range = ( $1 .. $2 ) if $slice =~ /(\d+)\.\.(\d+)/ ; a little more code but much safer and possibly even faster. in general, avoid eval unless it is the only solution or so much better than all the other solutions. it is rarely needed and almost never for basic data munging like this. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From linux at alteeve.com Mon Jul 14 11:53:59 2008 From: linux at alteeve.com (Madison Kelly) Date: Mon, 14 Jul 2008 14:53:59 -0400 Subject: [tpm] Understanding 'use base ...' Message-ID: <487BA0C7.8000901@alteeve.com> Hi all, I am working on some docs, and noticed that a module is called via: use base qw(Net::DBus::Object); I am trying to understand the 'use base' syntax, and all I've been able to find in perldoc is in perlmodlib: base Establish IS-A relationship with base classes at compile time Can someone either explain to me what this means, or better, point me at what docs explain "IS-A relationship"s? I hate "just accepting" that something is at it is. Probably why I never get anything actually done. :) Thanks as always! Madi From linux at alteeve.com Mon Jul 14 11:59:19 2008 From: linux at alteeve.com (Madison Kelly) Date: Mon, 14 Jul 2008 14:59:19 -0400 Subject: [tpm] Found the answer: Re: Understanding 'use base ...' In-Reply-To: <487BA0C7.8000901@alteeve.com> References: <487BA0C7.8000901@alteeve.com> Message-ID: <487BA207.7040601@alteeve.com> Madison Kelly wrote: > Hi all, > > I am working on some docs, and noticed that a module is called via: > > use base qw(Net::DBus::Object); > > I am trying to understand the 'use base' syntax, and all I've been > able to find in perldoc is in perlmodlib: > > base Establish IS-A relationship with base classes at compile time > > Can someone either explain to me what this means, or better, point me > at what docs explain "IS-A relationship"s? I hate "just accepting" that > something is at it is. Probably why I never get anything actually done. :) > > Thanks as always! > > Madi I am sorry for the line noise... After posting this I smacked myself in the head and simply looked for 'base' in perldoc. Duh. :) http://perldoc.perl.org/base.html Sorry, and thanks. Madi From james.a.graham at gmail.com Mon Jul 14 12:04:22 2008 From: james.a.graham at gmail.com (Jim Graham) Date: Mon, 14 Jul 2008 15:04:22 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <487BA0C7.8000901@alteeve.com> References: <487BA0C7.8000901@alteeve.com> Message-ID: Hi From > perldoc base NAME base ? Establish IS?A relationship with base classes at compile time SYNOPSIS package Baz; use base qw(Foo Bar); DESCRIPTION Allows you to both load one or more modules, while setting up inheri? tance from those modules at the same time. Roughly similar in effect to package Baz; BEGIN { require Foo; require Bar; push @ISA, qw(Foo Bar); } The @ISA array is the fundamental way of creating inheritance of objects in Perl. Literally, if you define one class 'Baz' as a sub- class of another (base) class 'Foo', you say 'Baz' ISA 'Foo'. See http://en.wikipedia.org/wiki/Isa_%28computer_science%29 'use base' is short-hand for setting up the inheritance yourself. It says, 'use the following classes as base classes for my class'. Perl allows multiple inheritance, so in the above example, 'Baz' ISA 'Foo' and 'Bar'. This is distinct from Java and Ruby, which only allow direct inheritance, although they address these issues with interfaces and mix-ins, respectively. Hope this helps, Jim On 14-Jul-08, at 2:53 PM, Madison Kelly wrote: > Hi all, > > I am working on some docs, and noticed that a module is called via: > > use base qw(Net::DBus::Object); > > I am trying to understand the 'use base' syntax, and all I've been > able to find in perldoc is in perlmodlib: > > base Establish IS-A relationship with base classes at compile > time > > Can someone either explain to me what this means, or better, point > me at what docs explain "IS-A relationship"s? I hate "just > accepting" that something is at it is. Probably why I never get > anything actually done. :) > > Thanks as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From sfryer at sourcery.ca Mon Jul 14 14:13:31 2008 From: sfryer at sourcery.ca (Shaun Fryer) Date: Mon, 14 Jul 2008 17:13:31 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <487BA0C7.8000901@alteeve.com> References: <487BA0C7.8000901@alteeve.com> Message-ID: <20080714211331.GA30387@sourcery.ca> Hi Madi, I see you already answered your own question, but I'd like to add something which may not be documented (haven't checked). Unlike @ISA, "use base" does not respect order of inheritance. While generally multiple inheritance is a bad idea, it's difficult to get around at times due to the widespread use in many common Perl modules of "implementation inheritance", versus the much better and more flexible "interface inheritance" pattern. So while, @ISA stores the inheritance chain in a fixed "ordered list", "use base" does not respect the order of inheritance, which can pose problems and produce many intermittent so called "heisenbugs". Have fun! :) Shaun On Mon, Jul 14, 2008 at 02:53:59PM -0400, Madison Kelly wrote: > Hi all, > > I am working on some docs, and noticed that a module is called via: > > use base qw(Net::DBus::Object); > > I am trying to understand the 'use base' syntax, and all I've been > able to find in perldoc is in perlmodlib: > > base Establish IS-A relationship with base classes at compile time > > Can someone either explain to me what this means, or better, point me > at what docs explain "IS-A relationship"s? I hate "just accepting" that > something is at it is. Probably why I never get anything actually done. :) > > Thanks as always! > > Madi From rdice at pobox.com Mon Jul 14 15:15:36 2008 From: rdice at pobox.com (Richard Dice) Date: Mon, 14 Jul 2008 18:15:36 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <487BA0C7.8000901@alteeve.com> References: <487BA0C7.8000901@alteeve.com> Message-ID: <5bef4baf0807141515r6f4438ceucaf676b8f3dc3892@mail.gmail.com> Hi Madi, I've seen a few replies to your posting but none so far actually talk about the idea behind "is a", which it seemed to me you were looking for. In object oriented programming, the two major kinds of relationships classes and objects might have with each other is the "is a" relationship (i.e. inheritance) and the "has a relationship" (i.e. composition). By declaring class Dog to have an is-a relationship with class Mammal, you are saying that Dogs have all the properties that Mammals do (for instance, live birth of young, production of milk, hair/fur, kinship with Dan Fielding), plus they have some specific properties that only Dogs have (barking, chasing after Frisbees, being man's best friend). [You could go a bit further and state that no animal can be created _directly_ as being a Mammal; animals can only be specific types of Mammals. As such, you could consider Mammal to be an interface specification class (aka virtual class), but this is a more advanced concept that we don't really need to go into now.) In English, you would read this relationship as "a dog is a mammal." In Perl, you would say: package Dog; use base qw (Mammal); But really, Dogs are Canines, so you'd probably say Dog is-a Canine, and you'd pick up on being a Mammal by virtue of Canine is-a Mammal, and Mammal is-a Chordate, and Chordate is-a Animal, and Animal is-a Life. Is-a relationships often chain their way to some level of complexity. package Life; # in Perl, implicitly uses the base class "UNIVERSAL" . . # DNA, i haz it! . package Animal; use base qw (Life); . . . package Mammal; use base qw (Animal); . . . package Canine; use base qw (Mammal); . . . package Dog; use base qw (Canine); . . . 1; I've seen some talk of multiple inheritance. This is technically possible in Perl but often controversial. That would be like saying Dog is-a Canine, but Dog is-a Pet also. (Rocks occasionally are pets too, as are peeves.) In Perl this would be: package Dog; use base qw (Canine Pet); . . . 1; Old-school, you'd establish is-a relationships by manipulating the @ISA array. Has-a relationships is where the thing possesses another thing. Dogs have eyes. They have tails too. They have collars and leashes. Each of these things can be had by wildly different other things (e.g. octopuses, jet airplanes, B&D fetishists) so these objects can be free-floating things that you can tack onto the side of anything else. They can have their own is-a relationship hierarchies too. There isn't a syntax in the language that specifically implements has-a relationships. You just kind of throw those into your objects. package Dog; use base qw (Canine Pet); use Eye; use Tail; use NaughtyNaughty; sub new { my $class = shift; my $eye = Eye->new(); my $tail = Tail->new(); my $collar = NaughtyNaughty->new(); my $self = bless { eye => $eye, tail => $tail, collar => $collar }, $class; return $self; } . . . 1; Cheers, - Richard On Mon, Jul 14, 2008 at 2:53 PM, Madison Kelly wrote: > Hi all, > > I am working on some docs, and noticed that a module is called via: > > use base qw(Net::DBus::Object); > > I am trying to understand the 'use base' syntax, and all I've been able to > find in perldoc is in perlmodlib: > > base Establish IS-A relationship with base classes at compile time > > Can someone either explain to me what this means, or better, point me at > what docs explain "IS-A relationship"s? I hate "just accepting" that > something is at it is. Probably why I never get anything actually done. :) > > Thanks as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From uri at stemsystems.com Mon Jul 14 15:34:49 2008 From: uri at stemsystems.com (Uri Guttman) Date: Mon, 14 Jul 2008 18:34:49 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <20080714211331.GA30387@sourcery.ca> (Shaun Fryer's message of "Mon, 14 Jul 2008 17:13:31 -0400") References: <487BA0C7.8000901@alteeve.com> <20080714211331.GA30387@sourcery.ca> Message-ID: >>>>> "SF" == Shaun Fryer writes: SF> I see you already answered your own question, but I'd like to add SF> something which may not be documented (haven't checked). Unlike SF> @ISA, "use base" does not respect order of inheritance. While SF> generally multiple inheritance is a bad idea, it's difficult to SF> get around at times due to the widespread use in many common Perl SF> modules of "implementation inheritance", versus the much better SF> and more flexible "interface inheritance" pattern. So while, @ISA SF> stores the inheritance chain in a fixed "ordered list", "use base" SF> does not respect the order of inheritance, which can pose problems SF> and produce many intermittent so called "heisenbugs". that sounds wrong to me. use base just sets @ISA for you. and it will do so in the order you put the use base lines. i am not sure if it does unshift or push onto @ISA but that is easily determined. why do you think that use base does something other than mung @ISA? @ISA is the only way perl inheritance works so it has to be munged by use base. and that is trivial to show by running a couple of use base calls. perl -le 'use base "LWP::Simple" ; use base "Scalar::Util"; print "@ISA\n" ' LWP::Simple Scalar::Util perl -le 'use base "Scalar::Util"; use base "LWP::Simple" ; print "@ISA\n" ' Scalar::Util LWP::Simple so it looks like the first use base is higher priority in @ISA which means it does a push. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From sfryer at sourcery.ca Tue Jul 15 08:30:21 2008 From: sfryer at sourcery.ca (Shaun Fryer) Date: Tue, 15 Jul 2008 11:30:21 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: References: <487BA0C7.8000901@alteeve.com> <20080714211331.GA30387@sourcery.ca> Message-ID: <20080715153020.GA19873@sourcery.ca> It was pointed out to me by a collegue a month or so ago after he spent a day tracking down strange inheritance related problems in a code base we were working on. It may be that there were other peculiarities to the environment which lead to the problem. I'll have to look into it a bit deeper I guess. Perhaps if it happens further up the inheritance chain that might have side effects? Hmm. Well, sorry for any confusion... Cheers, Shaun Fryer On Mon, Jul 14, 2008 at 06:34:49PM -0400, Uri Guttman wrote: > that sounds wrong to me. use base just sets @ISA for you. and it will do > so in the order you put the use base lines. i am not sure if it does > unshift or push onto @ISA but that is easily determined. why do you > think that use base does something other than mung @ISA? @ISA is the > only way perl inheritance works so it has to be munged by use base. > > and that is trivial to show by running a couple of use base calls. > > perl -le 'use base "LWP::Simple" ; use base "Scalar::Util"; print "@ISA\n" ' > LWP::Simple Scalar::Util > > perl -le 'use base "Scalar::Util"; use base "LWP::Simple" ; print "@ISA\n" ' > Scalar::Util LWP::Simple > > so it looks like the first use base is higher priority in @ISA which > means it does a push. > > uri From uri at stemsystems.com Tue Jul 15 12:02:08 2008 From: uri at stemsystems.com (Uri Guttman) Date: Tue, 15 Jul 2008 15:02:08 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <20080715153020.GA19873@sourcery.ca> (Shaun Fryer's message of "Tue, 15 Jul 2008 11:30:21 -0400") References: <487BA0C7.8000901@alteeve.com> <20080714211331.GA30387@sourcery.ca> <20080715153020.GA19873@sourcery.ca> Message-ID: >>>>> "SF" == Shaun Fryer writes: SF> It was pointed out to me by a collegue a month or so ago after he spent SF> a day tracking down strange inheritance related problems in a code base SF> we were working on. It may be that there were other peculiarities to the SF> environment which lead to the problem. I'll have to look into it a bit SF> deeper I guess. Perhaps if it happens further up the inheritance chain SF> that might have side effects? Hmm. Well, sorry for any confusion... multiple inheritance can be wacky no matter how you set up @ISA. this is why some langs disallow it altogether. the classic diamond pattern of inheritance has serious issues (A inherits from B & C which both inherit from D. does an inherited method call to A check B then D and then C or B then C then D?) but my point about use base vs. explicit assigning of @ISA stands. there is no difference between them. use base is cleaner as it loads the module and sets @ISA for you in one line. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From rick at bort.ca Tue Jul 15 14:58:27 2008 From: rick at bort.ca (Rick Delaney) Date: Tue, 15 Jul 2008 17:58:27 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: References: <487BA0C7.8000901@alteeve.com> <20080714211331.GA30387@sourcery.ca> <20080715153020.GA19873@sourcery.ca> Message-ID: <20080715215827.GF26356@bort.ca> On Jul 15 2008, Uri Guttman wrote: > multiple inheritance can be wacky no matter how you set up @ISA. this is > why some langs disallow it altogether. the classic diamond pattern of > inheritance has serious issues (A inherits from B & C which both inherit > from D. does an inherited method call to A check B then D and then C or > B then C then D?) > > but my point about use base vs. explicit assigning of @ISA stands. there > is no difference between them. use base is cleaner as it loads the > module and sets @ISA for you in one line. That would be nice, if true. But base.pm does things to try to prevent ever-growing @ISA for loads of the same module. So for (not-real-world) example, package R; use base qw(Q); package S; use base qw(Q R); @S::ISA is ["Q"] instead of ["Q", "R"]. Which in this example would mean that no methods from R would be found for an object of type S. This is not what most people would expect, I think. Your point about multiple inheritance is well taken but some people do try to use it and using it along with base.pm can lead to these kinds of problems. There is a much simpler module on CPAN, parent.pm, that acts in the way one would expect base.pm to behave. http://search.cpan.org/~corion/parent-0.221/lib/parent.pm -- Rick Delaney rick at bort.ca From uri at stemsystems.com Tue Jul 15 15:28:45 2008 From: uri at stemsystems.com (Uri Guttman) Date: Tue, 15 Jul 2008 18:28:45 -0400 Subject: [tpm] Understanding 'use base ...' In-Reply-To: <20080715215827.GF26356@bort.ca> (Rick Delaney's message of "Tue, 15 Jul 2008 17:58:27 -0400") References: <487BA0C7.8000901@alteeve.com> <20080714211331.GA30387@sourcery.ca> <20080715153020.GA19873@sourcery.ca> <20080715215827.GF26356@bort.ca> Message-ID: >>>>> "RD" == Rick Delaney writes: RD> On Jul 15 2008, Uri Guttman wrote: >> but my point about use base vs. explicit assigning of @ISA stands. there >> is no difference between them. use base is cleaner as it loads the >> module and sets @ISA for you in one line. RD> That would be nice, if true. But base.pm does things to try to prevent RD> ever-growing @ISA for loads of the same module. So for (not-real-world) RD> example, RD> package R; RD> use base qw(Q); RD> package S; RD> use base qw(Q R); RD> @S::ISA is ["Q"] instead of ["Q", "R"]. Which in this example would RD> mean that no methods from R would be found for an object of type S. RD> This is not what most people would expect, I think. interesting point. RD> Your point about multiple inheritance is well taken but some people do RD> try to use it and using it along with base.pm can lead to these kinds of RD> problems. There is a much simpler module on CPAN, parent.pm, that acts RD> in the way one would expect base.pm to behave. i generally avoid inheritance anyhow as i think it is not a great concept. very few things are groupable with inheritance without some form of compromise or square peg in round hole. but i have done wierder things such as a module which is loaded and there are both ISA and HASA relationships with the parent. i can't explain it quickly but it makes for an unusually elegant solution to an odd problem. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From rdice at pobox.com Tue Jul 15 20:12:33 2008 From: rdice at pobox.com (Richard Dice) Date: Tue, 15 Jul 2008 23:12:33 -0400 Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! Message-ID: <5bef4baf0807152012m2b200ad5pdd22d3d3b2b31b69@mail.gmail.com> Hi everyone, This email is a condensation of emails I have sent to these lists previously, so please forgive the curtness. One last reminder -- this Wednesday, July 16th, 6:30pm, Damian Conway will be presenting his talk: *Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces... Made Easy* Location: Bahen Centre for Information Technology, University of Toronto 40 St. George Street (w. side of street, just north of College Ave.) [map] Room # BA 1160 Donations are welcome! These will help provide Damian with an honorarium and to help offset costs of his trip to Toronto. How to donate? Easy! Paypal and credit card (via Paypal) - go to http://hew.ca/ Cheque and cash - bring it to the event tomorrow. I will be there to collect and I can write receipts for those who are interested. If you'd like to email me ahead of time to help me know what the pledge level might aggregate to I'd appreciate it. Facebook event for this talk - http://www.facebook.com/event.php?eid=22670172852 Cheers, - Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From abuzarchaudhary at yahoo.com Wed Jul 16 08:03:04 2008 From: abuzarchaudhary at yahoo.com (Abuzar Chaudhary) Date: Wed, 16 Jul 2008 08:03:04 -0700 (PDT) Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! In-Reply-To: <5bef4baf0807152012m2b200ad5pdd22d3d3b2b31b69@mail.gmail.com> Message-ID: <598572.50724.qm@web52907.mail.re2.yahoo.com> --- On Tue, 7/15/08, Richard Dice wrote: > From: Richard Dice > Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! > > *Temporally Quaquaversal Virtual Nanomachine Programming in > Multiple Topologically Connected Quantum-Relativistic > Parallel Timespaces... Made Easy* > Ok, so I'm trying to imagine what this talk could be about, and I think I've got a hunch (excuse me, I'm not really an IT/sci/tech person, just a slacker/hobo/hooker who is enthusiastic about the subject in my spare time)... so like I was saying, I've got a hunch about the "Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected" part, but I'm kind of lost on the "Quantum-Relativistic Parallel Timespaces" part, well, actually more like the "Quantum-Relativistic" part. Anyone have a clue? Just fun, you know, try to guess the master-of-code ahead of time :) From talexb at gmail.com Wed Jul 16 08:08:35 2008 From: talexb at gmail.com (Alex Beamish) Date: Wed, 16 Jul 2008 11:08:35 -0400 Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! In-Reply-To: <598572.50724.qm@web52907.mail.re2.yahoo.com> References: <5bef4baf0807152012m2b200ad5pdd22d3d3b2b31b69@mail.gmail.com> <598572.50724.qm@web52907.mail.re2.yahoo.com> Message-ID: On Wed, Jul 16, 2008 at 11:03 AM, Abuzar Chaudhary wrote: > > --- On Tue, 7/15/08, Richard Dice wrote: > > > From: Richard Dice > > Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! > > > > *Temporally Quaquaversal Virtual Nanomachine Programming in > > Multiple Topologically Connected Quantum-Relativistic > > Parallel Timespaces... Made Easy* > > > > Ok, so I'm trying to imagine what this talk could be about, and I think I've got a hunch (excuse me, I'm not really an IT/sci/tech person, just a slacker/hobo/hooker who is enthusiastic about the subject in my spare time)... > so like I was saying, I've got a hunch about the "Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected" part, but I'm kind of lost on the "Quantum-Relativistic Parallel Timespaces" part, well, actually more like the "Quantum-Relativistic" part. Anyone have a clue? Just fun, you know, try to guess the master-of-code ahead of time :) I don't understand the title myself, but it's not a big deal -- Damian's going to talk about Perl, and will be brilliant as usual. Who cares what the title is. Then afterwards, there will be beer. So (as the kids say), it's all good. -- Alex Beamish Toronto, Ontario aka talexb From fulko.hew at gmail.com Wed Jul 16 08:47:47 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Wed, 16 Jul 2008 11:47:47 -0400 Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! In-Reply-To: <598572.50724.qm@web52907.mail.re2.yahoo.com> References: <5bef4baf0807152012m2b200ad5pdd22d3d3b2b31b69@mail.gmail.com> <598572.50724.qm@web52907.mail.re2.yahoo.com> Message-ID: <8204a4fe0807160847w2e2f7e37m86f38c9086cbf9ba@mail.gmail.com> On Wed, Jul 16, 2008 at 11:03 AM, Abuzar Chaudhary < abuzarchaudhary at yahoo.com> wrote: > --- On Tue, 7/15/08, Richard Dice wrote: > > > Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present > one of his high-end IT showsmanship talks! > > > > *Temporally Quaquaversal Virtual Nanomachine Programming in > > Multiple Topologically Connected Quantum-Relativistic > > Parallel Timespaces... Made Easy* > > > > Ok, so I'm trying to imagine what this talk could be about, ... snip ... When the title was announced I tried looking up the non-obvious words, like quaquaversal which was defined as 'turned in whatever way'. So putting all those re-definitions together... my interpretation would be: Temporarlly In the context of 'flowing time'... Quaquaversal with observations from many viewpoints... how to... Virtual simulate (because they don't exist yet)... Nanomachine programming programming nano-machines... in that (could) exist in multiple ... topologically connected parallel universes (simultaneously working)... Quantum-Relatavistic that can inter-communicate (in zero time)... Parallel Timespaces in a time-asynchronous manner... Made Easy* for mortals (ie. anyone other than Damian) Personally, _I_ think this is the 2nd volume of his quantum superposition talk. (was that the 'Mars bar' talk?). Especially when I consider what Richard was talking about regarding addressing/working-with Intel and Perl based software support of the next generations of CPUs that require 'simple' parallel programming techniques to make effective use of them. Remember the motivation behind the 'quantum superposition' library was to make Perl programing easy on quantum computers... well these next gen chips with 10,000+ CPUs on them will effectively look like a quantum computer, so we need to be able to deal with it. And this is how! Perl really is still on the fore-front. We just have to figure out how to convince the rest of the world... that Perl is there first... best... easiest... and 'where its at' ! ... Or I'm wrong and the talk is really about aardvarks? ;-) Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: From abuzarchaudhary at yahoo.com Wed Jul 16 10:54:11 2008 From: abuzarchaudhary at yahoo.com (Abuzar Chaudhary) Date: Wed, 16 Jul 2008 10:54:11 -0700 (PDT) Subject: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! In-Reply-To: <8204a4fe0807160847w2e2f7e37m86f38c9086cbf9ba@mail.gmail.com> Message-ID: <628070.22741.qm@web52905.mail.re2.yahoo.com> Thank you Fulko. I had imagined something similar. Should really look into this quantum stuff one of these days. :) --- On Wed, 7/16/08, Fulko Hew wrote: > From: Fulko Hew > Subject: Re: [tpm] Damian Conway in Toronto tomorrow (Wednesday) to present one of his high-end IT showsmanship talks! > To: abuzar at abuzar.com, "TPM" > Cc: damian at conway.org > Date: Wednesday, July 16, 2008, 11:47 AM > On Wed, Jul 16, 2008 at 11:03 AM, Abuzar Chaudhary < > abuzarchaudhary at yahoo.com> wrote: > > > --- On Tue, 7/15/08, Richard Dice > wrote: > > > > > Subject: [tpm] Damian Conway in Toronto tomorrow > (Wednesday) to present > > one of his high-end IT showsmanship talks! > > > > > > *Temporally Quaquaversal Virtual Nanomachine > Programming in > > > Multiple Topologically Connected > Quantum-Relativistic > > > Parallel Timespaces... Made Easy* > > > > > > > Ok, so I'm trying to imagine what this talk could > be about, > > > ... snip ... > > When the title was announced I tried looking up the > non-obvious words, > like quaquaversal which was defined as 'turned in > whatever way'. > > So putting all those re-definitions together... > my interpretation would be: > > Temporarlly In the context of 'flowing > time'... > Quaquaversal with observations from many > viewpoints... > how to... > Virtual simulate (because they > don't exist yet)... > Nanomachine programming programming nano-machines... > in that (could) exist in multiple > ... > topologically connected parallel universes > (simultaneously working)... > Quantum-Relatavistic that can inter-communicate (in > zero time)... > Parallel Timespaces in a time-asynchronous > manner... > Made Easy* for mortals (ie. anyone other > than Damian) > > Personally, _I_ think this is the 2nd volume of his > quantum superposition talk. (was that the 'Mars > bar' talk?). > > Especially when I consider what Richard was talking about > regarding > addressing/working-with Intel and Perl based software > support of the > next generations of CPUs that require 'simple' > parallel programming > techniques to make effective use of them. > > Remember the motivation behind the 'quantum > superposition' library > was to make Perl programing easy on quantum computers... > well these next gen chips with 10,000+ CPUs on them will > effectively > look like a quantum computer, so we need to be able to deal > with it. > > And this is how! > > Perl really is still on the fore-front. > We just have to figure out how to convince the rest of the > world... > that Perl is there first... best... easiest... > and 'where its at' ! > > ... Or I'm wrong and the talk is really about > aardvarks? ;-) > > Fulko From linux at alteeve.com Fri Jul 18 09:15:51 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 18 Jul 2008 12:15:51 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> Message-ID: <4880C1B7.6060805@alteeve.com> "I have recently come across this user group during my search" So you did, I apologize then. Please be aware though, many of us are systems administrators as well as perl programmers. Dealing with spam is something of a "big deal", so sending an email to a large number of specific users on the mailing list gets people's radar going. What you should have done, for future reference, is to find out who the owner/moderator of the mailing list is and contacted them directly. Ask that person what the ML's policy is on job advertisements and how you could proceed. It shows that you respect our group. I still stand by the statement that you should really take the time to see what projects each of us has done and sent content-specific emails to each of us. It would certainly take more of your time, but I suspect you would have gotten a *much* more positive response. For the record, I am CC'ing this reply to the mailing list; partly to make my appology public and to continue this thread, which started publicly, in a public manner. Madi PS - Spell checking your subject line is a good idea, too. ;) Jack Ponte wrote: > Wow...didn't expect that sort of feedback. I'm sorry for disturbing your > day. I have no idea how that e-mail was deceptive in any way I CLEARLY > stated that I came across the user group (obviously online) and gave you the > opportunity to find out more about the opportunity I have on hand by > contacting me directly. How is that deceptive? It's obviously a PERL > opportunity...... > What does "I would skirt this guy, personally" mean???? > Please understand that I like you, am just trying to do my job and earn a > living. I meant no harm and I do apologise again for disturbing your busy > day. > > Keep well! > > Jack Ponte, ACIR, CIR > Recruitment / Executive search > BullsEye! Human Capital Solutions Inc. > 416.575.4434 > jponte at bullseyehc.com > > > -----Original Message----- > From: Madison Kelly [mailto:linux at alteeve.com] > Sent: July-18-08 11:49 AM > To: Jack Ponte > Cc: uri at stemsystems.com; indy at indigostar.com; 'Tom Legrady'; 'Adam Prime'; > 'Michael Graham'; 'Alex Beamish'; 'Dave Rolsky'; 'Richard Dice'; 'Jim > Graham'; 'James.Q.L'; 'Herman Anker'; 'Fulko Hew'; 'Lev Piaseckyj'; 'Mark > Fowle'; 'Emil Janev'; 'Omid Gulban'; 'Olaf Alders'; 'jason richmond' > Subject: Re: Careeer Opportunity > > Jack Ponte wrote: >> Hello, >> My name is Jack Ponte and I am a recruitment/HR consultant with >> Bullseye! Human Capital Solutions Inc. I have recently come across this >> user group during my search for a Perl developer. >> >> Maybe some of you might be a suitable candidate for a position that I am >> currently trying to fill. > > This guy sent me a very similar message back in February. When I asked > him *where* he came across my name, he had no answer. > > I'm fine with head hunters. I am *NOT* fine with deceptive head hunters. > I would skirt this guy, personally. > > To Jack: > > Please give us some credit. If you really want to fill positions, be > straight up and either spend some time looking at what each of us has > done and reference that in individual emails *OR*, at the very least, > say that you came across our group and are looking in general for people > who want work in Perl. > > A jaded Madi > > PS - Message he sent me in Feb., for reference: > > Hello, > > My name is Jack Ponte and I am a recruitment consultant with IQ Partners > Inc. I have recently come across your contact information online and I > feel that you might be a suitable candidate for a Perl Developer > position that I am currently trying to fill. > > If you are interested in discussing this matter in further detail, > please send me an updated copy of your resume and an appropriate time to > contact you. If you are not able to entertain this opportunity for what > ever reason, I would appreciate your referring me to any other > candidates that you may know with your similar background. > > I look forward to hearing from you. > > From dave.s.doyle at gmail.com Fri Jul 18 09:33:05 2008 From: dave.s.doyle at gmail.com (Dave Doyle) Date: Fri, 18 Jul 2008 12:33:05 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: <4880C1B7.6060805@alteeve.com> References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> <4880C1B7.6060805@alteeve.com> Message-ID: Why is it I've never received anything from a recruiter that spells Perl correctly? Shouldn't a recruiter who specializes in techy stuff be aware of this kinda thing? If I saw a job ad asking for a PERL programmer I wouldn't even look twice at it. And I think I disagree with Jack's assessment that he's "just trying to do his job". He's trying to get others to do his job by getting them to suss out candidates for him instead of doing any legwork himself. D On Fri, Jul 18, 2008 at 12:15 PM, Madison Kelly wrote: > "I have recently come across this user group during my search" > > So you did, I apologize then. > > Please be aware though, many of us are systems administrators as well as > perl programmers. Dealing with spam is something of a "big deal", so sending > an email to a large number of specific users on the mailing list gets > people's radar going. > > What you should have done, for future reference, is to find out who the > owner/moderator of the mailing list is and contacted them directly. Ask that > person what the ML's policy is on job advertisements and how you could > proceed. It shows that you respect our group. > > I still stand by the statement that you should really take the time to see > what projects each of us has done and sent content-specific emails to each > of us. It would certainly take more of your time, but I suspect you would > have gotten a *much* more positive response. > > For the record, I am CC'ing this reply to the mailing list; partly to make > my appology public and to continue this thread, which started publicly, in a > public manner. > > Madi > > PS - Spell checking your subject line is a good idea, too. ;) > > Jack Ponte wrote: > >> Wow...didn't expect that sort of feedback. I'm sorry for disturbing your >> day. I have no idea how that e-mail was deceptive in any way I CLEARLY >> stated that I came across the user group (obviously online) and gave you >> the >> opportunity to find out more about the opportunity I have on hand by >> contacting me directly. How is that deceptive? It's obviously a PERL >> opportunity...... >> What does "I would skirt this guy, personally" mean???? Please understand >> that I like you, am just trying to do my job and earn a >> living. I meant no harm and I do apologise again for disturbing your busy >> day. >> >> Keep well! >> >> Jack Ponte, ACIR, CIR >> Recruitment / Executive search >> BullsEye! Human Capital Solutions Inc. >> 416.575.4434 >> jponte at bullseyehc.com >> -----Original Message----- >> From: Madison Kelly [mailto:linux at alteeve.com] Sent: July-18-08 11:49 AM >> To: Jack Ponte >> Cc: uri at stemsystems.com; indy at indigostar.com; 'Tom Legrady'; 'Adam >> Prime'; >> 'Michael Graham'; 'Alex Beamish'; 'Dave Rolsky'; 'Richard Dice'; 'Jim >> Graham'; 'James.Q.L'; 'Herman Anker'; 'Fulko Hew'; 'Lev Piaseckyj'; 'Mark >> Fowle'; 'Emil Janev'; 'Omid Gulban'; 'Olaf Alders'; 'jason richmond' >> Subject: Re: Careeer Opportunity >> >> Jack Ponte wrote: >> >>> Hello, >>> My name is Jack Ponte and I am a recruitment/HR consultant with Bullseye! >>> Human Capital Solutions Inc. I have recently come across this user group >>> during my search for a Perl developer. >>> >>> Maybe some of you might be a suitable candidate for a position that I am >>> currently trying to fill. >>> >> >> This guy sent me a very similar message back in February. When I asked him >> *where* he came across my name, he had no answer. >> >> I'm fine with head hunters. I am *NOT* fine with deceptive head hunters. I >> would skirt this guy, personally. >> >> To Jack: >> >> Please give us some credit. If you really want to fill positions, be >> straight up and either spend some time looking at what each of us has done >> and reference that in individual emails *OR*, at the very least, say that >> you came across our group and are looking in general for people who want >> work in Perl. >> >> A jaded Madi >> >> PS - Message he sent me in Feb., for reference: >> >> Hello, >> >> My name is Jack Ponte and I am a recruitment consultant with IQ Partners >> Inc. I have recently come across your contact information online and I feel >> that you might be a suitable candidate for a Perl Developer position that I >> am currently trying to fill. >> >> If you are interested in discussing this matter in further detail, please >> send me an updated copy of your resume and an appropriate time to contact >> you. If you are not able to entertain this opportunity for what ever reason, >> I would appreciate your referring me to any other candidates that you may >> know with your similar background. >> >> I look forward to hearing from you. >> >> >> > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- dave.s.doyle at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.s.doyle at gmail.com Fri Jul 18 09:35:01 2008 From: dave.s.doyle at gmail.com (Dave Doyle) Date: Fri, 18 Jul 2008 12:35:01 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> <4880C1B7.6060805@alteeve.com> Message-ID: I'm also kinda hurt that I didn't get MY email screen scraped. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux at alteeve.com Fri Jul 18 10:11:23 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 18 Jul 2008 13:11:23 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: <65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> <4880C1B7.6060805@alteeve.com> <65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> Message-ID: <4880CEBB.70904@alteeve.com> Jack Ponte wrote: > Ok thx Madison. I appreciate the suggestion and will do so next > time.....(might have to take a break from the Perl group though, it seems > that I may have irritated a few of you with my ignorance.) > > Have a nice weekend....keep well! Jack, you seemed to have missed a point. If you really want to fill positions, there is no need to wait. Unless of course you have no positions to fill at this time... Assuming you really do; look for the projects the people on the list have worked on. Find their CVs and then email them, making a connection between their CV's/projects and the skill set required for the job(s) you are currently trying to fill. I am certain that, if you did that this very day, you would find more generous responses. We are all hard workers on this mailing list and we're not the dullest bunch. Give us some credit for being able to tell a real job pitch from a general attempt to harvest contacts and show that *you* also are willing to do some hard work by looking up our backgrounds and talents. Out of all the people you emailed today directly, how many can you connect to a specific project or online CV? Madi From indy at indigostar.com Fri Jul 18 10:42:35 2008 From: indy at indigostar.com (Indy Singh) Date: Fri, 18 Jul 2008 13:42:35 -0400 Subject: [tpm] Careeer Opportunity References: <4300590D902E4397A86705A518916719@JackPontePC><4880BB78.8000005@alteeve.com><4880C1B7.6060805@alteeve.com><65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> <4880CEBB.70904@alteeve.com> Message-ID: <059e01c8e8fd$aa2db030$6600a8c0@roadhog> Guys, Anything posted to this is permanently recorded. Offering overly critical public advice to a headhunter is not going to help your career in the future, or make you look smart. If you have a beef, keep it off the mailing list. If you have advice to offer in the field of recruiting, consider a career as a head hunter instead of as a Perl developer. Enought with the hostile attitude. Time to let this go before more damage is done to the reputation of this group. Indy Singh IndigoSTAR Software -- www.indigostar.com From magog at the-wire.com Fri Jul 18 10:44:35 2008 From: magog at the-wire.com (Michael Graham) Date: Fri, 18 Jul 2008 13:44:35 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: <4880C1B7.6060805@alteeve.com> References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> <4880C1B7.6060805@alteeve.com> Message-ID: <20080718134435.28558778@caliope> For the record, if you're a recruiter and want to send a Perl related job posting to the list, just send it to the list! If you're not subscribed to the list, the message will be temporarily delayed until the list moderator (which is currently me) can read it and approve it. But if it's actually Perl-related it will go through in a day or two. Michael On Fri, 18 Jul 2008 12:15:51 -0400 Madison Kelly wrote: > "I have recently come across this user group during my search" > > So you did, I apologize then. > > Please be aware though, many of us are systems administrators as well > as perl programmers. Dealing with spam is something of a "big deal", > so sending an email to a large number of specific users on the > mailing list gets people's radar going. > > What you should have done, for future reference, is to find out who > the owner/moderator of the mailing list is and contacted them > directly. Ask that person what the ML's policy is on job > advertisements and how you could proceed. It shows that you respect > our group. > > I still stand by the statement that you should really take the time > to see what projects each of us has done and sent content-specific > emails to each of us. It would certainly take more of your time, but > I suspect you would have gotten a *much* more positive response. > > For the record, I am CC'ing this reply to the mailing list; partly to > make my appology public and to continue this thread, which started > publicly, in a public manner. > > Madi > > PS - Spell checking your subject line is a good idea, too. ;) > > Jack Ponte wrote: > > Wow...didn't expect that sort of feedback. I'm sorry for disturbing > > your day. I have no idea how that e-mail was deceptive in any way > > I CLEARLY stated that I came across the user group (obviously > > online) and gave you the opportunity to find out more about the > > opportunity I have on hand by contacting me directly. How is that > > deceptive? It's obviously a PERL opportunity...... > > What does "I would skirt this guy, personally" mean???? > > Please understand that I like you, am just trying to do my job and > > earn a living. I meant no harm and I do apologise again for > > disturbing your busy day. > > > > Keep well! > > > > Jack Ponte, ACIR, CIR > > Recruitment / Executive search > > BullsEye! Human Capital Solutions Inc. > > 416.575.4434 > > jponte at bullseyehc.com > > > > > > -----Original Message----- > > From: Madison Kelly [mailto:linux at alteeve.com] > > Sent: July-18-08 11:49 AM > > To: Jack Ponte > > Cc: uri at stemsystems.com; indy at indigostar.com; 'Tom Legrady'; 'Adam > > Prime'; 'Michael Graham'; 'Alex Beamish'; 'Dave Rolsky'; 'Richard > > Dice'; 'Jim Graham'; 'James.Q.L'; 'Herman Anker'; 'Fulko Hew'; 'Lev > > Piaseckyj'; 'Mark Fowle'; 'Emil Janev'; 'Omid Gulban'; 'Olaf > > Alders'; 'jason richmond' Subject: Re: Careeer Opportunity > > > > Jack Ponte wrote: > >> Hello, > >> My name is Jack Ponte and I am a recruitment/HR consultant with > >> Bullseye! Human Capital Solutions Inc. I have recently come across > >> this user group during my search for a Perl developer. > >> > >> Maybe some of you might be a suitable candidate for a position > >> that I am currently trying to fill. > > > > This guy sent me a very similar message back in February. When I > > asked him *where* he came across my name, he had no answer. > > > > I'm fine with head hunters. I am *NOT* fine with deceptive head > > hunters. I would skirt this guy, personally. > > > > To Jack: > > > > Please give us some credit. If you really want to fill > > positions, be straight up and either spend some time looking at > > what each of us has done and reference that in individual emails > > *OR*, at the very least, say that you came across our group and are > > looking in general for people who want work in Perl. > > > > A jaded Madi > > > > PS - Message he sent me in Feb., for reference: > > > > Hello, > > > > My name is Jack Ponte and I am a recruitment consultant with IQ > > Partners Inc. I have recently come across your contact information > > online and I feel that you might be a suitable candidate for a Perl > > Developer position that I am currently trying to fill. > > > > If you are interested in discussing this matter in further detail, > > please send me an updated copy of your resume and an appropriate > > time to contact you. If you are not able to entertain this > > opportunity for what ever reason, I would appreciate your referring > > me to any other candidates that you may know with your similar > > background. > > > > I look forward to hearing from you. > > > > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -- Michael Graham From janes.rob at gmail.com Fri Jul 18 10:47:20 2008 From: janes.rob at gmail.com (Rob Janes) Date: Fri, 18 Jul 2008 13:47:20 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: <4880CEBB.70904@alteeve.com> References: <4300590D902E4397A86705A518916719@JackPontePC> <4880BB78.8000005@alteeve.com> <4880C1B7.6060805@alteeve.com> <65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> <4880CEBB.70904@alteeve.com> Message-ID: <83eac04d0807181047gbd066d3yd67451bfe388add@mail.gmail.com> I know Jack, and I'm pretty sure he's not trolling. I'm sure he has a position or two he's looking for. He's been aware of this list at least since December last year, and possibly a lurker since then too. My sense of this issue is that job related stuff is ok from members, but not from outsiders. If you're an outsider and you have something to say, say it to the entire group, don't cherry pick by downloading the list or capturing addresses. I have seen job notices posted to this list on occasion, without flames. There has to be more info than a note to call somebody. Sure, it's a perl job, but what kind of perl job? sysadmin? web cgi? data processing? -rob On Fri, Jul 18, 2008 at 1:11 PM, Madison Kelly wrote: > Jack Ponte wrote: > >> Ok thx Madison. I appreciate the suggestion and will do so next >> time.....(might have to take a break from the Perl group though, it seems >> that I may have irritated a few of you with my ignorance.) >> >> Have a nice weekend....keep well! >> > > Jack, you seemed to have missed a point. > > If you really want to fill positions, there is no need to wait. Unless of > course you have no positions to fill at this time... > > Assuming you really do; look for the projects the people on the list have > worked on. Find their CVs and then email them, making a connection between > their CV's/projects and the skill set required for the job(s) you are > currently trying to fill. > > I am certain that, if you did that this very day, you would find more > generous responses. > > We are all hard workers on this mailing list and we're not the dullest > bunch. Give us some credit for being able to tell a real job pitch from a > general attempt to harvest contacts and show that *you* also are willing to > do some hard work by looking up our backgrounds and talents. > > Out of all the people you emailed today directly, how many can you connect > to a specific project or online CV? > > Madi > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux at alteeve.com Fri Jul 18 10:56:44 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 18 Jul 2008 13:56:44 -0400 Subject: [tpm] Careeer Opportunity In-Reply-To: <059e01c8e8fd$aa2db030$6600a8c0@roadhog> References: <4300590D902E4397A86705A518916719@JackPontePC><4880BB78.8000005@alteeve.com><4880C1B7.6060805@alteeve.com><65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> <4880CEBB.70904@alteeve.com> <059e01c8e8fd$aa2db030$6600a8c0@roadhog> Message-ID: <4880D95C.3030202@alteeve.com> Indy Singh wrote: > Guys, > > Anything posted to this is permanently recorded. Offering overly > critical public advice to a headhunter is not going to help your career > in the future, or make you look smart. If you have a beef, keep it off > the mailing list. If you have advice to offer in the field of > recruiting, consider a career as a head hunter instead of as a Perl > developer. > > Enought with the hostile attitude. Time to let this go before more > damage is done to the reputation of this group. > > Indy Singh You are right Indy, and to the list I apologize. Given that a couple people here have vouched for Jack, I will publicly apologize to him here, as well. I'm continuing to talk to him off list and am answering some questions he has about getting in touch with people. Madison, whose snarkiness is not excusable. From alexmac131 at hotmail.com Fri Jul 18 13:53:17 2008 From: alexmac131 at hotmail.com (Alex Mackinnon) Date: Fri, 18 Jul 2008 20:53:17 +0000 Subject: [tpm] Careeer Opportunity In-Reply-To: <4880D95C.3030202@alteeve.com> References: <4300590D902E4397A86705A518916719@JackPontePC><4880BB78.8000005@alteeve.com><4880C1B7.6060805@alteeve.com><65E8C22BC05D4FECA8FB6B34A16AADA4@JackPontePC> <4880CEBB.70904@alteeve.com> <059e01c8e8fd$aa2db030$6600a8c0@roadhog> <4880D95C.3030202@alteeve.com> Message-ID: Funny how things work; however that said, Jack is not a first timer to the Perl list or the community in general. So I have to say Madison high five. Enough said. Alex (mellow mood)> Date: Fri, 18 Jul 2008 13:56:44 -0400> From: linux at alteeve.com> To: indy at indigostar.com> CC: tpm at to.pm.org> Subject: Re: [tpm] Careeer Opportunity> > Indy Singh wrote:> > Guys,> > > > Anything posted to this is permanently recorded. Offering overly > > critical public advice to a headhunter is not going to help your career > > in the future, or make you look smart. If you have a beef, keep it off > > the mailing list. If you have advice to offer in the field of > > recruiting, consider a career as a head hunter instead of as a Perl > > developer.> > > > Enought with the hostile attitude. Time to let this go before more > > damage is done to the reputation of this group.> > > > Indy Singh> > You are right Indy, and to the list I apologize. Given that a couple > people here have vouched for Jack, I will publicly apologize to him > here, as well.> > I'm continuing to talk to him off list and am answering some questions > he has about getting in touch with people.> > Madison, whose snarkiness is not excusable.> _______________________________________________> toronto-pm mailing list> toronto-pm at pm.org> http://mail.pm.org/mailman/listinfo/toronto-pm _________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From talexb at gmail.com Mon Jul 21 06:56:43 2008 From: talexb at gmail.com (Alex Beamish) Date: Mon, 21 Jul 2008 09:56:43 -0400 Subject: [tpm] Recommended DB2 book? Message-ID: Hi folks, I'm looking for a really good DB2 technical book, ideally from O'Reilly, but welcome to any suggestions. Thanks all! -- Alex Beamish Toronto, Ontario aka talexb From liam at holoweb.net Mon Jul 21 16:45:03 2008 From: liam at holoweb.net (Liam R E Quin) Date: Mon, 21 Jul 2008 19:45:03 -0400 Subject: [tpm] Recommended DB2 book? In-Reply-To: References: Message-ID: <1216683903.6258.4.camel@dell.barefootcomputing.com> On Mon, 2008-07-21 at 09:56 -0400, Alex Beamish wrote: > Hi folks, > > I'm looking for a really good DB2 technical book, ideally from > O'Reilly, but welcome to any suggestions. Thanks all! The IBM "red books" are free downloads (or you can order them at Amazon I think) - the one I have is for using XML and XQuery with db2. I didn't actually like it, because it tends to say, enter the following command, without telling you _where_ to enter it. But with a little determination and some Google, it's probably useful, and I expect the others are too. Liam > -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org From larisa.schirba at blackshire.com Wed Jul 23 17:22:08 2008 From: larisa.schirba at blackshire.com (Larisa Schirba - BlackShire) Date: Wed, 23 Jul 2008 17:22:08 -0700 Subject: [tpm] Software Engineer - Perl, Internet Security for those who plan to move to Vancouver Message-ID: <32A01D41795C344A8FBAE09BCBDE87FC058CB9D3@blackshire.blackshirenet.blackshire.com> Hello, If anyone is interested in this career opportunity, please feel free to contact me at the info below. Software Engineer - Perl, Internet Security LOCATION: Vancouver, BC This is a full-time permanent position HIRING COMPANY: Software development company with long history of success RESPONSIBILITIES: Design, develop and implement a scalable distributed system Design and develop code for complex and critical applications with high degree of reliability Work as part of an agile development team, building mission-critical systems Monitor and report progress to the team and management Write code to deliver according to specified project timelines, quality and functionality requirements Test product quality Participate in the debugging process Make recommendations for product requirements and software design Review and make suggestions for code and design quality improvement Recommend solutions to the development team's development issues REQUIREMENTS: 3+ years of software development experience Programming in Perl and C Expert knowledge of SQL databases Linux/UNIX OS administration Experience with scalable, mission-critical, database driven systems is a strong asset Experience building web-based applications is an asset Experience with Internet security is a very strong asset COMPENSATION: 70-85K, with flexibility depending on the skills of the successful candidate, plus benefits and an opportunity to advance technical skills within a very talented team RELOCATION ASSISTANCE is available for a successful candidate BM__MailAutoSigBest Regards, Larisa Schirba Recruiting Director BlackShire Recruiting Services Inc. www.blackshire.com Direct 604-517-3552 larisa.schirba at blackshire.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoffix at zoffix.com Sun Jul 27 11:06:29 2008 From: zoffix at zoffix.com (Zoffix Znet) Date: Sun, 27 Jul 2008 14:06:29 -0400 Subject: [tpm] Hello Message-ID: <1217181989.19626.19.camel@zoflap> Hey, I subscribed to this list about a week ago.. haven't received anything yet. Is it always this quiet or am I not getting the mail? Cheers :) From linux at alteeve.com Sun Jul 27 12:09:59 2008 From: linux at alteeve.com (Madison Kelly) Date: Sun, 27 Jul 2008 15:09:59 -0400 Subject: [tpm] Hello In-Reply-To: <1217181989.19626.19.camel@zoflap> References: <1217181989.19626.19.camel@zoflap> Message-ID: <488CC807.30402@alteeve.com> Zoffix Znet wrote: > Hey, I subscribed to this list about a week ago.. haven't received > anything yet. Is it always this quiet or am I not getting the mail? > > Cheers :) Welcome to TPM, Zoffix! It can be quiet, until someone asks a question. Then there is generally a flurry of activity, then all quiet again until the next question comes along. It's about ideal for a tech mailing list. :) Feel free to ask anything Perl related when you wish. Madi From vrakitine at gmail.com Sun Jul 27 16:33:53 2008 From: vrakitine at gmail.com (Valeri Rakitine) Date: Sun, 27 Jul 2008 19:33:53 -0400 Subject: [tpm] We are still alive :) Message-ID: We are still alive :) ~val On Sun, Jul 27, 2008 at 3:01 PM, wrote: > Send toronto-pm mailing list submissions to > toronto-pm at pm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.pm.org/mailman/listinfo/toronto-pm > or, via email, send a message with subject or body 'help' to > toronto-pm-request at pm.org > > You can reach the person managing the list at > toronto-pm-owner at pm.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of toronto-pm digest..." > > > Today's Topics: > > 1. Hello (Zoffix Znet) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 27 Jul 2008 14:06:29 -0400 > From: Zoffix Znet > Subject: [tpm] Hello > To: tpm at to.pm.org > Message-ID: <1217181989.19626.19.camel at zoflap> > Content-Type: text/plain > > Hey, I subscribed to this list about a week ago.. haven't received > anything yet. Is it always this quiet or am I not getting the mail? > > Cheers :) > > > > ------------------------------ > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > > > End of toronto-pm Digest, Vol 16, Issue 20 > ****************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoffix at zoffix.com Sun Jul 27 17:46:04 2008 From: zoffix at zoffix.com (Zoffix Znet) Date: Sun, 27 Jul 2008 20:46:04 -0400 Subject: [tpm] Hello In-Reply-To: <488CC807.30402@alteeve.com> References: <1217181989.19626.19.camel@zoflap> <488CC807.30402@alteeve.com> Message-ID: <1217205968.19626.25.camel@zoflap> I see :) Well, I don't really have any Perl related questions at the moment, just writing plugins for App::ZofCMS and those are nothing too hi-tech :) Was thinking about attending one of those Perl meetings, never met another human who knew Perl IRL, thus I subscribed to this list :) On Sun, 2008-07-27 at 15:09 -0400, Madison Kelly wrote: > Zoffix Znet wrote: > > Hey, I subscribed to this list about a week ago.. haven't received > > anything yet. Is it always this quiet or am I not getting the mail? > > > > Cheers :) > > Welcome to TPM, Zoffix! > > It can be quiet, until someone asks a question. Then there is > generally a flurry of activity, then all quiet again until the next > question comes along. It's about ideal for a tech mailing list. :) > > Feel free to ask anything Perl related when you wish. > > Madi From linux at alteeve.com Sun Jul 27 20:31:09 2008 From: linux at alteeve.com (Madison Kelly) Date: Sun, 27 Jul 2008 23:31:09 -0400 Subject: [tpm] Hello In-Reply-To: <1217205968.19626.25.camel@zoflap> References: <1217181989.19626.19.camel@zoflap> <488CC807.30402@alteeve.com> <1217205968.19626.25.camel@zoflap> Message-ID: <488D3D7D.80906@alteeve.com> Zoffix Znet wrote: > I see :) > > Well, I don't really have any Perl related questions at the moment, just > writing plugins for App::ZofCMS and those are nothing too hi-tech :) > > Was thinking about attending one of those Perl meetings, never met > another human who knew Perl IRL, thus I subscribed to this list :) Well, the next one on August 28th will be my talk on D-Bus and Perl's Net::DBus binding. :) Madi From matt at sergeant.org Mon Jul 28 10:24:09 2008 From: matt at sergeant.org (Matt Sergeant) Date: Mon, 28 Jul 2008 13:24:09 -0400 Subject: [tpm] Just saying Hi. Message-ID: <20080728132409289705.bc44cfd5@sergeant.org> Hello everyone, I've recently moved to Toronto. Some of you may know me from a few years ago when I was a bit, err, prolific in publishing modules to CPAN. Way less so these days. Anyway, I hope to attend a meeting in the future. I'll keep an eye out for when they are. Matt. From talexb at gmail.com Mon Jul 28 10:47:29 2008 From: talexb at gmail.com (Alex Beamish) Date: Mon, 28 Jul 2008 13:47:29 -0400 Subject: [tpm] Just saying Hi. In-Reply-To: <20080728132409289705.bc44cfd5@sergeant.org> References: <20080728132409289705.bc44cfd5@sergeant.org> Message-ID: On Mon, Jul 28, 2008 at 1:24 PM, Matt Sergeant wrote: > Hello everyone, > > I've recently moved to Toronto. Some of you may know me from a few > years ago when I was a bit, err, prolific in publishing modules to > CPAN. Way less so these days. > > Anyway, I hope to attend a meeting in the future. I'll keep an eye out > for when they are. Hi Matt! Good to hear you're in town. Welcome! Except for Damian Conway's visit ten days ago, I haven't come out to a TPM meeting in a while, but I'm looking forward to Madison's talk in August -- see you then, I hope. -- Alex Beamish Toronto, Ontario aka talexb From adam.prime at utoronto.ca Mon Jul 28 10:58:37 2008 From: adam.prime at utoronto.ca (adam.prime at utoronto.ca) Date: Mon, 28 Jul 2008 13:58:37 -0400 Subject: [tpm] Just saying Hi. In-Reply-To: <20080728132409289705.bc44cfd5@sergeant.org> References: <20080728132409289705.bc44cfd5@sergeant.org> Message-ID: <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> Welcome, and please give us a talk about qpsmtpd. Adam Quoting Matt Sergeant : > Hello everyone, > > I've recently moved to Toronto. Some of you may know me from a few > years ago when I was a bit, err, prolific in publishing modules to > CPAN. Way less so these days. > > Anyway, I hope to attend a meeting in the future. I'll keep an eye out > for when they are. > > Matt. > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From olaf at vilerichard.com Mon Jul 28 11:04:01 2008 From: olaf at vilerichard.com (Olaf Alders) Date: Mon, 28 Jul 2008 14:04:01 -0400 Subject: [tpm] Just saying Hi. In-Reply-To: <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> References: <20080728132409289705.bc44cfd5@sergeant.org> <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> Message-ID: Actually, I'd find that really helpful as well. Olaf On 28-Jul-08, at 1:58 PM, adam.prime at utoronto.ca wrote: > Welcome, and please give us a talk about qpsmtpd. > > Adam > -- Olaf Alders olaf at vilerichard.com http://www.vilerichard.com -- folk rock http://cdbaby.com/cd/vilerichard From psema4 at gmail.com Mon Jul 28 11:25:43 2008 From: psema4 at gmail.com (Scott Elcomb) Date: Mon, 28 Jul 2008 14:25:43 -0400 Subject: [tpm] Just saying Hi. In-Reply-To: References: <20080728132409289705.bc44cfd5@sergeant.org> <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> Message-ID: <99a6c38f0807281125s2ea0290g38f07fe117b9bfa5@mail.gmail.com> On Mon, Jul 28, 2008 at 2:04 PM, Olaf Alders wrote: > Actually, I'd find that really helpful as well. > Olaf > > On 28-Jul-08, at 1:58 PM, adam.prime at utoronto.ca wrote: >> Welcome, and please give us a talk about qpsmtpd. >> Adam I'm with O and A* ;-) Welcome to TPM and many (many!) thanks for your modules. I've used several of them really heavily with the DBD::SQLite 's being foremost among them. I didn't realize there was anything like qpsmtpd out there until this thread; looking forward to trying it out. * The pun + metaphore might be a bit obscure but... http://en.wikipedia.org/wiki/Service-oriented_architecture -- Scott Elcomb http://www.psema4.com/ http://www.google.com/reader/shared/14892828400785741937 From matt at sergeant.org Mon Jul 28 12:51:04 2008 From: matt at sergeant.org (Matt Sergeant) Date: Mon, 28 Jul 2008 19:51:04 +0000 (UTC) Subject: [tpm] Just saying Hi. In-Reply-To: <99a6c38f0807281125s2ea0290g38f07fe117b9bfa5@mail.gmail.com> References: <20080728132409289705.bc44cfd5@sergeant.org> <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> <99a6c38f0807281125s2ea0290g38f07fe117b9bfa5@mail.gmail.com> Message-ID: On Mon, 28 Jul 2008, Scott Elcomb wrote: > On Mon, Jul 28, 2008 at 2:04 PM, Olaf Alders wrote: >> Actually, I'd find that really helpful as well. >> Olaf >> >> On 28-Jul-08, at 1:58 PM, adam.prime at utoronto.ca wrote: >>> Welcome, and please give us a talk about qpsmtpd. >>> Adam > > I'm with O and A* ;-) > > Welcome to TPM and many (many!) thanks for your modules. I've used > several of them really heavily with the DBD::SQLite 's being foremost > among them. I didn't realize there was anything like qpsmtpd out > there until this thread; looking forward to trying it out. Yikes! In town 5 minutes and I'm already roped into a talk! I'll see what I can do. I have a talk on it stashed around somewhere. Matt. From fulko.hew at gmail.com Mon Jul 28 12:56:59 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Mon, 28 Jul 2008 15:56:59 -0400 Subject: [tpm] Just saying Hi. In-Reply-To: References: <20080728132409289705.bc44cfd5@sergeant.org> <20080728135837.mfa14epg08ow8s08@webmail.utoronto.ca> <99a6c38f0807281125s2ea0290g38f07fe117b9bfa5@mail.gmail.com> Message-ID: <8204a4fe0807281256w1b15370x31b128f764aee76e@mail.gmail.com> On Mon, Jul 28, 2008 at 3:51 PM, Matt Sergeant wrote: > On Mon, 28 Jul 2008, Scott Elcomb wrote: > > On Mon, Jul 28, 2008 at 2:04 PM, Olaf Alders >> wrote: >> >>> Actually, I'd find that really helpful as well. >>> Olaf >>> >>> On 28-Jul-08, at 1:58 PM, adam.prime at utoronto.ca wrote: >>> >>>> Welcome, and please give us a talk about qpsmtpd. >>>> Adam >>>> >>> >> I'm with O and A* ;-) >> >> Welcome to TPM and many (many!) thanks for your modules. I've used >> several of them really heavily with the DBD::SQLite 's being foremost >> among them. I didn't realize there was anything like qpsmtpd out >> there until this thread; looking forward to trying it out. >> > > Yikes! In town 5 minutes and I'm already roped into a talk! > > I'll see what I can do. I have a talk on it stashed around somewhere. Your safe. Or at least you have a reprieve... August seems to be allocated, September is traditionally 'lightning talks' So you can have October! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shane.Boyce at gennum.com Tue Jul 29 06:00:11 2008 From: Shane.Boyce at gennum.com (Shane Boyce) Date: Tue, 29 Jul 2008 09:00:11 -0400 Subject: [tpm] SAP::Rfc -- Solaris? In-Reply-To: References: <20080728132409289705.bc44cfd5@sergeant.org> Message-ID: Hi all, Question about SAP::Rfc remote function calls. The module seems to be designed to work with Linux, and the supporting rfcsdk provided by SAP in the documentation appears to also be for Linux. However, I've seen some talk people are able to use the rfcsdk for SAP R/3 on a Solaris system. Anyone able to shine some light on getting it to work on Solaris? Or am I going to have to re-invent the wheel (read hack) to get a solution? Thank you, Shane K. Boyce Manufacturing Software Engineer PS: (Sorry if this appears twice. Sent with wrong email first, so it "says" it bounced because I wasn't a member...) This communication contains confidential information intended only for the addressee(s). If you have received this communication in error, please notify us immediately and delete this communication from your mail box. From linux at alteeve.com Thu Jul 31 14:19:25 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 31 Jul 2008 17:19:25 -0400 Subject: [tpm] WWW::Mechanize and setting cookies Message-ID: <48922C5D.6050100@alteeve.com> Hi all, I've run into the need to set some cookies for a WWW::Mechanize object I am using. As I understand it, the default 'cookie_jar' is supposed to be an instance of HTTP::Cookies, but I can't see where that is implemented in the module. Despite that, I tried calling the 'set_cookie' method but, as I expected, got an error saying that is not a known method. So dear TPM, can someone clue me in on how to set a bunch of cookies using WWW::Mechanize? Bonus round! If this is an HTTP::Cookies object, what pray tell is '$version' supposed to be when setting the cookie? Beyond setting it, there is no mention of it in the docs and the code merely shows it being set to '0' in undef. Thanks as always! Madi From adam.prime at utoronto.ca Thu Jul 31 16:06:34 2008 From: adam.prime at utoronto.ca (adam.prime at utoronto.ca) Date: Thu, 31 Jul 2008 19:06:34 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <48922C5D.6050100@alteeve.com> References: <48922C5D.6050100@alteeve.com> Message-ID: <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> Quoting Madison Kelly : > Hi all, > > I've run into the need to set some cookies for a WWW::Mechanize > object I am using. As I understand it, the default 'cookie_jar' is > supposed to be an instance of HTTP::Cookies, but I can't see where that > is implemented in the module. Despite that, I tried calling the > 'set_cookie' method but, as I expected, got an error saying that is not > a known method. > > So dear TPM, can someone clue me in on how to set a bunch of cookies > using WWW::Mechanize? Looking at the documentation it looks like Mechanize is designed such that it will keep track of cookies that get set through a series of requests. It looks to me like the only way to set it up to start with cookies in the first place would be to Create an instance of HTTP::Cookies with the stuff you want in it, and use that when you create your initial Mechanize object. > Bonus round! > > If this is an HTTP::Cookies object, what pray tell is '$version' > supposed to be when setting the cookie? Beyond setting it, there is no > mention of it in the docs and the code merely shows it being set to '0' > in undef. > > Thanks as always! Looking at the code it seem to put "\$Version=$version" into your cookie if you set it to a value larger than 0. I have no idea what that's about, but i'd probably be passing in 0's. The interface for HTTP::Cookies looks pretty horrid :x Adam From zoffix at zoffix.com Thu Jul 31 17:56:19 2008 From: zoffix at zoffix.com (Zoffix Znet) Date: Thu, 31 Jul 2008 20:56:19 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <48922C5D.6050100@alteeve.com> References: <48922C5D.6050100@alteeve.com> Message-ID: <1217552179.9161.1.camel@zoflap> WWW::Mechanize uses LWP::UserAgent as base class, thus you'd call $mech->cookie_jar to get the HTTP::Cookies object. Which comes to $mech->cookie_jar->set_cookie( $version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \%rest ); Cheers. On Thu, 2008-07-31 at 17:19 -0400, Madison Kelly wrote: > Hi all, > > I've run into the need to set some cookies for a WWW::Mechanize > object I am using. As I understand it, the default 'cookie_jar' is > supposed to be an instance of HTTP::Cookies, but I can't see where that > is implemented in the module. Despite that, I tried calling the > 'set_cookie' method but, as I expected, got an error saying that is not > a known method. > > So dear TPM, can someone clue me in on how to set a bunch of cookies > using WWW::Mechanize? > > Bonus round! > > If this is an HTTP::Cookies object, what pray tell is '$version' > supposed to be when setting the cookie? Beyond setting it, there is no > mention of it in the docs and the code merely shows it being set to '0' > in undef. > > Thanks as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From zoffix at zoffix.com Thu Jul 31 18:00:29 2008 From: zoffix at zoffix.com (Zoffix Znet) Date: Thu, 31 Jul 2008 21:00:29 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <48922C5D.6050100@alteeve.com> References: <48922C5D.6050100@alteeve.com> Message-ID: <1217552429.9161.4.camel@zoflap> Sorry, missed your "extra credit". The version is the "version" of cookies. From RFC 2965 ( http://www.faqs.org/rfcs/rfc2965.html ) : " Version=value REQUIRED. The value of the Version attribute, a decimal integer, identifies the version of the state management specification to which the cookie conforms. For this specification, Version=1 applies. " On Thu, 2008-07-31 at 17:19 -0400, Madison Kelly wrote: > Hi all, > > I've run into the need to set some cookies for a WWW::Mechanize > object I am using. As I understand it, the default 'cookie_jar' is > supposed to be an instance of HTTP::Cookies, but I can't see where that > is implemented in the module. Despite that, I tried calling the > 'set_cookie' method but, as I expected, got an error saying that is not > a known method. > > So dear TPM, can someone clue me in on how to set a bunch of cookies > using WWW::Mechanize? > > Bonus round! > > If this is an HTTP::Cookies object, what pray tell is '$version' > supposed to be when setting the cookie? Beyond setting it, there is no > mention of it in the docs and the code merely shows it being set to '0' > in undef. > > Thanks as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From linux at alteeve.com Thu Jul 31 18:22:31 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 31 Jul 2008 21:22:31 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> References: <48922C5D.6050100@alteeve.com> <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> Message-ID: <48926557.3000801@alteeve.com> adam.prime at utoronto.ca wrote: > Quoting Madison Kelly : > >> Hi all, >> >> I've run into the need to set some cookies for a WWW::Mechanize >> object I am using. As I understand it, the default 'cookie_jar' is >> supposed to be an instance of HTTP::Cookies, but I can't see where that >> is implemented in the module. Despite that, I tried calling the >> 'set_cookie' method but, as I expected, got an error saying that is not >> a known method. >> >> So dear TPM, can someone clue me in on how to set a bunch of cookies >> using WWW::Mechanize? > > Looking at the documentation it looks like Mechanize is designed such > that it will keep track of cookies that get set through a series of > requests. It looks to me like the only way to set it up to start with > cookies in the first place would be to Create an instance of > HTTP::Cookies with the stuff you want in it, and use that when you > create your initial Mechanize object. I've tried that, see below (to keep the message clean). >> Bonus round! >> >> If this is an HTTP::Cookies object, what pray tell is '$version' >> supposed to be when setting the cookie? Beyond setting it, there is no >> mention of it in the docs and the code merely shows it being set to '0' >> in undef. >> >> Thanks as always! > > Looking at the code it seem to put "\$Version=$version" into your cookie > if you set it to a value larger than 0. I have no idea what that's > about, but i'd probably be passing in 0's. > > The interface for HTTP::Cookies looks pretty horrid :x > > Adam Indeed it is... At any rate, here is what I am doing. I connect to an HTTPS site that is made by a nameless "big company" which means the design is terribly inconsistent. For some reason, after doing a particular search, the site returns a redirect page that sets a pile of cookies using JS 'document.cookie="..."' calls, the a 'document.location' to follow the link, all of which is triggered by an 'onload' call. Now the problem is, all the 'document.cookie' values are needed to get the actual data I need. Seeing as WWW::Mechanize doesn't support JS, I need to find a way to set them manually. So here are the relevant bits: -=] Setting up my WWW::Mechanize object use HTTP::Cookies; my $agent = WWW::Mechanize->new( autocheck => 1, cookie_jar => HTTP::Cookies->new(), ); $agent->agent_alias("Linux Mozilla"); # I do a pile of work, following links, submitting forms and such, until # I get to the JS redirect page I described, where I try to follow the # redirect after setting cookies. **This Fails**. -=] Process the JS redirect bastardization # Process the results. my $processing_page=$agent->content; foreach my $cookie ($processing_page=~/document.cookie="(.*?)"/gs) { my ($variable, $value, $path, $expires)=""; if ( $cookie =~ /expires/ ) { ($variable, $value, $path, $expires)=$cookie=~/(.*?)=(.*?); path=(.*?); expires=(.*?);/; print "Setting Cookie: [$variable]->[$value] \@ [$path] ($expires).\n"; } else { ($variable, $value, $path)=$cookie=~/(.*?)=(.*?); path=(.*?);/; print "Setting Cookie: [$variable]->[$value] \@ [$path].\n"; } $$agent{cookie_jar}->set_cookie(0, $variable, $value, $path); } my ($processing_link)=$processing_page=~/window.location="(.*?)"/; print "Following results link: [$processing_link]\n"; $agent->get($processing_link); -=-=-=-=-=-=-=-=- The closest I could figure to access the HTTP::Cookies methods was by calling it as I did, though I realize this is probably not smart as I am trying to access internal values, but it was as close as I could get. This doesn't error, but it also doesn't seem to work. Any further ideas? Madi From linux at alteeve.com Thu Jul 31 18:23:54 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 31 Jul 2008 21:23:54 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <1217552429.9161.4.camel@zoflap> References: <48922C5D.6050100@alteeve.com> <1217552429.9161.4.camel@zoflap> Message-ID: <489265AA.5070306@alteeve.com> Zoffix Znet wrote: > Sorry, missed your "extra credit". The version is the "version" of > cookies. From RFC 2965 ( http://www.faqs.org/rfcs/rfc2965.html ) : > > " Version=value > REQUIRED. The value of the Version attribute, a decimal integer, > identifies the version of the state management specification to > which the cookie conforms. For this specification, Version=1 > applies. > " Awesome, thanks! I hate not knowing why I am doing something. :) Madi From zoffix at zoffix.com Thu Jul 31 19:11:52 2008 From: zoffix at zoffix.com (Zoffix Znet) Date: Thu, 31 Jul 2008 22:11:52 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <48926557.3000801@alteeve.com> References: <48922C5D.6050100@alteeve.com> <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> <48926557.3000801@alteeve.com> Message-ID: <1217556712.9161.14.camel@zoflap> Yes, that won't work, because WWW::Mechanize doesn't actually set {cookie_jar} element in its blessed hashref. Take a look at Mech's sub new {}.. Now why it doesn't error out, as you've said, with " Can't call method "set_cookie" on an undefined value at LINE" with your code below I don't really understand.. but anyway.. use ->cookie_jar method to obtain the HTTP::Cookies object and always check the "use base" or @ISA assignments when you can't find the documented method in the code ^_^ Cheers. On Thu, 2008-07-31 at 21:22 -0400, Madison Kelly wrote: > adam.prime at utoronto.ca wrote: > > Quoting Madison Kelly : > > > >> Hi all, > >> > >> I've run into the need to set some cookies for a WWW::Mechanize > >> object I am using. As I understand it, the default 'cookie_jar' is > >> supposed to be an instance of HTTP::Cookies, but I can't see where that > >> is implemented in the module. Despite that, I tried calling the > >> 'set_cookie' method but, as I expected, got an error saying that is not > >> a known method. > >> > >> So dear TPM, can someone clue me in on how to set a bunch of cookies > >> using WWW::Mechanize? > > > > Looking at the documentation it looks like Mechanize is designed such > > that it will keep track of cookies that get set through a series of > > requests. It looks to me like the only way to set it up to start with > > cookies in the first place would be to Create an instance of > > HTTP::Cookies with the stuff you want in it, and use that when you > > create your initial Mechanize object. > > I've tried that, see below (to keep the message clean). > > >> Bonus round! > >> > >> If this is an HTTP::Cookies object, what pray tell is '$version' > >> supposed to be when setting the cookie? Beyond setting it, there is no > >> mention of it in the docs and the code merely shows it being set to '0' > >> in undef. > >> > >> Thanks as always! > > > > Looking at the code it seem to put "\$Version=$version" into your cookie > > if you set it to a value larger than 0. I have no idea what that's > > about, but i'd probably be passing in 0's. > > > > The interface for HTTP::Cookies looks pretty horrid :x > > > > Adam > > Indeed it is... > > At any rate, here is what I am doing. I connect to an HTTPS site that is > made by a nameless "big company" which means the design is terribly > inconsistent. For some reason, after doing a particular search, the site > returns a redirect page that sets a pile of cookies using JS > 'document.cookie="..."' calls, the a 'document.location' to follow the > link, all of which is triggered by an 'onload' call. Now the problem is, > all the 'document.cookie' values are needed to get the actual data I > need. Seeing as WWW::Mechanize doesn't support JS, I need to find a way > to set them manually. > > So here are the relevant bits: > > -=] Setting up my WWW::Mechanize object > use HTTP::Cookies; > my $agent = WWW::Mechanize->new( > autocheck => 1, > cookie_jar => HTTP::Cookies->new(), > ); > $agent->agent_alias("Linux Mozilla"); > > # I do a pile of work, following links, submitting forms and such, until > # I get to the JS redirect page I described, where I try to follow the > # redirect after setting cookies. **This Fails**. > > -=] Process the JS redirect bastardization > # Process the results. > my $processing_page=$agent->content; > foreach my $cookie ($processing_page=~/document.cookie="(.*?)"/gs) > { > my ($variable, $value, $path, $expires)=""; > if ( $cookie =~ /expires/ ) > { > ($variable, $value, $path, $expires)=$cookie=~/(.*?)=(.*?); > path=(.*?); expires=(.*?);/; > print "Setting Cookie: [$variable]->[$value] \@ [$path] ($expires).\n"; > } > else > { > ($variable, $value, $path)=$cookie=~/(.*?)=(.*?); path=(.*?);/; > print "Setting Cookie: [$variable]->[$value] \@ [$path].\n"; > } > $$agent{cookie_jar}->set_cookie(0, $variable, $value, $path); > } > my ($processing_link)=$processing_page=~/window.location="(.*?)"/; > print "Following results link: [$processing_link]\n"; > $agent->get($processing_link); > -=-=-=-=-=-=-=-=- > > The closest I could figure to access the HTTP::Cookies methods was by > calling it as I did, though I realize this is probably not smart as I am > trying to access internal values, but it was as close as I could get. > This doesn't error, but it also doesn't seem to work. > > Any further ideas? > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From linux at alteeve.com Thu Jul 31 21:07:39 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 01 Aug 2008 00:07:39 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <1217552179.9161.1.camel@zoflap> References: <48922C5D.6050100@alteeve.com> <1217552179.9161.1.camel@zoflap> Message-ID: <48928C0B.8030600@alteeve.com> Zoffix Znet wrote: > WWW::Mechanize uses LWP::UserAgent as base class, thus you'd call > $mech->cookie_jar to get the HTTP::Cookies object. Which comes to > $mech->cookie_jar->set_cookie( $version, $key, $val, $path, $domain, > $port, $path_spec, $secure, $maxage, $discard, \%rest ); > > Cheers. Hi, Thanks for this! It seems to make more sense but it still doesn't seem to work for me. Here is how I've updated the code I originally quoted in my reply to Adam: # Removed the 'HTTP::Cookies' reference my $agent = WWW::Mechanize->new(autocheck => 1); ... # Changed this to your recommendation. $agent->cookie_jar->set_cookie(0, $variable, $value, $path); *sigh* Madi From linux at alteeve.com Thu Jul 31 21:09:41 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 01 Aug 2008 00:09:41 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <1217556712.9161.14.camel@zoflap> References: <48922C5D.6050100@alteeve.com> <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> <48926557.3000801@alteeve.com> <1217556712.9161.14.camel@zoflap> Message-ID: <48928C85.7050405@alteeve.com> Zoffix Znet wrote: > Yes, that won't work, because WWW::Mechanize doesn't actually set > {cookie_jar} element in its blessed hashref. Take a look at Mech's sub > new {}.. > > Now why it doesn't error out, as you've said, with " Can't call method > "set_cookie" on an undefined value at LINE" with your code below I don't > really understand.. but anyway.. use ->cookie_jar method to obtain the > HTTP::Cookies object and always check the "use base" or @ISA assignments > when you can't find the documented method in the code ^_^ > > Cheers. I think it didn't error out because 'cookie_jar' is a hash key in the blessed 'self', which '$agent' is a reference to. I have to claim ignorance now; how would I use 'use base' or check the @ISA assignments to debug? I understand that these control the order of method lookups... Madi From abez at abez.ca Thu Jul 31 20:50:33 2008 From: abez at abez.ca (Abram Hindle) Date: Thu, 31 Jul 2008 23:50:33 -0400 Subject: [tpm] WWW::Mechanize and setting cookies In-Reply-To: <1217556712.9161.14.camel@zoflap> (sfid-20080731_222106_419807_36480EAE) References: <48922C5D.6050100@alteeve.com> <20080731190634.wpy8j7x9oo4k4kko@webmail.utoronto.ca> <48926557.3000801@alteeve.com> <1217556712.9161.14.camel@zoflap> (sfid-20080731_222106_419807_36480EAE) Message-ID: <48928809.9060802@abez.ca> $ua->cookie_jar({}); or WWW::Mechanize->new(cookie_jar=>{}); Will initialize a cookie jar for you This is helpful: $ua->cookie_jar(new HTTP::Cookies()); $ua->default_headers(getDefaultHeader()); sub getDefaultHeaders { my $header = HTTP::Headers->new( User_Agent => "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7", Accept => "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", Accept_Language => "en-us,en;q=0.5", Accept_Encoding => "gzip,deflate", Accept_Charset => "ISO-8859-1,utf-8;q=0.7,*;q=0.7", Keep_Alive => 300, Connection => "keep-alive", ); #$header->remove_header('TE'); return $header; } Also here are slides with tips at the end for using WWW::Mechanize http://presentation.abez.ca/victoriaPMJan2003Slides.pdf abram Zoffix Znet wrote: > Yes, that won't work, because WWW::Mechanize doesn't actually set > {cookie_jar} element in its blessed hashref. Take a look at Mech's sub > new {}.. > > Now why it doesn't error out, as you've said, with " Can't call method > "set_cookie" on an undefined value at LINE" with your code below I don't > really understand.. but anyway.. use ->cookie_jar method to obtain the > HTTP::Cookies object and always check the "use base" or @ISA assignments > when you can't find the documented method in the code ^_^ > > Cheers. > > > On Thu, 2008-07-31 at 21:22 -0400, Madison Kelly wrote: >> adam.prime at utoronto.ca wrote: >>> Quoting Madison Kelly : >>> >>>> Hi all, >>>> >>>> I've run into the need to set some cookies for a WWW::Mechanize >>>> object I am using. As I understand it, the default 'cookie_jar' is >>>> supposed to be an instance of HTTP::Cookies, but I can't see where that >>>> is implemented in the module. Despite that, I tried calling the >>>> 'set_cookie' method but, as I expected, got an error saying that is not >>>> a known method. >>>> >>>> So dear TPM, can someone clue me in on how to set a bunch of cookies >>>> using WWW::Mechanize? >>> Looking at the documentation it looks like Mechanize is designed such >>> that it will keep track of cookies that get set through a series of >>> requests. It looks to me like the only way to set it up to start with >>> cookies in the first place would be to Create an instance of >>> HTTP::Cookies with the stuff you want in it, and use that when you >>> create your initial Mechanize object. >> I've tried that, see below (to keep the message clean). >> >>>> Bonus round! >>>> >>>> If this is an HTTP::Cookies object, what pray tell is '$version' >>>> supposed to be when setting the cookie? Beyond setting it, there is no >>>> mention of it in the docs and the code merely shows it being set to '0' >>>> in undef. >>>> >>>> Thanks as always! >>> Looking at the code it seem to put "\$Version=$version" into your cookie >>> if you set it to a value larger than 0. I have no idea what that's >>> about, but i'd probably be passing in 0's. >>> >>> The interface for HTTP::Cookies looks pretty horrid :x >>> >>> Adam >> Indeed it is... >> >> At any rate, here is what I am doing. I connect to an HTTPS site that is >> made by a nameless "big company" which means the design is terribly >> inconsistent. For some reason, after doing a particular search, the site >> returns a redirect page that sets a pile of cookies using JS >> 'document.cookie="..."' calls, the a 'document.location' to follow the >> link, all of which is triggered by an 'onload' call. Now the problem is, >> all the 'document.cookie' values are needed to get the actual data I >> need. Seeing as WWW::Mechanize doesn't support JS, I need to find a way >> to set them manually. >> >> So here are the relevant bits: >> >> -=] Setting up my WWW::Mechanize object >> use HTTP::Cookies; >> my $agent = WWW::Mechanize->new( >> autocheck => 1, >> cookie_jar => HTTP::Cookies->new(), >> ); >> $agent->agent_alias("Linux Mozilla"); >> >> # I do a pile of work, following links, submitting forms and such, until >> # I get to the JS redirect page I described, where I try to follow the >> # redirect after setting cookies. **This Fails**. >> >> -=] Process the JS redirect bastardization >> # Process the results. >> my $processing_page=$agent->content; >> foreach my $cookie ($processing_page=~/document.cookie="(.*?)"/gs) >> { >> my ($variable, $value, $path, $expires)=""; >> if ( $cookie =~ /expires/ ) >> { >> ($variable, $value, $path, $expires)=$cookie=~/(.*?)=(.*?); >> path=(.*?); expires=(.*?);/; >> print "Setting Cookie: [$variable]->[$value] \@ [$path] ($expires).\n"; >> } >> else >> { >> ($variable, $value, $path)=$cookie=~/(.*?)=(.*?); path=(.*?);/; >> print "Setting Cookie: [$variable]->[$value] \@ [$path].\n"; >> } >> $$agent{cookie_jar}->set_cookie(0, $variable, $value, $path); >> } >> my ($processing_link)=$processing_page=~/window.location="(.*?)"/; >> print "Following results link: [$processing_link]\n"; >> $agent->get($processing_link); >> -=-=-=-=-=-=-=-=- >> >> The closest I could figure to access the HTTP::Cookies methods was by >> calling it as I did, though I realize this is probably not smart as I am >> trying to access internal values, but it was as close as I could get. >> This doesn't error, but it also doesn't seem to work. >> >> Any further ideas? >> >> Madi >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: