From mike at stok.ca Sun May 2 13:53:27 2010 From: mike at stok.ca (Mike Stok) Date: Sun, 2 May 2010 16:53:27 -0400 Subject: [tpm] Fwd: [pm_groups] Business Awareness of the Perl programmers References: Message-ID: I don't know how many of you are familiar with LinkedIn. If you're interested in raising Perl's profile then read on. Mike Begin forwarded message: > ---------- Forwarded message ---------- > From: Gabor Szabo > Date: Sat, May 1, 2010 at 5:49 PM > Subject: [pm_groups] Business Awareness of the Perl programmers > To: PM Groups > > > I did a small research checking the size of the LinkedIN > groups of the various programming languages. > The conclusion is that the Perl group is way behind the > other languages. > > http://szabgab.com/blog/2010/05/1272792637.html > > It think it would be time to send out a call to all the PM groups, > tell them about LinkedIN and about the Perl Monger group > on LinkedIN and how they can join it: > > http://www.linkedin.com/groups?gid=40830 > > regards > Gabor > > _______________________________________________ > Boston-pm mailing list > Boston-pm at mail.pm.org > http://mail.pm.org/mailman/listinfo/boston-pm -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arocker at vex.net Fri May 7 07:56:27 2010 From: arocker at vex.net (arocker at vex.net) Date: Fri, 7 May 2010 10:56:27 -0400 Subject: [tpm] Little-known female computer pioneer Message-ID: I just found out about a female pioneer in computing, with links to Toronto, called Beatrice Worsley. http://webdocs.cs.ualberta.ca/~smillie/ComputerAndMe/Part07.html Presumably, her early death (at 52), kept her from being better known. From sfryer at sourcery.ca Fri May 7 21:46:12 2010 From: sfryer at sourcery.ca (Shaun Fryer) Date: Sat, 8 May 2010 00:46:12 -0400 Subject: [tpm] modifying methods per instance Message-ID: Does anyone know an easy way to 'attach' *different* sets of methods to two *instances* of the same package? Right now I'm doing something like this fairly simplified example below. sub _attach_methods { my ($self, @aVars) = @_; my $class = ref $self; for my $sVar (@aVars) { *{ $class .'::'. $sVar } = sub { my $o = shift; return $o->{$sVar} if $o->{$sVar}; $o->{$sVar} = $self->_get_var($sVar); return $o->{$sVar}; }; } } $instance_1->_attach_methods(qw( foo bar)); $instance_2->_attach_methods(qw( baz quux )); The challenge is that @aVars above will (necessarily) be different for each instance according to a database driven chain of relations. In fact there are more than one _attach_methods() style operations being done (ie. _attach_these(), _attach_those() ), where each instance may have the same method names available, but each with different functionality. Unfortunately, at present when I add a colliding method name to an instance, it's the parent package method which gets over-written, thereby changing the functionality of the named method for all instances of the class at once, rather than just the one instance I'm specifically intending to manipulate. I've looked into using Moose/Class:MOP::Instance->meta->add_method(...), but I think it suffers from the same issue since it falls back to Class::MOP::Class. Any ideas, or am I going to need to resort to dynamically generating unique package suffixes for each instance? Cheers, -- Shaun Fryer -------------- next part -------------- An HTML attachment was scrubbed... URL: From abram.hindle at softwareprocess.es Fri May 7 23:17:54 2010 From: abram.hindle at softwareprocess.es (Abram Hindle) Date: Sat, 8 May 2010 02:17:54 -0400 (EDT) Subject: [tpm] modifying methods per instance In-Reply-To: (sfid-20100508_004904_880294_94C972E7) References: (sfid-20100508_004904_880294_94C972E7) Message-ID: I have not tried this. I bet you can get MOOSE to do it. What I'd try is to generate a new package where the previous class is used as base for that class. I'd define those methods within that package and then rebless the instance. Make a Gensym sub that can test for existence and then return a random package name; you could generate code like this: package SoAndSo::Prototype::Gensym::XYZABC use base qw(SoAndSo); *SoAndSo::Prototype::Gensym::XYZABC = $method1; *SoAndSo::Prototype::Gensym::XYZABC = $method2; ... bless("SoAndSo::Prototype::Gensym::XYZABC",$instance1); Alternatively, use delegation. Set a dispatch hash and catch it using anonymous, so you don't have to play any type games. abram On Sat, 8 May 2010, Shaun Fryer wrote: > Does anyone know an easy way to 'attach' *different* sets of methods to two > *instances* of the same package? > > Right now I'm doing something like this fairly simplified example below. > > sub _attach_methods { > my ($self, @aVars) = @_; > my $class = ref $self; > for my $sVar (@aVars) { > *{ $class .'::'. $sVar } = sub { > my $o = shift; > return $o->{$sVar} if $o->{$sVar}; > $o->{$sVar} = $self->_get_var($sVar); > return $o->{$sVar}; > }; > } > } > $instance_1->_attach_methods(qw( foo bar)); > $instance_2->_attach_methods(qw( baz quux )); > > > The challenge is that @aVars above will (necessarily) be different for each > instance according to a database driven chain of relations. In fact there > are more than one _attach_methods() style operations being done (ie. > _attach_these(), _attach_those() ), where each instance may have the same > method names available, but each with different functionality. > > Unfortunately, at present when I add a colliding method name to an instance, > it's the parent package method which gets over-written, thereby changing the > functionality of the named method for all instances of the class at once, > rather than just the one instance I'm specifically intending to manipulate. > I've looked into using Moose/Class:MOP::Instance->meta->add_method(...), but > I think it suffers from the same issue since it falls back to > Class::MOP::Class. > > Any ideas, or am I going to need to resort to dynamically generating unique > package suffixes for each instance? > > Cheers, > -- > Shaun Fryer > From uri at StemSystems.com Fri May 7 23:25:43 2010 From: uri at StemSystems.com (Uri Guttman) Date: Sat, 08 May 2010 02:25:43 -0400 Subject: [tpm] modifying methods per instance In-Reply-To: (Abram Hindle's message of "Sat\, 8 May 2010 02\:17\:54 -0400 \(EDT\)") References: Message-ID: <87zl0azz88.fsf@quad.sysarch.com> >>>>> "AH" == Abram Hindle writes: AH> I have not tried this. I bet you can get MOOSE to do it. AH> What I'd try is to generate a new package where the previous class is used as base for that class. AH> I'd define those methods within that package and then rebless the instance. AH> Make a Gensym sub that can test for existence and then return a random package name; AH> you could generate code like this: AH> package SoAndSo::Prototype::Gensym::XYZABC AH> use base qw(SoAndSo); AH> *SoAndSo::Prototype::Gensym::XYZABC = $method1; AH> *SoAndSo::Prototype::Gensym::XYZABC = $method2; AH> bless("SoAndSo::Prototype::Gensym::XYZABC",$instance1); just use the reference itself as the package name. it is guaranteed to be unique. bless the object into its own class, set the @ISA to look at the parent class. this is basically what stuff like class::classless does. every object is its own class and has its own @ISA, namespace and methods. you can still inherit as you wish by controlling @ISA. something like: my $package = "$obj" ; bless $obj, $package ; @{"${package}::ISA"} = $parent_class ; # no strict refs for this *{"${package}::$method"} = sub { print "i am a method of $package" } ; much simpler than all the code so far. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From sfryer at sourcery.ca Fri May 7 23:37:39 2010 From: sfryer at sourcery.ca (Shaun Fryer) Date: Sat, 8 May 2010 02:37:39 -0400 Subject: [tpm] modifying methods per instance In-Reply-To: <87zl0azz88.fsf@quad.sysarch.com> References: <87zl0azz88.fsf@quad.sysarch.com> Message-ID: I found an alternate solution! I used a dispatch table within each instance, and then created a single accessor method to execute the respective code ref. Took a bit of tweaking, but works like a charm! Thanks for the ideas guys. Both good, and potentially useful for future/different situations. Cheers, -- Shaun Fryer On Sat, May 8, 2010 at 2:25 AM, Uri Guttman wrote: > >>>>> "AH" == Abram Hindle writes: > > AH> I have not tried this. I bet you can get MOOSE to do it. > > AH> What I'd try is to generate a new package where the previous class is > used as base for that class. > > AH> I'd define those methods within that package and then rebless the > instance. > > AH> Make a Gensym sub that can test for existence and then return a random > package name; > > AH> you could generate code like this: > AH> package SoAndSo::Prototype::Gensym::XYZABC > > AH> use base qw(SoAndSo); > > AH> *SoAndSo::Prototype::Gensym::XYZABC = $method1; > AH> *SoAndSo::Prototype::Gensym::XYZABC = $method2; > > > AH> bless("SoAndSo::Prototype::Gensym::XYZABC",$instance1); > > just use the reference itself as the package name. it is guaranteed to > be unique. bless the object into its own class, set the @ISA to look at > the parent class. this is basically what stuff like class::classless > does. every object is its own class and has its own @ISA, namespace and > methods. you can still inherit as you wish by controlling @ISA. > > something like: > > my $package = "$obj" ; > bless $obj, $package ; > @{"${package}::ISA"} = $parent_class ; # no strict refs for this > > *{"${package}::$method"} = sub { print "i am a method of $package" } > ; > > much simpler than all the code so far. > > uri > > -- > Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com-- > ----- Perl Code Review , Architecture, Development, Training, Support > ------ > --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com--------- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From uri at StemSystems.com Fri May 7 23:59:19 2010 From: uri at StemSystems.com (Uri Guttman) Date: Sat, 08 May 2010 02:59:19 -0400 Subject: [tpm] modifying methods per instance In-Reply-To: (Shaun Fryer's message of "Sat\, 8 May 2010 02\:37\:39 -0400") References: <87zl0azz88.fsf@quad.sysarch.com> Message-ID: <87iq6yzxo8.fsf@quad.sysarch.com> >>>>> "SF" == Shaun Fryer writes: SF> I found an alternate solution! I used a dispatch table within each SF> instance, and then created a single accessor method to execute the SF> respective code ref. Took a bit of tweaking, but works like a SF> charm! Thanks for the ideas guys. Both good, and potentially SF> useful for future/different situations. that pretty much is the same thing as my answer but you have an explicit dispatch table vs the implied one with the symbol table and the unique namespace of the ref. yours will require more coding IMO. also you could use class::classless or other class per instance modules for this. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From mike at stok.ca Thu May 13 12:12:00 2010 From: mike at stok.ca (Mike Stok) Date: Thu, 13 May 2010 15:12:00 -0400 Subject: [tpm] Looking for speakers for June 24, 2010 meeting Message-ID: I'm looking for one or more speakers for the June meeting. June 24, 2010 is the day after YAPC::NA, so it's likely to be a small meeting - a perfect opportunity to practice speaking if the normal huge audience unnerves you! I'm confident we'll have a talk for June, as it ought to be prime socializing weather. Contact me on- or off-list if you want to do a talk or even if you have an idea for something you'd like to hear about. Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Thu May 20 09:05:38 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Thu, 20 May 2010 12:05:38 -0400 Subject: [tpm] Fwd: Perl Survey 2010 In-Reply-To: <117165.50519.qm@web33304.mail.mud.yahoo.com> References: <117165.50519.qm@web33304.mail.mud.yahoo.com> Message-ID: Take some time to complete the Perl survey: http://blogs.perl.org/users/holy_zarquons_singing_fish/2010/05/the-perl-survey-2010-is-ready-for-you-to-complete.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From rburko at eliteanswers.com Thu May 20 06:10:38 2010 From: rburko at eliteanswers.com (Robert Burko) Date: Thu, 20 May 2010 09:10:38 -0400 Subject: [tpm] Perl Developer Job Opening in Toronto Message-ID: <002c01caf81d$d78f8e50$86aeaaf0$@com> Hello Members of the Toronto Perl Mongers, We have a new job opening for a Perl developer and, as always, my first action is to present it to this loyal Perl community. The details are below. Please do not hesitate to ask if you have any questions. [Thank you in advance for posting this to your mailing list!] ---- Perl Programmer/Developer Elite Answers is once again seeking a bright and motivated Perl programmer. Join the talented team at one of Canada's Top 25 Up & Coming IT Companies* where you will get to develop cutting-edge software, make decisions, manage projects, and have a big impact with your valued contributions right from the get go. We are looking for some who can think big, dream big, and execute with confidence. Our culture is fun and laid back, but our expectations are high. In return for your hard work and drive to succeed, we offer competitive pay, comprehensive flex benefits, and many accelerated growth opportunities. If you meet the requirements below and think you have what it takes to be Elite, send your resume and cover letter to jobs at eliteanswers.com. REQUIRED SKILLS ================= - Object Oriented Perl - Familiarity with CPAN - MySQL (query formulation mostly) - Javascript - HTML - Hard working BONUS SKILLS ============= - ORMs like Rose::DB, Class::DBI, etc. - MVC Frameworks (like Mojo, Catalyst, CGI::Application) - jQuery - HTML/CSS - Design / Photoshop About Elite Answers Inc. Elite Answers is a leading provider of software as a service (SaaS) business solutions. Our flagship program, Elite Email, has won several awards and was recently ranked #19 in Website Magazine's list of Top 50 Email Marketing Programs across the globe. Our client list includes ReMax, Sauza Tequila, Botox, SunTV, and many others. Elite Answers is headquartered in Toronto, Canada. Elite Answers is an equal opportunity employer. * Source: Branham Group Inc - Canada's Top 300 Tech Companies, 2007 From mike at stok.ca Fri May 21 10:38:01 2010 From: mike at stok.ca (Mike Stok) Date: Fri, 21 May 2010 13:38:01 -0400 Subject: [tpm] Fwd: UG News: *Free to Choose* Ebook Deal of the Day. Any O'Reilly ebook. Only $9.99. References: <1274461902.2205.0.761261@post.oreilly.com> Message-ID: <2258F2DC-A1D4-4769-B332-F2082F221F8D@stok.ca> One day offer from O'Reilly for ebooks. Mike If you cannot read the information below, click here. Free to Choose Ebook Deal of the Day ? Only $9.99 Our Ebook Deal of the Day is so popular, we want to make sure you know about it, and give you the chance to choose. Download in 4 DRM-free formats: PDF, .epub, Kindle-compatible .mobi, and Android .apk. Learn more. Only $9.99. Choose any O'Reilly ebook from our list of over 2,000 titles. (Microsoft Press titles are excluded from this offer.) Enter code FAVFA in the O'Reilly cart. One Day Only: 5/21/2010 Spreading the knowledge of innovators oreilly.com -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at stok.ca Tue May 25 09:58:55 2010 From: mike at stok.ca (Mike Stok) Date: Tue, 25 May 2010 12:58:55 -0400 Subject: [tpm] Meeting - May 27, 18:45. Perl and phones Message-ID: <3F0D87C8-9866-4A8E-9437-52232C0A7670@stok.ca> See http://to.pm.org. Date: Thu 27 May 2010 18:45 EDT Venue: Nexient, classroom 3, 12th floor Topic: Perl and Phones Synopsis: This month's theme is Perl and phones. Scott Elcomb: Perl on Android Olaf Anders and Mark Jubenville: CPAN POD on an iPhone Location: 2 Bloor Street West, (usually) 8th or 16th floor. The room number will be announced on the mailing list a few days before the meeting. It will also be left with the security desk in the building (main floor lobby) shortly before the meeting starts (i.e. around 6pm). Time: 6:45 p.m. Directions: This building is on the north-west corner of Bloor and Yonge, accessible by subway from Bloor station. Pay parking is also ample in this area. Security 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. There will be a number of scheduled trips: ? 17:30 ? 18:00 ? 18:30 ? 18:45 ? 19:00 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. If any latecomers call up there will be a final group elevator run at 19:10. After that, access will be ad-hoc; call up from security and somebody will try to come down and let you up. -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Wed May 26 09:44:45 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Wed, 26 May 2010 12:44:45 -0400 Subject: [tpm] graphviz Message-ID: Does anyone have experience using (the perl interface) to graphviz? the base system allows you to specify multiple label to nodes and apparently specify the compass point to 'place the label' but the perl interface doesn't mention how to specify this option. It only talks about 'multiple labels'. Is this question too terse? Not if you've played with graphviz. TIA Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: From psema4 at gmail.com Thu May 27 09:11:13 2010 From: psema4 at gmail.com (Scott Elcomb) Date: Thu, 27 May 2010 12:11:13 -0400 Subject: [tpm] Meeting - May 27, 18:45. Perl and phones In-Reply-To: <3F0D87C8-9866-4A8E-9437-52232C0A7670@stok.ca> References: <3F0D87C8-9866-4A8E-9437-52232C0A7670@stok.ca> Message-ID: On Tue, May 25, 2010 at 12:58 PM, Mike Stok wrote: > See http://to.pm.org. > Date:?Thu 27 May 2010 18:45 EDT > Venue:?Nexient, classroom 3, 12th floor > Topic:?Perl and Phones > Synopsis: > This month's theme is Perl and phones. > > Scott Elcomb: Perl on Android > Olaf Anders and Mark Jubenville: CPAN POD on an iPhone It's with a fair amount of regret that I must withdraw from presenting tonight as I am physically unable to attend. I apologize for this very late notice and hope there might be space in June or July to give the Perl on Android talk. Sincerely, - Scott. -- Scott Elcomb http://www.psema4.com/ @psema4 Member of the Pirate Party of Canada http://www.pirateparty.ca/ From jztam at yahoo.com Mon May 31 09:52:03 2010 From: jztam at yahoo.com (J Z Tam) Date: Mon, 31 May 2010 09:52:03 -0700 (PDT) Subject: [tpm] RFI: Installing Catalyst::* and all dependencies on WinXPPro , has anyone succeeded / failed? It looks huge In-Reply-To: References: <3F0D87C8-9866-4A8E-9437-52232C0A7670@stok.ca> Message-ID: <964261.23300.qm@web57614.mail.re1.yahoo.com> Mongeren, This Catalyst::* package space looks huge and I don't have high confidence in WindowsXPPro. So if someone's got the cheatsheet for known-working WinTel platforms, please share tips, traps, gotchas. TIA /jordan From stuart at morungos.com Mon May 31 10:23:31 2010 From: stuart at morungos.com (Stuart Watt) Date: Mon, 31 May 2010 13:23:31 -0400 Subject: [tpm] RFI: Installing Catalyst::* and all dependencies on WinXPPro , has anyone succeeded / failed? It looks huge In-Reply-To: <964261.23300.qm@web57614.mail.re1.yahoo.com> References: <3F0D87C8-9866-4A8E-9437-52232C0A7670@stok.ca> <964261.23300.qm@web57614.mail.re1.yahoo.com> Message-ID: <4C03F093.5000005@morungos.com> On 5/31/2010 12:52 PM, J Z Tam wrote: > Mongeren, > This Catalyst::* package space looks huge and I don't have high confidence in WindowsXPPro. So if someone's got the cheatsheet for known-working WinTel platforms, please share tips, traps, gotchas. > TIA /jordan > Yes, it does work well, even on XP/Windows. I use a MinGW self-built Perl, and I removed fork(), which means I get a few test errors from some of the Test::WWW::Mechanize stuff, but I usually force those modules. Here are a few thoughts. 1. Strawberry Professional should have all (most of) you need, so that might be an option 2. Catalyst is very dependent on Moose, if you can't get Moose running, then you can forget Catalyst 3. If you get that far, try installing Catalyst::Runtime - yes there are many dependencies but most are simple and reliable. 4. The rest depends on which components you use. I tend to use Catalyst::View::TT, Catalyst::View::JSON, Catalyst::Model::Adaptor, and Catalyst::Model::DBIC::Schema. These will need DBI and a DBD, but that's enough for a minimal application. Traps: a few test errors might well happen on Windows and I tend to check the code and judiciously ignore issues that appear not to be relevant. Having said that, I've managed to compile Perl and built Catalyst on it four times, ranging from 5.8 to 5.12, and it's all been fairly straightforward in the end. We have far more problems with XML parsers and other stuff. We're working on 64-bit. The MinGW64 build does kind of work, but needs more stability. So for now we're sticking with 32-bit stuff. The other "gotcha" is hosting. We use FastCGI on IIS in production, mostly because our clients insist on it. This is possible, but IIS has a few issues. IIS5 doesn't work great yet, and I have a patch for this, but haven't had a chance to test it on IIS7 before committing into Catalysrt::Runtime. IIS6 works well, but you'll need the C/XS module FCGI for that. Catalyst does have a start-up lag on Windows. Normally, you would use preforking on UNIX systems to cache a prepared process. Windows emulates fork() and I've not tested this out that well. I'd be nervous about this on Windows, but using multiple worker processes works fine for FastCGI. Once your processes are started, Catalyst's performance is really pretty good - even on Windows. The Catalyst mailing list is good but a little twitchy, especially if people ask questions really belonging to DBIx::Class (which is really underneath Catalyst::Model::DBIC::Schema). They like people prepared to contribute, but are very sensitive about criticism. The positive: where I worked used to use ActiveState and it's "PerlEx" crappy clone of Apache::Register/mod_perl. FastCGI works *very* well for us, giving us very reasonable performance, even considering a lot of hosting options (e.g., preforking) are not anything like as easy on Windows. As a previous Java+Spring user, Catalyst has a very similar set of advantages, and has been invaluable upgrading an old system, as we managed to embed legacy components by wrapping them. All the best Stuart