From rkleeman at energoncube.net Tue Feb 19 19:58:34 2002 From: rkleeman at energoncube.net (Bob Kleemann) Date: Thu Aug 5 00:20:32 2004 Subject: Perl Meeting Tommorow! Message-ID: ~sdpm~ Sorry I've been forgetting to remind everyone, but there is a Perl Mongers meeting tommorow. Same time (7PM), same place (Technical Training Resources), same schedule (perl questions, problems, and answers; open source convention; and who knows what else). ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From nestor.florez at worldnet.att.net Wed Feb 20 06:00:51 2002 From: nestor.florez at worldnet.att.net (Nestor Florez) Date: Thu Aug 5 00:20:32 2004 Subject: Perl Meeting Tommorow! References: Message-ID: <002c01c1ba06$3f0d9770$0101a8c0@nestorflorez.local> ~sdpm~ Guys, I will not be able to make it, because I have an Oracle class on Wednesday. I wish I could be there. Have fun, Nestor :-) ----- Original Message ----- From: "Bob Kleemann" To: "San Diego Perl Mongers" Sent: Tuesday, February 19, 2002 5:58 PM Subject: Perl Meeting Tommorow! > ~sdpm~ > Sorry I've been forgetting to remind everyone, but there is a Perl Mongers > meeting tommorow. > > Same time (7PM), same place (Technical Training Resources), same schedule > (perl questions, problems, and answers; open source convention; and who > knows what else). > > > ~sdpm~ > > The posting address is: san-diego-pm-list@hfb.pm.org > > List requests should be sent to: majordomo@hfb.pm.org > > If you ever want to remove yourself from this mailing list, > you can send mail to with the following > command in the body of your email message: > > unsubscribe san-diego-pm-list > > If you ever need to get in contact with the owner of the list, > (if you have trouble unsubscribing, or have questions about the > list itself) send email to . > This is the general rule for most mailing lists when you need > to contact a human. > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From dgwilson1 at cox.net Thu Feb 21 12:19:34 2002 From: dgwilson1 at cox.net (Douglas Wilson) Date: Thu Aug 5 00:20:32 2004 Subject: Bioinformatics link Message-ID: <00a701c1bb04$5181aa00$263a0544@oc.cox.net> ~sdpm~ As promised, here's a link to a bioinformatics site's job search page: http://www.biospace.com/navigate/search.cfm --------------- Douglas Wilson ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From tkil-sdpm at scrye.com Fri Feb 22 00:50:40 2002 From: tkil-sdpm at scrye.com (Tkil) Date: Thu Aug 5 00:20:32 2004 Subject: sample code from Wednesday evening Message-ID: ~sdpm~ Sorry that it took me so long to post this. First, the sample data, in file "ppe.log": ------------------------------------------------------------------------------- ETN=s04619 Step_name=Drill_Chart Elapsed_time=1456 Finished=Yes Clock=No Epoch=0 ip= ETN=s04619 Step_name=Stackup Elapsed_time=2586 Finished=Yes Clock=No Epoch=0 ip= ETN=s04619 Step_name=Data_review Elapsed_time=8422 Finished=Yes Clock=No Epoch=0 ip= ETN=s04619 Step_name=CAM_inst Elapsed_time=1118 Finished=Yes Clock=No Epoch=0 ip= booga booga! ETN=s04619 Step_name=Drill_and_Inners Elapsed_time=27918 Finished=Yes Clock=No Epoch=0 ip= ETN=s04619 Step_name=Traveler_BOM Elapsed_time=7098 Finished=No Clock=No Epoch=0 ip= ETN=s04621 Step_name=Drill_Chart Elapsed_time=9525 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=Stackup Elapsed_time=2665 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=Data_review Elapsed_time=10117 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=CAM_inst Elapsed_time=2032 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=Drill_and_Inners Elapsed_time=1032 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=Traveler_BOM Elapsed_time=4021 Finished=No Clock=No Epoch=0 ip= ETN=s04621 Step_name=CAM_inst Elapsed_time=10322 Finished=Yes Clock=No Epoch=0 ip= ETN=s04621 Step_name=Fake_Step_1 Elapsed_time=13402 Finished=No Clock=No Epoch=0 ip= ETN=s04619 Step_name=Data_review Elapsed_time=10032 Finished=Yes Clock=No Epoch=0 ip= ------------------------------------------------------------------------------- Then the code we came up with: ------------------------------------------------------------------------------- #!/usr/local/bin/perl -w use strict; use Data::Dumper qw(Dumper); my %hash; open IN, "ppe.log" or die "opening: $!"; while () { if (/ETN=(\w+) .*? Step_name=(\w+) .*? Elapsed_time=(\d+)/x) { my ($etn, $step, $time) = ($1, $2, $3); $hash{$etn}{$step} += $time; } else { print STDERR "couldn't parse line $.: $_"; } } close IN or die "closing: $!"; print STDERR Dumper(\%hash); while (my ($etn, $info) = each %hash) { local *OUT; open OUT, ">$etn.out" or die "opening $etn.out: $!"; while (my ($step, $total) = each %$info) { printf OUT "%-30s %6d\n", $step.":", $total; } close OUT or warn "closing $etn.out: $!"; } ------------------------------------------------------------------------------- My perl examples are at this URL, although I've had difficulty getting to the box lately (it's still up, but there's some sort of routing nastiness going on at the moment): http://slinky.scrye.com/~tkil/perl/ Finally, here's the C version of the "mystery m function" problem from: http://www.itasoftware.com/careers/programmers.php ------------------------------------------------------------------------------- #include int m(int i, int j, int k) { static int count = 0; int rv; if (i == 0) { rv = k+1; } else if (i == 1 && k == 0) { rv = j; } else if (i == 2 && k == 0) { rv = 0; } else if (k == 0) { rv = 1; } else { rv = m(i-1, j, m(i, j, k-1)); } ++count; if ((count & 0xffff) == 0x0) { fprintf(stderr, "%08x: m(%d,%d,%d)=%d\n", count, i, j, k, rv); } return rv; } int main (int argc, char * argv [] ) { printf("m(4,4,4)=%d\n", m(4,4,4)); return 0; } ------------------------------------------------------------------------------- I ran it on my friend's box (1GHz Athlon) up to this iteration: 11dc0000: m(1,4,23243)=23247 Since it's still not ending, I basically gave up on actually running it. If I get some more free time, maybe it's solvable "by hand". t. ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From mike at slacking.org Fri Feb 22 04:28:18 2002 From: mike at slacking.org (Mike Slack) Date: Thu Aug 5 00:20:32 2004 Subject: sample code from Wednesday evening In-Reply-To: ; from tkil-sdpm@scrye.com on Thu, Feb 21, 2002 at 11:50:40PM -0700 References: Message-ID: <20020222022818.A4642@mail.slacking.org> ~sdpm~ Yep, this one most definitely won't work by running a program. I can post the complete solution if you want, but I don't want to spoil it for anyone. There is an exact answer, which is in the vicinity of 10**(10**154), a Very Big Number(TM). Mike -- Mike Slack mike@slacking.org -- "If we knew what it was we were doing, it wouldn't be called research, would it?" --Albert Einstein Tkil (tkil-sdpm@scrye.com) wrote: > #include > > int m(int i, int j, int k) > { > static int count = 0; > int rv; > if (i == 0) { rv = k+1; } > else if (i == 1 && k == 0) { rv = j; } > else if (i == 2 && k == 0) { rv = 0; } > else if (k == 0) { rv = 1; } > else { rv = m(i-1, j, m(i, j, k-1)); } > > ++count; > if ((count & 0xffff) == 0x0) > { > fprintf(stderr, "%08x: m(%d,%d,%d)=%d\n", > count, i, j, k, rv); > } > > return rv; > } > > int main (int argc, char * argv [] ) > { > printf("m(4,4,4)=%d\n", m(4,4,4)); > return 0; > } > ------------------------------------------------------------------------------- > > I ran it on my friend's box (1GHz Athlon) up to this iteration: > > 11dc0000: m(1,4,23243)=23247 > > Since it's still not ending, I basically gave up on actually running > it. If I get some more free time, maybe it's solvable "by hand". > > t. ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chuckphillips at mac.com Wed Feb 27 11:23:38 2002 From: chuckphillips at mac.com (Chuck Phillips) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II Message-ID: ~sdpm~ Sorry, hit some key combo that sent the message before I was ready.... Let's try this again. Hello All, I'm trying to write a package that inherits from DBI, but am missing something. Running the following test script gives me the following: Can't locate object method "connect" via package "Bar" at ./test.pl line 12. Any help would be appreciated. -Chuck # Code below package Foo; sub connect2 { my ($self, $name) = @_; print "FOO BAR $name\n"; bless {}, $self; }; sub bar { print "hi\n"; } package Bar; @ISA = qw(Foo DBI); sub foo { print "there.\n"; }; package main; my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); $a->bar; $a->foo; ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chuckphillips at mac.com Wed Feb 27 11:34:12 2002 From: chuckphillips at mac.com (Chuck Phillips) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: Message-ID: ~sdpm~ Replacing @ISA = qw(Foo DBI); with use base qw(Foo DBI); Gets me closer: I now get the following error: DBI subclass 'Bar::db' isn't setup, ignored at ./test.pl line 13 Can't locate object method "bar" via package "DBI::db" at ./test.pl line 14. > From: Chuck Phillips > Date: Wed, 27 Feb 2002 09:23:38 -0800 > To: Perl Mongers > Subject: @ISA = qw(DBI) no worky part II > > ~sdpm~ > Sorry, hit some key combo that sent the message before I was ready.... Let's > try this again. > > Hello All, > > I'm trying to write a package that inherits from DBI, but am missing > something. Running the following test script gives me the following: > > Can't locate object method "connect" via package "Bar" at ./test.pl line 12. > > Any help would be appreciated. > > -Chuck > > # Code below > package Foo; > sub connect2 { my ($self, $name) = @_; print "FOO BAR $name\n"; bless {}, > $self; }; > sub bar { print "hi\n"; } > > package Bar; > @ISA = qw(Foo DBI); > sub foo { print "there.\n"; }; > > package main; > my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); > $a->bar; > $a->foo; > > ~sdpm~ > > The posting address is: san-diego-pm-list@hfb.pm.org > > List requests should be sent to: majordomo@hfb.pm.org > > If you ever want to remove yourself from this mailing list, > you can send mail to with the following > command in the body of your email message: > > unsubscribe san-diego-pm-list > > If you ever need to get in contact with the owner of the list, > (if you have trouble unsubscribing, or have questions about the > list itself) send email to . > This is the general rule for most mailing lists when you need > to contact a human. > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at energoncube.net Wed Feb 27 11:37:47 2002 From: rkleeman at energoncube.net (Bob Kleemann) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: Message-ID: ~sdpm~ Did you try adding a "use DBI;" into package Bar? On Wed, 27 Feb 2002, Chuck Phillips wrote: > ~sdpm~ > Sorry, hit some key combo that sent the message before I was ready.... Let's > try this again. > > Hello All, > > I'm trying to write a package that inherits from DBI, but am missing > something. Running the following test script gives me the following: > > Can't locate object method "connect" via package "Bar" at ./test.pl line 12. > > Any help would be appreciated. > > -Chuck > > # Code below > package Foo; > sub connect2 { my ($self, $name) = @_; print "FOO BAR $name\n"; bless {}, > $self; }; > sub bar { print "hi\n"; } > > package Bar; > @ISA = qw(Foo DBI); > sub foo { print "there.\n"; }; > > package main; > my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); > $a->bar; > $a->foo; > > ~sdpm~ > > The posting address is: san-diego-pm-list@hfb.pm.org > > List requests should be sent to: majordomo@hfb.pm.org > > If you ever want to remove yourself from this mailing list, > you can send mail to with the following > command in the body of your email message: > > unsubscribe san-diego-pm-list > > If you ever need to get in contact with the owner of the list, > (if you have trouble unsubscribing, or have questions about the > list itself) send email to . > This is the general rule for most mailing lists when you need > to contact a human. > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chuckphillips at mac.com Wed Feb 27 11:42:12 2002 From: chuckphillips at mac.com (Chuck Phillips) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: Message-ID: ~sdpm~ But then I'm not inheriting from DBI, I'm using it. > From: Bob Kleemann > Date: Wed, 27 Feb 2002 09:37:47 -0800 (PST) > To: Chuck Phillips > Cc: Perl Mongers > Subject: Re: @ISA = qw(DBI) no worky part II > > Did you try adding a "use DBI;" into package Bar? > > On Wed, 27 Feb 2002, Chuck Phillips wrote: > >> ~sdpm~ >> Sorry, hit some key combo that sent the message before I was ready.... Let's >> try this again. >> >> Hello All, >> >> I'm trying to write a package that inherits from DBI, but am missing >> something. Running the following test script gives me the following: >> >> Can't locate object method "connect" via package "Bar" at ./test.pl line 12. >> >> Any help would be appreciated. >> >> -Chuck >> >> # Code below >> package Foo; >> sub connect2 { my ($self, $name) = @_; print "FOO BAR $name\n"; bless {}, >> $self; }; >> sub bar { print "hi\n"; } >> >> package Bar; >> @ISA = qw(Foo DBI); >> sub foo { print "there.\n"; }; >> >> package main; >> my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); >> $a->bar; >> $a->foo; >> >> ~sdpm~ >> >> The posting address is: san-diego-pm-list@hfb.pm.org >> >> List requests should be sent to: majordomo@hfb.pm.org >> >> If you ever want to remove yourself from this mailing list, >> you can send mail to with the following >> command in the body of your email message: >> >> unsubscribe san-diego-pm-list >> >> If you ever need to get in contact with the owner of the list, >> (if you have trouble unsubscribing, or have questions about the >> list itself) send email to . >> This is the general rule for most mailing lists when you need >> to contact a human. >> >> > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From merlyn at stonehenge.com Wed Feb 27 11:45:03 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: References: Message-ID: ~sdpm~ >>>>> "Chuck" == Chuck Phillips writes: Chuck> I'm trying to write a package that inherits from DBI, but am missing Chuck> something. You missed reading how to subclass DBI in DBI::DBD - SUBCLASSING DBI DRIVERS This is definitely an open subject. It can be done, as demonstrated by the DBD::File driver, but it is not as simple as one might think. (Note that this topic is different from subclassing the DBI. For an example of that, see the t/subclass.t file supplied with the DBI.) And thus you should look at t/subclass.t for a working example. The problem is that the object returned by Foo->connect is not a Foo, but a Foo::db. And statement handles are Foo::st. So you added your methods to the wrong classes. You need: package Foo; use base qw(DBI); sub additional_constructor { ... } package Foo::db; use base qw(DBI::db); sub additional_dbh_method { ... } package Foo::st; use base qw(DBI::st); sub additional_sth_method { ... } -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at energoncube.net Wed Feb 27 11:47:34 2002 From: rkleeman at energoncube.net (Bob Kleemann) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: Message-ID: ~sdpm~ Just because you use a module doesn't mean you aren't doing inheritance. It just says you are loading the module into memory. After that you can either use it in the normal fashion (via a something like my $dbh = DBI->connect(...)) or you can inherit from it. package Bar; use DBI qw(); @ISA = qw(Foo DBI); On Wed, 27 Feb 2002, Chuck Phillips wrote: > But then I'm not inheriting from DBI, I'm using it. > > > From: Bob Kleemann > > Date: Wed, 27 Feb 2002 09:37:47 -0800 (PST) > > To: Chuck Phillips > > Cc: Perl Mongers > > Subject: Re: @ISA = qw(DBI) no worky part II > > > > Did you try adding a "use DBI;" into package Bar? > > > > On Wed, 27 Feb 2002, Chuck Phillips wrote: > > > >> ~sdpm~ > >> Sorry, hit some key combo that sent the message before I was ready.... Let's > >> try this again. > >> > >> Hello All, > >> > >> I'm trying to write a package that inherits from DBI, but am missing > >> something. Running the following test script gives me the following: > >> > >> Can't locate object method "connect" via package "Bar" at ./test.pl line 12. > >> > >> Any help would be appreciated. > >> > >> -Chuck > >> > >> # Code below > >> package Foo; > >> sub connect2 { my ($self, $name) = @_; print "FOO BAR $name\n"; bless {}, > >> $self; }; > >> sub bar { print "hi\n"; } > >> > >> package Bar; > >> @ISA = qw(Foo DBI); > >> sub foo { print "there.\n"; }; > >> > >> package main; > >> my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); > >> $a->bar; > >> $a->foo; > >> > >> ~sdpm~ > >> > >> The posting address is: san-diego-pm-list@hfb.pm.org > >> > >> List requests should be sent to: majordomo@hfb.pm.org > >> > >> If you ever want to remove yourself from this mailing list, > >> you can send mail to with the following > >> command in the body of your email message: > >> > >> unsubscribe san-diego-pm-list > >> > >> If you ever need to get in contact with the owner of the list, > >> (if you have trouble unsubscribing, or have questions about the > >> list itself) send email to . > >> This is the general rule for most mailing lists when you need > >> to contact a human. > >> > >> > > > > > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From merlyn at stonehenge.com Wed Feb 27 15:16:15 2002 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Thu Aug 5 00:20:32 2004 Subject: @ISA = qw(DBI) no worky part II In-Reply-To: References: Message-ID: ~sdpm~ >>>>> "Chuck" == Chuck Phillips writes: Chuck> ~sdpm~ Chuck> But then I'm not inheriting from DBI, I'm using it. Wrong. >>> my $a = Bar->connect("dbi:mysql:test:localhost",'root','foo'); >>> $a->bar; >>> $a->foo; This implies that you want $a to respond to what a DBI::db responds to, and Bar to respond to what DBI responds to. That's called "inheritance". -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human.