From rdice at pobox.com Tue May 1 08:33:13 2007 From: rdice at pobox.com (Richard Dice) Date: Tue, 1 May 2007 11:33:13 -0400 Subject: [tpm] Job posting at Raybec Communications Inc. Message-ID: <5bef4baf0705010833q29764fdbu541e95de9316ddaa@mail.gmail.com> Hi everyone, As I mentioned at the TPM meeting last week, my company, Raybec Communications Inc., is hiring for a Perl application developer. I have posted this to jobs.perl.org at - http://jobs.perl.org/job/5721 I've attached the posting below as well. If you'd like to talk about this please email your resume and any other info (e.g. covering letter) to jobs at raybec.com. I will get emails sent to that address. Cheers, Richard ////////////////////////////////////////// Company name: Raybec Communications Inc. Location: Canada, Ontario, Toronto (downtown) Pay rate: commensurate with experience Travel: 0% Terms of employment: Salaried employee Hours: Full time Onsite: yes Description: ------------ Raybec Communications is looking to add a Perl Application Developer to join our web application development team. As a member of our team, you will be working on our web applications based on existing design templates and codebase. The future is bright for the right individual. You will help shape our development as we continue to grow and service some of North America's largest organizations. You will be responsible for managing our existing application and participating in the further development of our applications. This is not a re-post! We are growing and hiring. If you are the right candidate, you: ? live in the Toronto area ? have a minimum of 3-5 years experience developing web-based applications in a commercial setting ? translate business requirements into elegant functionality ? take pride in everything you do ? handle multiple projects at one time ? are comfortable asking the questions you need to ask in order to get the job done right ? have proven experience working in a fast-paced environment ? are comfortable working both in a team and self-managed environment Required skills: ---------------- ? Unix/Linux "power user" or sysadmin skills ? Object Oriented Perl 5 ? CGI::Application, HTML::Template ? Perl DBI ? MySQL database use and administration ? Strong familiarity with HTML, JavaScript and CSS URL for more information: ------------------------- http://www.raybec.com/ Contact information: -------------------- Please send your resum? in confidence to: jobs at raybec.com Interested local candiates only. No recruiters or agencies please. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20070501/f778de87/attachment.html From fulko.hew at gmail.com Thu May 3 12:57:19 2007 From: fulko.hew at gmail.com (Fulko Hew) Date: Thu, 3 May 2007 15:57:19 -0400 Subject: [tpm] my perl program seg faults Message-ID: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well... My latest app, is a forking TCP server/client. It runs fine and does its thing. So I put it into a shell loop, and every once in a while I see it die (near or at the end of processing where its exiting) and say: "Segmentation fault" My guess is its happening after my app says exit, and Perl is doing its clean up. But I'd rather never see the error message. ISTR that this isn't the first app of mine that randomly emits this message on shutdown, but this time around its anoying me. How can I find out where/why its dying? B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi" From indy at indigostar.com Thu May 3 13:08:59 2007 From: indy at indigostar.com (Indy Singh) Date: Thu, 3 May 2007 16:08:59 -0400 Subject: [tpm] my perl program seg faults References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> Message-ID: <3f2501c78dbe$e345e5e0$6600a8c0@roadhog> I don't have a real answer, but a few hacks that may help. Put a print statement at the end of your code so that you know for sure whether it is dying at the end or near the end. I noticed that dynamic libraries are never unloaded, see if this but code at the end of your script helps: DynaLoader::dl_unload_file($_) foreach (@DynaLoader::dl_librefs); As another hack you could try redirecting STDERR to /dev/null at the end of your script. I think something like this may work: open (STDERR, ">/dev/null"); Indy Singh IndigoSTAR Software -- www.indigostar.com ----- Original Message ----- From: "Fulko Hew" To: Sent: Thursday, May 03, 2007 3:57 PM Subject: [tpm] my perl program seg faults > I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well... > > My latest app, is a forking TCP server/client. It runs fine and does > its thing. So I put it into a shell loop, and every once in a while I > see it die (near or at the end of processing where its exiting) and > say: > > "Segmentation fault" > > My guess is its happening after my app says exit, and Perl is doing > its clean up. But I'd rather never see the error message. ISTR that > this isn't the first app of mine that randomly emits this message on > shutdown, but this time around its anoying me. How can I find out > where/why its dying? > > B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi" > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From mfowle at navicominc.com Thu May 3 13:17:14 2007 From: mfowle at navicominc.com (Mark Fowle) Date: Thu, 3 May 2007 16:17:14 -0400 Subject: [tpm] my perl program seg faults In-Reply-To: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> Message-ID: <6a7a01c78dc0$0a5d1c60$0a00a8c0@VIRIDIAN> The only times I run across semi periodic sec faults, other than bad hardware, have been when I run out of handles, I had an inner loop where I was creating but not closing objects. -----Original Message----- From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of Fulko Hew Sent: Thursday, May 03, 2007 3:57 PM To: tpm at to.pm.org Subject: [tpm] my perl program seg faults I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well... My latest app, is a forking TCP server/client. It runs fine and does its thing. So I put it into a shell loop, and every once in a while I see it die (near or at the end of processing where its exiting) and say: "Segmentation fault" My guess is its happening after my app says exit, and Perl is doing its clean up. But I'd rather never see the error message. ISTR that this isn't the first app of mine that randomly emits this message on shutdown, but this time around its anoying me. How can I find out where/why its dying? B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi" _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From tom at legrady.ca Thu May 3 17:55:12 2007 From: tom at legrady.ca (Tom Legrady) Date: Thu, 3 May 2007 20:55:12 -0400 Subject: [tpm] my perl program seg faults In-Reply-To: <3f2501c78dbe$e345e5e0$6600a8c0@roadhog> References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> <3f2501c78dbe$e345e5e0$6600a8c0@roadhog> Message-ID: <50089082-26C3-48C4-9332-13585F7F6970@legrady.ca> You might need to close STDERR before you open it with a new target. Maybe it's just me, but I get uncooperative results with I open with a close. Tom On 3-May-07, at 4:08 PM, Indy Singh wrote: > I don't have a real answer, but a few hacks that may help. > > Put a print statement at the end of your code so that you know for > sure whether it is dying at the end or near the end. > > I noticed that dynamic libraries are never unloaded, see if this > but code at the end of your script helps: > DynaLoader::dl_unload_file($_) foreach (@DynaLoader::dl_librefs); > > As another hack you could try redirecting STDERR to /dev/null at > the end of your script. I think something like this may work: > open (STDERR, ">/dev/null"); > > Indy Singh > IndigoSTAR Software -- www.indigostar.com > > > ----- Original Message ----- > From: "Fulko Hew" > To: > Sent: Thursday, May 03, 2007 3:57 PM > Subject: [tpm] my perl program seg faults > > >> I've posted this to PerlMonks, but I thought I'd throw it out to >> TPM as well... >> >> My latest app, is a forking TCP server/client. It runs fine and does >> its thing. So I put it into a shell loop, and every once in a while I >> see it die (near or at the end of processing where its exiting) and >> say: >> >> "Segmentation fault" >> >> My guess is its happening after my app says exit, and Perl is doing >> its clean up. But I'd rather never see the error message. ISTR that >> this isn't the first app of mine that randomly emits this message on >> shutdown, but this time around its anoying me. How can I find out >> where/why its dying? >> >> B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux- >> thread-multi" >> _______________________________________________ >> 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 > Tom Legrady tom at legrady.ca XMas Shopping photos => http://www.flickr.com/photos/89217343 at N00/ sets/1601047/show -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20070503/69b4f6fe/attachment.html From sergio.salvi at gmail.com Thu May 3 18:54:13 2007 From: sergio.salvi at gmail.com (Sergio Salvi) Date: Thu, 3 May 2007 21:54:13 -0400 Subject: [tpm] my perl program seg faults In-Reply-To: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> Message-ID: <568473410705031854x79e491fem2c994c279ad8792f@mail.gmail.com> Do you get a core file when it dies? If not, run "ulimit -c" and confirm it's NOT zero so you'll get a core file to help debug it. On 5/3/07, Fulko Hew wrote: > I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well... > > My latest app, is a forking TCP server/client. It runs fine and does > its thing. So I put it into a shell loop, and every once in a while I > see it die (near or at the end of processing where its exiting) and > say: > > "Segmentation fault" > > My guess is its happening after my app says exit, and Perl is doing > its clean up. But I'd rather never see the error message. ISTR that > this isn't the first app of mine that randomly emits this message on > shutdown, but this time around its anoying me. How can I find out > where/why its dying? > > B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi" > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From indy at indigostar.com Fri May 4 05:09:22 2007 From: indy at indigostar.com (Indy Singh) Date: Fri, 4 May 2007 08:09:22 -0400 Subject: [tpm] my perl program seg faults References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> <568473410705031854x79e491fem2c994c279ad8792f@mail.gmail.com> Message-ID: <003901c78e45$0da80030$6600a8c0@roadhog> You could try running perl under the debugger. Then when the process crashes, run the backtrace command to see where it crashed. This is untested but I beleive the commands are gdb perl run command-line-parameters bt You can also attach to a running process with ps auxw gdb attach continue bt I am not sure if you need a debug build of Perl to see the stack trace. To see the exact source code line where it crashes, you will need a debug build. Indy Singh IndigoSTAR Software -- www.indigostar.com ----- Original Message ----- From: "Sergio Salvi" To: "Fulko Hew" Cc: Sent: Thursday, May 03, 2007 9:54 PM Subject: Re: [tpm] my perl program seg faults > Do you get a core file when it dies? If not, run "ulimit -c" and > confirm it's NOT zero so you'll get a core file to help debug it. > > On 5/3/07, Fulko Hew wrote: >> I've posted this to PerlMonks, but I thought I'd throw it out to TPM as well... >> >> My latest app, is a forking TCP server/client. It runs fine and does >> its thing. So I put it into a shell loop, and every once in a while I >> see it die (near or at the end of processing where its exiting) and >> say: >> >> "Segmentation fault" >> >> My guess is its happening after my app says exit, and Perl is doing >> its clean up. But I'd rather never see the error message. ISTR that >> this isn't the first app of mine that randomly emits this message on >> shutdown, but this time around its anoying me. How can I find out >> where/why its dying? >> >> B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-thread-multi" >> _______________________________________________ >> 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 fulko.hew at gmail.com Fri May 4 07:37:12 2007 From: fulko.hew at gmail.com (Fulko Hew) Date: Fri, 4 May 2007 10:37:12 -0400 Subject: [tpm] my perl program seg faults In-Reply-To: <003901c78e45$0da80030$6600a8c0@roadhog> References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> <568473410705031854x79e491fem2c994c279ad8792f@mail.gmail.com> <003901c78e45$0da80030$6600a8c0@roadhog> Message-ID: <8204a4fe0705040737n52072d50p64633e61c8e66b72@mail.gmail.com> On 5/4/07, Indy Singh wrote: > You could try running perl under the debugger. Then when the process crashes, run the backtrace command to see where it crashed. OK, so I took this approach: ulimit -c unlimited # so that core files are produced while ( true ) do ./myprog; done Then when it died and core dumped, I did: gdb perl corefile bt then it complains about not having symbols for a lot of things, but it did tells me it was in a signalhandler. (I didn't copy the exact text). So now I'm trying to figure out what (from a Perl point of view), what process is receiving what trap. From arocker at vex.net Mon May 7 09:28:00 2007 From: arocker at vex.net (arocker at vex.net) Date: Mon, 7 May 2007 12:28:00 -0400 (EDT) Subject: [tpm] Not exactly a Perl question, but... Message-ID: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> Has anyone successfully installed or updated to Firefox 2.0.0.x on Linux? (I'm not interested in 1.5 installs or anything on Windows.) From olaf at vilerichard.com Mon May 7 09:32:15 2007 From: olaf at vilerichard.com (Olaf Alders) Date: Mon, 7 May 2007 12:32:15 -0400 Subject: [tpm] Not exactly a Perl question, but... In-Reply-To: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> References: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> Message-ID: I've got Firefox 2.0.0.3 running on Ubuntu 7.04 On 7-May-07, at 12:28 PM, arocker at vex.net wrote: > > Has anyone successfully installed or updated to Firefox 2.0.0.x on > Linux? > > (I'm not interested in 1.5 installs or anything on Windows.) > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Olaf Alders olaf at vilerichard.com http://www.vilerichard.com -- folk rock http://cdbaby.com/cd/vilerichard From yam at nerd.cx Mon May 7 09:58:16 2007 From: yam at nerd.cx (William Witteman) Date: Mon, 7 May 2007 12:58:16 -0400 Subject: [tpm] Not exactly a Perl question, but... In-Reply-To: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> References: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> Message-ID: <20070507165816.GA19725@sillyrabbi.dyndns.org> On Mon, May 07, 2007 at 12:28:00PM -0400, arocker at vex.net wrote: > >Has anyone successfully installed or updated to Firefox 2.0.0.x on Linux? > >(I'm not interested in 1.5 installs or anything on Windows.) I've got Iceweasel (Firefox) 2.0.0.3 on Debian testing. No visible problems other than the usual - [paraphrasing Michael Elkins, author of mutt] - "all web broswers suck, this one just sucks less". -- yours, William From arocker at vex.net Mon May 7 10:19:36 2007 From: arocker at vex.net (arocker at vex.net) Date: Mon, 7 May 2007 13:19:36 -0400 (EDT) Subject: [tpm] Not exactly a Perl question, but... In-Reply-To: <20070507165816.GA19725@sillyrabbi.dyndns.org> References: <49244.192.30.202.29.1178555280.squirrel@webmail.vex.net> <20070507165816.GA19725@sillyrabbi.dyndns.org> Message-ID: <50876.192.30.202.28.1178558376.squirrel@webmail.vex.net> Perhaps I should clarify my question. I'm not interested in Firefox 2.0.0.x that was installed with a distribution. It runs. It's the process of updating from an earlier version that concerns me. From fulko.hew at gmail.com Mon May 14 06:28:02 2007 From: fulko.hew at gmail.com (Fulko Hew) Date: Mon, 14 May 2007 09:28:02 -0400 Subject: [tpm] my perl program seg faults In-Reply-To: <8204a4fe0705040737n52072d50p64633e61c8e66b72@mail.gmail.com> References: <8204a4fe0705031257u5f6e8500v3cd1fc51f83dd9bb@mail.gmail.com> <568473410705031854x79e491fem2c994c279ad8792f@mail.gmail.com> <003901c78e45$0da80030$6600a8c0@roadhog> <8204a4fe0705040737n52072d50p64633e61c8e66b72@mail.gmail.com> Message-ID: <8204a4fe0705140628h191f2c7buc378eca1f72e3bab@mail.gmail.com> On 5/4/07, Fulko Hew wrote: > On 5/4/07, Indy Singh wrote: > > You could try running perl under the debugger. Then when the process crashes, run the backtrace command to see where it crashed. > > OK, so I took this approach: > > ulimit -c unlimited # so that core files are produced > while ( true ) do ./myprog; done > > Then when it died and core dumped, I did: > > gdb perl corefile > bt > > then it complains about not having symbols for a lot of things, but > it did tells me it was in a signalhandler. (I didn't copy the exact text). > > So now I'm trying to figure out what (from a Perl point of view), what > process is receiving what trap. OK guys... here's the analysis... I took the suggestion of looking at what the core dump could provide. A gdb stack trace told me that it was dying during signal handling. (Unfortunately I didn't write down the exact routine name, but... So without attempting to understand and diagnose Perl itself, I looked at where my code dealt with signals. I narrowed it down to 'death of a child' in my forking TCP server code. My server is bsed on the standard skeleton from 'the cookbook'. What happens in my code is that on occasion, the main listener may choose to shut itself down and all children (for example, say when it catches a CTRL-C) The mainline would go through and kill off all forked children, and then die itself. What was happening was (or at least _my impression_ was) that the children would be killed off, but not dead yet. Then the mainline would die, but the perl interpreter would still be around. Then the interpreter for the main-line would receive the 'death of a child' signal for (one or more of) the children, but could no longer handle it, because the mainline was (just about...!) dead. So it would issue a segfault and core dump. My solution/workaround under this situation was to signal the children to die, and then have the mainline actually wait around (perhaps forever) for the children to die, and then (and only then) exit/die itself. I.e. sub reaper { 1 until (-1 == waitpid(-1, WNOHANG)); } $SIG{CHLD} = \&reaper; kill 9, $childPid; # signal the child to die reaper(); # IMPORTANT! ...wait for the child to go away # (else we might get perl seg faulting on exit) exit; # and die ourselves So in the end, I was seeing this on a number of my apps that have used the same philosophy on shutdown of forking server apps, and the reason it was intermittent failure/warnings was all due to the random timing of the parent/child dying/exiting relationship. ...Sometimes the signal catcher would get invoked... but sometimes the interpreter seemed to have been shutdown far enough that the catcher was no longer there when the signal arrived, so it would core dump on shutdown. From arocker at vex.net Mon May 14 07:03:57 2007 From: arocker at vex.net (arocker at vex.net) Date: Mon, 14 May 2007 10:03:57 -0400 (EDT) Subject: [tpm] Subroutine arcana Message-ID: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> Does anyone know if it is legitimate to use an anonymous subroutine in a named one? I've run across a case in someone else's code, and the expression using the anonymous routine simply seems to be ignored, neither executing nor generating a complaint. I believe, (and taught), that named subroutines cannot be nested, but when I sought guidance in the canon, it was strangely silent about the nesting of either type. From mfowle at navicominc.com Mon May 14 07:18:23 2007 From: mfowle at navicominc.com (Mark Fowle) Date: Mon, 14 May 2007 10:18:23 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> Message-ID: <10a301c79632$bcd69860$0a00a8c0@VIRIDIAN> >From Programming Perl 3rd edition Chapter 8 - there is a not on nested subroutines. Stating that named subroutines do not nest properly but anonymous ones do. -----Original Message----- From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of arocker at vex.net Sent: Monday, May 14, 2007 10:04 AM To: tpm at to.pm.org Subject: [tpm] Subroutine arcana Does anyone know if it is legitimate to use an anonymous subroutine in a named one? I've run across a case in someone else's code, and the expression using the anonymous routine simply seems to be ignored, neither executing nor generating a complaint. I believe, (and taught), that named subroutines cannot be nested, but when I sought guidance in the canon, it was strangely silent about the nesting of either type. _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From rdice at pobox.com Mon May 14 07:13:54 2007 From: rdice at pobox.com (Richard Dice) Date: Mon, 14 May 2007 10:13:54 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> References: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> Message-ID: <5bef4baf0705140713sff1c72aw52e49c7b7157ce6a@mail.gmail.com> Could you post the code in question, or at least a minimal demo that shows what it is that you have a question regarding? Cheers, Richard On 5/14/07, arocker at vex.net wrote: > > > Does anyone know if it is legitimate to use an anonymous subroutine in a > named one? I've run across a case in someone else's code, and the > expression using the anonymous routine simply seems to be ignored, neither > executing nor generating a complaint. > > I believe, (and taught), that named subroutines cannot be nested, but when > I sought guidance in the canon, it was strangely silent about the nesting > of either type. > > _______________________________________________ > 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: http://mail.pm.org/pipermail/toronto-pm/attachments/20070514/d5106993/attachment.html From james.a.graham at gmail.com Mon May 14 07:35:38 2007 From: james.a.graham at gmail.com (Jim Graham) Date: Mon, 14 May 2007 10:35:38 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> Message-ID: <004f01c79635$24dc7810$1901a8c0@mecano> Hi Without seeing your code, it's hard to say. But I can cook up a quick example to show that you can nest subroutines. Hope this helps, Jim File:subs.pl #-- define subroutines sub named_sub { #-- define a named and anon sub sub named_internal_sub { print "\t\tIn named_internal_sub with args: @_\n"; } #-- can make anon_sub private if we declare it "my". Otherwise # it is globally visible $anon_sub = sub { print "\t\tIn internal anon sub: @_ \n"; }; #-- Sub execution print "\tIn named_sub with args: @_\n"; print "\tCalling internal sub from named_sub\n"; named_internal_sub(@_); print "\tCalling anon sub from named_sub\n"; $anon_sub->(@_); } #-- MAIN print "In ", __FILE__, "\n"; print "Calling named sub from Main\n"; named_sub( "Some", "Set", "Arguments", 3); #-- Named internal sub is in the symbol table print "Calling named internal sub from Main\n"; named_internal_sub( "Some", "Set", "Arguments", 3); #-- this can be made private if $anon_sub is declared "my" in the "named_sub" print "Calling anon sub from Main\n"; $anon_sub->( "Some", "Set", "Arguments", 3); __DATA__ In subs.pl Calling named sub from Main In named_sub with args: Some Set Arguments 3 Calling internal sub from named_sub In named_internal_sub with args: Some Set Arguments 3 Calling anon sub from named_sub In internal anon sub: Some Set Arguments 3 Calling named internal sub from Main In named_internal_sub with args: Some Set Arguments 3 Calling anon sub from Main In internal anon sub: Some Set Arguments 3 -----Original Message----- From: toronto-pm-bounces+james.a.graham=gmail.com at pm.org [mailto:toronto-pm-bounces+james.a.graham=gmail.com at pm.org] On Behalf Of arocker at vex.net Sent: May 14, 2007 10:04 AM To: tpm at to.pm.org Subject: [tpm] Subroutine arcana Does anyone know if it is legitimate to use an anonymous subroutine in a named one? I've run across a case in someone else's code, and the expression using the anonymous routine simply seems to be ignored, neither executing nor generating a complaint. I believe, (and taught), that named subroutines cannot be nested, but when I sought guidance in the canon, it was strangely silent about the nesting of either type. _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From vvp at cogeco.ca Mon May 14 08:50:23 2007 From: vvp at cogeco.ca (Viktor Pavlenko) Date: Mon, 14 May 2007 11:50:23 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <004f01c79635$24dc7810$1901a8c0@mecano> References: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> <004f01c79635$24dc7810$1901a8c0@mecano> Message-ID: <17992.34111.521876.572559@hetman.ua> >>>>> "JG" == Jim Graham writes: JG> #-- define subroutines JG> sub named_sub JG> { JG> #-- define a named and anon sub JG> sub named_internal_sub JG> { JG> print "\t\tIn named_internal_sub with args: @_\n"; JG> } Never thought that would work... JG> #-- can make anon_sub private if we declare it "my". Otherwise JG> # it is globally visible Provided there's no "use strict", which should always be there... IMHO. JG> $anon_sub = sub { print "\t\tIn internal anon sub: @_ \n"; }; Cheers, -- Viktor From james.a.graham at gmail.com Mon May 14 09:03:02 2007 From: james.a.graham at gmail.com (Jim Graham) Date: Mon, 14 May 2007 12:03:02 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <17992.34111.521876.572559@hetman.ua> Message-ID: <005401c79641$5a4e25a0$1901a8c0@mecano> Hi Yes, use strict should nearly always be there, except for little test scripts :) - Jim -----Original Message----- From: Viktor Pavlenko [mailto:vvp at cogeco.ca] Sent: May 14, 2007 11:50 AM To: Jim Graham Cc: tpm at to.pm.org Subject: Re: [tpm] Subroutine arcana >>>>> "JG" == Jim Graham writes: JG> #-- define subroutines JG> sub named_sub JG> { JG> #-- define a named and anon sub JG> sub named_internal_sub JG> { JG> print "\t\tIn named_internal_sub with args: @_\n"; JG> } Never thought that would work... JG> #-- can make anon_sub private if we declare it "my". Otherwise JG> # it is globally visible Provided there's no "use strict", which should always be there... IMHO. JG> $anon_sub = sub { print "\t\tIn internal anon sub: @_ \n"; }; Cheers, -- Viktor From shijialeee at yahoo.com Mon May 14 19:44:37 2007 From: shijialeee at yahoo.com (James.Q.L) Date: Mon, 14 May 2007 19:44:37 -0700 (PDT) Subject: [tpm] Subroutine arcana In-Reply-To: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> Message-ID: <69146.81260.qm@web50408.mail.re2.yahoo.com> --- arocker at vex.net wrote: > > Does anyone know if it is legitimate to use an anonymous subroutine in a > named one? lexical variable in named nested subroutine won't be shared. however, anon subroutine won't suffer from that. I would give you a sample code but i remember mod_perl doc have it explained clearly. http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my____Scoped_Variable_in_Nested_Subroutines James. ____________________________________________________________________________________Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php From magog at the-wire.com Wed May 16 10:12:57 2007 From: magog at the-wire.com (Michael Graham) Date: Wed, 16 May 2007 13:12:57 -0400 Subject: [tpm] May and June meetings in search of topics Message-ID: <20070516131257.5e33ebd2@caliope> We currently have no topic for the May and June meetings (Thurs May 31 and Thurs Jun 28). This is a call for speakers, topic ideas, etc. We've discussed some of the following: * Bad code night - everyone brings in really bad code that they wrote or they are forced to maintain, and we can all have a laugh * People I have replaced with a small shell script - everyone brings in their automation success stories * Rose::DB::Object - A few people want to learn about this alternative to Class::DBI, but there are no volunteers for speakers yet. I know I missed some others we talked about. If you have any suggestions for a talk or topic, or you would like to volunteer, please reply either to me personally, or to the list. Michael -- Michael Graham From michael.a.bolton at gmail.com Sat May 19 08:37:27 2007 From: michael.a.bolton at gmail.com (Michael Bolton) Date: Sat, 19 May 2007 11:37:27 -0400 Subject: [tpm] Special TASSQ Presentation: Johanna Rothman Message-ID: <013c01c79a2b$9c8aecd0$6c01a8c0@Koko> Hello there... I'm writing because on Tuesday, May 29, the Toronto Association of System and Software Quality (TASSQ) will be bringing in a special speaker--Johanna Rothman, co-author of _Behind Closed Doors, Secrets of Great Management_ and author of the highly acclaimed Hiring the Best Knowledge Workers, Techies & Nerds: The Secrets and Science of Hiring Technical People. For those who've never met her, read her books, or seen her at a conference, Johanna is the real deal. She's been involved in the high-tech business as a tester, a test manager, and over the last several years as a management consultant. Details of her presentation for TASSQ follow below. She is entertaining, engaging, and relentlessly pragmatic; highly recommended. Please feel free to pass this message on to your colleagues and your network. Non-TASSQ members are quite welcome to the event and encouraged to attend. To sign up for this dinner meeting, check in with the TASSQ Web site (http://www.tassq.org/infoUpdates/dinnerMeeting.php). TASSQ now supports PayPal, so registration for TASSQ events is easier than ever. All the best... ---Michael B. DevelopSense: Software Testing in Plain English Web Site: http://www.developsense.com Newsletter: addme at developsense.com Blog: http://www.developsense.com/blog.html Say Yes-or Say No? What to Do When Faced with the Impossible ============================================================ Imagine this scenario. All the testers and the test manager are working as hard as they can on their projects. Everyone's working at full capacity, trying to make some time to test the last system your boss asked you to add to your list of things to do. And now, your boss is in your office asking you to take on one more system. You just can't. What do you say now? Testers and test managers are in this predicament all the time. If you continually say Yes, does that yes mean yes or no? And baldly saying No may be career-limiting. Johanna will describe ways to discuss the work you have, the work you can accomplish, and how to make the work possible when faced with the impossible. We're all faced with choices daily about how much work we can accomplish, and how much new work we can add to our workload. But how many of us know how much we can do? It's not easy to estimate how long our work will take, and priorities shift-sometimes daily. What can we do? In this experiential presentation, Johanna will first show the costs of multitasking. Then, we'll discuss ways to say No so that your agreements to add more work is a true agreement and not a placating Yes-and not a non-career-enhancing conversation. Part of how you can say yes or no is to make the work more visible to your management (no matter where you are in the organization). But sometimes, that's not enough. In that case, it's worth considering your mission, how you know what's strategically important work, and making sure you've built a relationship with your manager before you need to have the tough conversation about what you can and can't do. =+=+=+=+=+=+=+= Johanna Rothman consults, speaks, and writes on managing high-technology product development. She assists managers, teams, and organizations to become more effective by applying her pragmatic approaches to the issues of project management, risk management, and people management. She's helped Engineering organizations, IT organizations, and startups hire technical people, manage projects, and release successful products faster. Johanna is the author of Manage It! Your Guide to Modern, Pragmatic Project Management, available June 2007. She is the coauthor of the pragmatic Behind Closed Doors, Secrets of Great Management, and author of the highly acclaimed Hiring the Best Knowledge Workers, Techies & Nerds: The Secrets and Science of Hiring Technical People. Johanna is a host and session leader at the Amplifying Your Effectiveness (AYE) conference. From arocker at vex.net Mon May 21 09:18:18 2007 From: arocker at vex.net (arocker at vex.net) Date: Mon, 21 May 2007 12:18:18 -0400 (EDT) Subject: [tpm] Subroutine arcana In-Reply-To: <004f01c79635$24dc7810$1901a8c0@mecano> References: <1696.208.97.78.122.1179151437.squirrel@webmail.vex.net> <004f01c79635$24dc7810$1901a8c0@mecano> Message-ID: <44858.74.12.145.206.1179764298.squirrel@webmail.vex.net> Thanks to everyone for the help on this topic, especially Jim Graham for the code examples. (In any discussion of programming topics, a functioning example beats 4 aces AND a Smith & Wesson.) My mistakes were: 1. Believing what my course notes said, without verifying them. How many innocent minds have I corrupted? 2. Not replacing the 2nd Edition Camel with the 3rd, which did mention nesting subroutines. (Confirmed from a CD version.) 3. Assuming that defining an anonymous subroutine would cause it to be executed at definition time. (If you assign the result of a function to a scalar, the function gets evaluated. An anonymous subroutine definition looks like a function, but it just assigns the subroutine's reference to the scalar.) Oh well, egg is said to be good for the complexion. From alexmac131 at hotmail.com Mon May 21 09:23:02 2007 From: alexmac131 at hotmail.com (Alex Mackinnon) Date: Mon, 21 May 2007 16:23:02 +0000 Subject: [tpm] Subroutine arcana In-Reply-To: <44858.74.12.145.206.1179764298.squirrel@webmail.vex.net> Message-ID: Hehehe, I have worn egg alot :) >From: arocker at vex.net >To: tpm at to.pm.org >Subject: Re: [tpm] Subroutine arcana >Date: Mon, 21 May 2007 12:18:18 -0400 (EDT) > > >Thanks to everyone for the help on this topic, especially Jim Graham for >the code examples. (In any discussion of programming topics, a functioning >example beats 4 aces AND a Smith & Wesson.) > >My mistakes were: > >1. Believing what my course notes said, without verifying them. How many >innocent minds have I corrupted? >2. Not replacing the 2nd Edition Camel with the 3rd, which did mention >nesting subroutines. (Confirmed from a CD version.) >3. Assuming that defining an anonymous subroutine would cause it to be >executed at definition time. (If you assign the result of a function to a >scalar, the function gets evaluated. An anonymous subroutine definition >looks like a function, but it just assigns the subroutine's reference to >the scalar.) > >Oh well, egg is said to be good for the complexion. > > > > >_______________________________________________ >toronto-pm mailing list >toronto-pm at pm.org >http://mail.pm.org/mailman/listinfo/toronto-pm _________________________________________________________________ Windows Live Hotmail is the next generation of MSN Hotmail.? It?s fast, simple, and safer than ever and best of all ? it?s still free. Try it today! www.newhotmail.ca?icid=WLHMENCA146 From jim_graham at sympatico.ca Mon May 21 09:38:28 2007 From: jim_graham at sympatico.ca (Jim Graham) Date: Mon, 21 May 2007 12:38:28 -0400 Subject: [tpm] Subroutine arcana In-Reply-To: <44858.74.12.145.206.1179764298.squirrel@webmail.vex.net> Message-ID: <002901c79bc6$76e9c450$1901a8c0@mecano> Hi Thanks for the compliment :) Just to follow up on the anonymous subroutine assigned to a scalar: I saw somewhere (perl.com?) that this is a way to have private methods in a class. This is one of the complaints against Perl's OO model: all methods declared as subs are visible. This trick is one way to make private methods: my $private_method = sub { } Imagine: -------- package foo sub new { .... bless $self, $class; } my $private_method = sub {}; sub public_method { #-- call private method $private_method->( @args ); } new and public_method are visible, $private_method is not. I think this is discussed in TheDamien's Object Oriented Perl, and this thread http://www.perlmonks.org/?node_id=200102 - jim -----Original Message----- From: toronto-pm-bounces+jim_graham=sympatico.ca at pm.org [mailto:toronto-pm-bounces+jim_graham=sympatico.ca at pm.org] On Behalf Of arocker at vex.net Sent: May 21, 2007 12:18 PM To: tpm at to.pm.org Subject: Re: [tpm] Subroutine arcana Thanks to everyone for the help on this topic, especially Jim Graham for the code examples. (In any discussion of programming topics, a functioning example beats 4 aces AND a Smith & Wesson.) My mistakes were: 1. Believing what my course notes said, without verifying them. How many innocent minds have I corrupted? 2. Not replacing the 2nd Edition Camel with the 3rd, which did mention nesting subroutines. (Confirmed from a CD version.) 3. Assuming that defining an anonymous subroutine would cause it to be executed at definition time. (If you assign the result of a function to a scalar, the function gets evaluated. An anonymous subroutine definition looks like a function, but it just assigns the subroutine's reference to the scalar.) Oh well, egg is said to be good for the complexion. _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From tomr at aceldama.com Fri May 25 15:10:40 2007 From: tomr at aceldama.com (Tom Rathborne) Date: Fri, 25 May 2007 18:10:40 -0400 Subject: [tpm] Toronto job: Perl Web Application Development Lead Message-ID: <20070525221040.GA21682@aceldama.com> Hi Toronto Perl people, We're looking for someone for this position: http://jobs.perl.org/job/5784 We're also looking for intermediate (directed by the above position) and junior (basic CGI, form-to-mail, etc.) people, and I'll point those out just as soon as they make it to jobs.perl.org. As an additional benefit, you would be working with Michael Graham and Yours Truly. Cheers, Tom -- -- Tom Rathborne tomr at aceldama.com http://www.aceldama.com/~tomr/ The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed. -- Albert Einstein From Martin at Cleaver.org Fri May 25 16:39:00 2007 From: Martin at Cleaver.org (Martin at Cleaver.org) Date: Fri, 25 May 2007 19:39:00 -0400 Subject: [tpm] TWiki - Perl Wiki - Interest Group Message-ID: Hi Toronto Perl People, I just want to make it known that I run Wiki Consulting firm, one offering of which is TWiki consulting. If you have experience with TWiki please let me know: I was one of the core team for TWiki and I'm in the process of setting up a user group for it based here in Toronto. Regards and thanks, Martin Cleaver -- Martin at WikiConsulting.com MSc. MBA 416-786-6752 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20070525/b8f42f05/attachment.html From magog at the-wire.com Tue May 29 21:25:40 2007 From: magog at the-wire.com (Michael Graham) Date: Wed, 30 May 2007 00:25:40 -0400 Subject: [tpm] Meeting Thu 31 May, 2007: our @topics = () Message-ID: <20070530002540.5effa6b5@caliope> (These details are also on the TPM web site: http://to.pm.org/) The next meeting is tomorrow (Thursday, 31 May)! Like the subject says, our @topics = (); So come out to the meeting and help push, unshift and splice all manner of Perl-related things to the @topics array. Or just come for the beer afterwards. Date: Thursday 31 May 2007 Time: 6:45pm Where: 2 Bloor Street West (NW corner of Yonge/Bloor, skyscraper with the CIBC logo on top) Classroom 15 on the 8th floor =================================================================== Note: The elevators in the building are "locked down" after 5:30pm to people without building access cards. Leading up to the meeting someone will come down to the main floor lobby every few minutes to ferry people upstairs. After 19:00, you can reach the access-card-carrying guy via a cell phone number that we'll leave with security in the front lobby. The room and floor numbers will be left with security too. -- Michael Graham