From jhannah at mutationgrid.com Mon May 9 12:35:29 2011 From: jhannah at mutationgrid.com (Jay Hannah) Date: Mon, 9 May 2011 14:35:29 -0500 Subject: [Omaha.pm] Meeting tomorrow 7pm Message-ID: <1F70050D-6897-4223-A290-8A435EF1E0B2@mutationgrid.com> http://odlug.org Tuesday May 10 2011, 7pm UNO's Peter Kiewit Institute Room 375 1110 South 67th Street Omaha, NE USA Scott Hickey presenting more from "Land of Lisp" You presenting whatever you're excited about! :) (This month I'm playing hooky over at gnmug.org presenting an intro to Perl programming on Macs.) j From jscotthickey at gmail.com Mon May 9 21:20:19 2011 From: jscotthickey at gmail.com (Scott Hickey) Date: Mon, 9 May 2011 23:20:19 -0500 Subject: [Omaha.pm] [odynug] Meeting tomorrow 7pm In-Reply-To: <1F70050D-6897-4223-A290-8A435EF1E0B2@mutationgrid.com> References: <1F70050D-6897-4223-A290-8A435EF1E0B2@mutationgrid.com> Message-ID: I'm sorry I won't be able to make it tomorrow night - see you next month! Scott Hickey On Mon, May 9, 2011 at 2:35 PM, Jay Hannah wrote: > http://odlug.org > > ? Tuesday May 10 2011, 7pm > ? UNO's Peter Kiewit Institute Room 375 > ? 1110 South 67th Street Omaha, NE USA > > Scott Hickey presenting > ? ? ?more from "Land of Lisp" > You presenting > ? ? ?whatever you're excited about! :) > > (This month I'm playing hooky over at gnmug.org presenting an intro to Perl programming on Macs.) > > j > > > -- > You received this message because you are subscribed to the Google Groups "Omaha Dynamic Language User Group" group. > To post to this group, send email to odynug at googlegroups.com. > To unsubscribe from this group, send email to odynug+unsubscribe at googlegroups.com. > For more options, visit this group at http://groups.google.com/group/odynug?hl=en. > > From jhannah at mutationgrid.com Tue May 10 07:26:36 2011 From: jhannah at mutationgrid.com (Jay Hannah) Date: Tue, 10 May 2011 09:26:36 -0500 Subject: [Omaha.pm] Meeting tomorrow 7pm In-Reply-To: References: <1F70050D-6897-4223-A290-8A435EF1E0B2@mutationgrid.com> Message-ID: <1F2C1D27-B158-4F01-8A39-47468BFA3DB8@mutationgrid.com> On May 9, 2011, at 11:40 PM, Sid Mitzlaff wrote: > Too bad I'm in class tomorrow night, I'm revisiting object orientation in Perl in order to rewrite some sense into some non-OO, yet uber-obfuscated code someone else wrote.. I'd love to be able to hash over that but it might be a bit early in the process. I'll be able to make the meeting in June though... How familiar are you with Moose? It's The Way to do OO perl nowadays. I work full time for the Moose cabal now. I'm no guru, but I can present intro stuff if you like. Or you can present your questions/problems and I can demo out my $0.02. :) Are you on the Omaha Perl Mongers mailing list? http://omaha.pm.org Cheers, Jay Hannah Software Architect jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782 aka Jay Hannah Senior Developer / Consultant http://www.iinteractive.com Email: jay.hannah at iinteractive.com From sidtbird at gmail.com Tue May 10 09:03:44 2011 From: sidtbird at gmail.com (Sid Mitzlaff) Date: Tue, 10 May 2011 11:03:44 -0500 Subject: [Omaha.pm] [odynug] Re: Meeting tomorrow 7pm In-Reply-To: <1F2C1D27-B158-4F01-8A39-47468BFA3DB8@mutationgrid.com> References: <1F70050D-6897-4223-A290-8A435EF1E0B2@mutationgrid.com> <1F2C1D27-B158-4F01-8A39-47468BFA3DB8@mutationgrid.com> Message-ID: I haven't done much Perl for awhile so I haven't heard of Moose, but I'll check it out and it'd be cool to review what I did and what you've got going on, when we get to June. Thanks for the heads up! I'm on the PM list but I missed the reply-to-all button on my earlier msg.. Sid On Tue, May 10, 2011 at 9:26 AM, Jay Hannah wrote: > On May 9, 2011, at 11:40 PM, Sid Mitzlaff wrote: > > Too bad I'm in class tomorrow night, I'm revisiting object orientation in > Perl in order to rewrite some sense into some non-OO, yet uber-obfuscated > code someone else wrote.. I'd love to be able to hash over that but it might > be a bit early in the process. I'll be able to make the meeting in June > though... > > How familiar are you with Moose? It's The Way to do OO perl nowadays. > > I work full time for the Moose cabal now. I'm no guru, but I can present > intro stuff if you like. Or you can present your questions/problems and I > can demo out my $0.02. :) > > Are you on the Omaha Perl Mongers mailing list? http://omaha.pm.org > > Cheers, > > Jay Hannah > Software Architect > jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782 > > > aka > > Jay Hannah > Senior Developer / Consultant > http://www.iinteractive.com > Email: jay.hannah at iinteractive.com > > > -- > You received this message because you are subscribed to the Google Groups > "Omaha Dynamic Language User Group" group. > To post to this group, send email to odynug at googlegroups.com. > To unsubscribe from this group, send email to > odynug+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/odynug?hl=en. > > -- Sid Mitzlaff http://sidthunderbird.blogspot.com Synchronicities are the jokers in nature's pack of cards for they refuse to play by the rules and offer a hint that, in our quest for certainty about the universe, we may have ignored some vital clues. - F. David Peat -------------- next part -------------- An HTML attachment was scrubbed... URL: From bkealey at mail.unomaha.edu Tue May 10 12:01:42 2011 From: bkealey at mail.unomaha.edu (Burch Kealey) Date: Tue, 10 May 2011 14:01:42 -0500 Subject: [Omaha.pm] AUTO: Burch Kealey is out of the office (returning Mon 05/16/2011) Message-ID: I am out of the office from Thu 05/05/2011 until Mon 05/16/2011. We are on a family trip to California. I am going to try to monitor my email but my six year old has extracted some tough promises. Please expect some delays during this time period. Note: This is an automated response to your message "Omaha-pm Digest, Vol 85, Issue 1" sent on 5/10/2011 2:00:12 PM. This is the only notification you will receive while this person is away. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhannah at mutationgrid.com Thu May 12 18:00:06 2011 From: jhannah at mutationgrid.com (Jay Hannah) Date: Thu, 12 May 2011 20:00:06 -0500 Subject: [Omaha.pm] DBIx::Class (SQL::Abstract) Message-ID: <77D48FCD-D464-4CDA-837D-0316A6D3F77E@mutationgrid.com> Is it scary that I'm getting used to this stuff now? Jay Hannah Software Architect jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782 Catalyst action snippet: while (++$i) { my $skill = $c->req->param("skill_id_$i"); my $score = $c->req->param("score_id_$i"); last unless ($skill); last if ($skill =~ /^-- /); push @where_skills, { skill_id => $skill, score => { '>=', $score }, }; } my $where = { active => 1, -or => [ @where_skills ], }; $c->log->debug(Dumper($where)); $search = $c->model('DB::Rating')->search($where); The Dumper output: '-or' => [ { 'skill_id' => '71', 'score' => { '>=' => '0' } }, { 'skill_id' => '70', 'score' => { '>=' => '0' } }, { 'skill_id' => '74', 'score' => { '>=' => '0' } } ], 'active' => 1 The SQL search() runs: SELECT me.id, me.person_id, me.skill_id, me.rater_id, me.score, me.active, me.date_created, me.date_updated FROM rating me WHERE ( ( ( ( score >= ? AND skill_id = ? ) OR ( score >= ? AND skill_id = ? ) OR ( score >= ? AND skill_id = ? ) ) AND active = ? ) ): '0', '71', '0', '70', '0', '74', '1' tee-hee! :) From pbaker0804 at gmail.com Fri May 13 05:40:38 2011 From: pbaker0804 at gmail.com (pbaker0804) Date: Fri, 13 May 2011 07:40:38 -0500 Subject: [Omaha.pm] Moose::Meta::Attribute::Native::Trait::Array (mouthful) object sorting by attributes Message-ID: I have an guest object that stores information. It has several attributes, including an array of stay history records that are Moose::Meta::Attribute::Native::Trait::Array objects. I wanted a special handler method on it that always sorted the stay objects in "EndDate" order. I also needed to display all this info in a Template::Toolkit template. My Moose config for the "StayHistory" object ended up like this in the parent class: ... has 'StayHistory' => ( # Moose::Meta::Attribute::Native::Trait::Array traits => ['Array'], # of Omni2::Control::OWS::HotelReservation objects is => 'ro', isa => 'ArrayRef[Object]', default => sub { [] }, handles => { all_stays => 'elements', add_stay => 'push', map_stays => 'map', filter_stay => 'grep', find_stay => 'first', get_stay => 'get', join_stays => 'join', count_stays => 'count', has_stays => 'count', has_no_stays => 'is_empty', sorted_stays => [ sort => sub { $_[1]->EndDate cmp $_[0]->EndDate } ], }, ); ... Here's my actual StayHistory Moose attributes, any of which can be sorted on using the above method: package Omni2::Control::OWS::StayHistory; use Moose; has '_twig' => (is => 'rw', isa => 'Object', required => 1); # XML::Twig::Elt has 'site' => (is => 'rw', isa => 'Str', default=>'OM'); has 'UniqueID' => (is => 'rw', isa => 'Str'); has 'StartDate' => (is => 'rw', isa => 'Str'); has 'EndDate' => (is => 'rw', isa => 'Str'); has 'hotelCode' => (is => 'rw', isa => 'Str'); has 'Base' => (is => 'rw', isa => 'Str'); has 'Total' => (is => 'rw', isa => 'Str'); has 'currencyCode' => (is => 'rw', isa => 'Str'); has 'ADULT' => (is => 'rw', isa => 'Str'); has 'CHILD' => (is => 'rw', isa => 'Str'); ... All I had to do was add a FOREACH in TT and use the "sorted_stays" method above: ... [% FOREACH row IN sg.sorted_stays %] OM [% row.UniqueID %] [% row.hotelCode %] [% row.StartDate %] [% row.EndDate %] [% row.ADULT %] [% row.CHILD %] [% row.Base %] [% row.Total %] [% row.currencyCode %] [% END %] ... Easy! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Tue May 17 15:28:16 2011 From: jay at jays.net (Jay Hannah) Date: Tue, 17 May 2011 17:28:16 -0500 Subject: [Omaha.pm] Perl 5.14.0 released Message-ID: http://lwn.net/Articles/442938/ And I got an author credit again! Ha! :) Anyone installed this yet? j From topher-pm at zyp.org Tue May 17 16:17:10 2011 From: topher-pm at zyp.org (Christopher Cashell) Date: Tue, 17 May 2011 18:17:10 -0500 Subject: [Omaha.pm] Perl 5.14.0 released In-Reply-To: References: Message-ID: On Tue, May 17, 2011 at 5:28 PM, Jay Hannah wrote: > http://lwn.net/Articles/442938/ > > And I got an author credit again! Ha! ? ?:) > > Anyone installed this yet? Not me . . . But, my answer will be different in a few minutes. ;-) topher at nexus:~$ perlbrew install perl-5.14.0 Attempting to load conf from /home/perl-fu/perl5/perlbrew/Conf.pm Fetching perl-5.14.0 as /home/perl-fu/perl5/perlbrew/dists/perl-5.14.0.tar.gz Installing perl-5.14.0 into /home/perl-fu/perl5/perlbrew/perls/perl-5.14.0 [ . . . ] perlbrew rocks. ;-) > j -- Christopher From jay at jays.net Wed May 18 09:05:05 2011 From: jay at jays.net (Jay Hannah) Date: Wed, 18 May 2011 11:05:05 -0500 Subject: [Omaha.pm] YAPC::NA 2011 Message-ID: <3D0ED9F0-F706-4986-BAC8-BA0E3A3466E9@jays.net> Am I the only cat representin' the big O again?? http://www.yapc2011.us/yn2011/stats Y'all are missing out. Again. :) j From jhannah at mutationgrid.com Tue May 31 13:10:18 2011 From: jhannah at mutationgrid.com (Jay Hannah) Date: Tue, 31 May 2011 15:10:18 -0500 Subject: [Omaha.pm] use POSIX qw(ceil); Message-ID: Hey, ceil() sure is handy. People tend to register for conferences at the last minute so I need to apply a ratio multiplier to the numbers I already have to tell the print shop what to print. ceil() rounds up for me. :) https://github.com/perigrin/YAPC-NA-2011/blob/master/asheville_businesses/shirts.pl $ ./shirts.pl 143 sizes are declared. The target is 350, so we're multiplying by 2.4 and then rounding up. 5 4XL 76 L 3 L (W) 81 M 3 M (W) 10 S 5 S (W) 96 XL 5 XL (W) 13 XLT 5 XS 3 XS (W) 18 XXL 8 XXL (W) 13 XXLT 13 XXXL New total is 357 IRC++ CPAN++ POSIX++ :) Jay Hannah Software Architect jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782 From britt.c.gray at gmail.com Tue May 31 14:11:06 2011 From: britt.c.gray at gmail.com (Britt Gray) Date: Tue, 31 May 2011 16:11:06 -0500 Subject: [Omaha.pm] use POSIX qw(ceil); In-Reply-To: References: Message-ID: Nice! On Tue, May 31, 2011 at 3:10 PM, Jay Hannah wrote: > Hey, ceil() sure is handy. People tend to register for conferences at the > last minute so I need to apply a ratio multiplier to the numbers I already > have to tell the print shop what to print. > > ceil() rounds up for me. :) > > > https://github.com/perigrin/YAPC-NA-2011/blob/master/asheville_businesses/shirts.pl > > $ ./shirts.pl > 143 sizes are declared. The target is 350, so we're multiplying by 2.4 and > then rounding up. > 5 4XL > 76 L > 3 L (W) > 81 M > 3 M (W) > 10 S > 5 S (W) > 96 XL > 5 XL (W) > 13 XLT > 5 XS > 3 XS (W) > 18 XXL > 8 XXL (W) > 13 XXLT > 13 XXXL > New total is 357 > > IRC++ CPAN++ POSIX++ :) > > Jay Hannah > Software Architect > jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782 > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: