From dthacker9 at cox.net Mon Sep 1 18:33:54 2008 From: dthacker9 at cox.net (Dave Thacker) Date: Mon, 1 Sep 2008 20:33:54 -0500 Subject: [Omaha.pm] What's that structure name? Message-ID: <200809012033.54753.dthacker9@cox.net> When doing this: $sth->execute() or die "Couldn't execute statement: $DBI::errstr; stopped"; while (my ($name, $age, $st, $tk, $ps, $sh ) = $sth->fetchrow_array() ) { print "$name, $age, $st, $tk, $ps, $sh \n"; } How do I refer to that array if I want to send it into a sub? Or do I need to assign it to an array of my own..... Dave From dan at linder.org Tue Sep 2 08:54:25 2008 From: dan at linder.org (Dan Linder) Date: Tue, 2 Sep 2008 10:54:25 -0500 Subject: [Omaha.pm] What's that structure name? In-Reply-To: <200809012033.54753.dthacker9@cox.net> References: <200809012033.54753.dthacker9@cox.net> Message-ID: <3e2be50809020854y7c645442jc714c8166ab2ddb9@mail.gmail.com> On Mon, Sep 1, 2008 at 8:33 PM, Dave Thacker wrote: > How do I refer to that array if I want to send it into a sub? Or do I need > to > assign it to an array of my own..... > While there might be a Perl way to retrieve that old array ( "@_" ?), I'd probably go with a temporary array variable, then split it out as needed within the while statement. Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Tue Sep 2 10:06:00 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 2 Sep 2008 12:06:00 -0500 Subject: [Omaha.pm] What's that structure name? In-Reply-To: <200809012033.54753.dthacker9@cox.net> References: <200809012033.54753.dthacker9@cox.net> Message-ID: On Sep 1, 2008, at 8:33 PM, Dave Thacker wrote: > while (my ($name, $age, $st, $tk, $ps, $sh ) = $sth->fetchrow_array > () ) { > print "$name, $age, $st, $tk, $ps, $sh \n"; > } > > How do I refer to that array if I want to send it into a sub? Or > do I need to > assign it to an array of my own..... You don't have an array there, you just have a list. You can create an array called @row if you want, and pass that to your sub: while (my @row = $sth->fetchrow_array()) { my_sub(@row); } sub my_sub { my (@row) = @_; print join ", ", @row; print "\n"; } HTH, j From jay at jays.net Tue Sep 2 10:17:50 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 2 Sep 2008 12:17:50 -0500 Subject: [Omaha.pm] CSV and core modules. In-Reply-To: <48AED310.9050103@jays.net> References: <3e2be50808220746h4e6528bbla69adf9981620d2c@mail.gmail.com> <48AED310.9050103@jays.net> Message-ID: <926CAA64-914F-470C-9664-419428873014@jays.net> Dan Linder wrote: > I'm working on a project that will pull in data from CSV files. The > old version of the program does all the CSV processing itself (i.e. > split(/,/, $line). Oh, looks like my most recent project actually uses Text::LooseCSV: http://search.cpan.org/~rsandberg/Text-LooseCSV-1.6/lib/Text/LooseCSV.pm "Why another variable-length text record parser? I've had the privilege to parse some of the gnarliest data ever seen and everything else I tried on CPAN choked (at the time I wrote this module). This module has been munching on millions of records of the filthiest data imaginable at several production sites so I thought I'd contribute..." :) HTH, j From jay at jays.net Tue Sep 2 13:43:56 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 2 Sep 2008 15:43:56 -0500 Subject: [Omaha.pm] Text::FixedWidth Message-ID: Sweet, I'm a CPAN author now: http://search.cpan.org/~jhannah/Text-FixedWidth-0.01/lib/Text/ FixedWidth.pm Planned for version 0.02: - A META.yml file to enforce dependencies on Carp, Test::More, Test::Warn - POD changes to search.cpan.org hot-links to other modules in ALTERNATIVES - whatever the smokers report. :) Photo should show up on search.cpan.org tomorrow, just for fun. Source is in SVN: $ svn co https://clabsvn.ist.unomaha.edu/anonsvn/user/jhannah/Text- FixedWidth I've a few credits in CPAN, but this is my first module owned by me. Module::Starter is cool. Woo-hoo! j From jay at jays.net Wed Sep 3 10:11:12 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 3 Sep 2008 12:11:12 -0500 Subject: [Omaha.pm] The many faces of return; Message-ID: <6A40C083-205B-40F5-996A-611E2A89CAA4@jays.net> I got hung up on "return false" today. Apparently "return false" is common lingo for return; or return (); which are both guaranteed to be false in scalar or array context. As opposed to return undef; or return 0; which are false in scalar context, but true in array context. Fun, huh? :) j $ cat perl_return_and_context.t use Test::More tests => 8; foreach my $sub (qw( return_0 return_undef return_empty_list return_semi_colon )) { my $ret = &$sub(); ok(! $ret, "$sub in scalar context"); my @ret = &$sub(); ok(! @ret, "$sub in array context"); &$sub(); } sub return_0 { #print_context(wantarray); return 0; } sub return_undef { #print_context(wantarray); return undef; } sub return_empty_list { #print_context(wantarray); return (); } sub return_semi_colon { #print_context(wantarray); return; } sub print_context { my ($wantarray) = @_; if (not defined $wantarray) { print "[void]"; } elsif ($wantarray) { print "[list]"; } else { print "[scalar]"; } } $ perl perl_return_and_context.t 1..8 ok 1 - return_0 in scalar context not ok 2 - return_0 in array context # Failed test 'return_0 in array context' # at perl_return_and_context.t line 9. ok 3 - return_undef in scalar context not ok 4 - return_undef in array context # Failed test 'return_undef in array context' # at perl_return_and_context.t line 9. ok 5 - return_empty_list in scalar context ok 6 - return_empty_list in array context ok 7 - return_semi_colon in scalar context ok 8 - return_semi_colon in array context # Looks like you failed 2 tests of 8. From andy at petdance.com Wed Sep 3 10:42:20 2008 From: andy at petdance.com (Andy Lester) Date: Wed, 3 Sep 2008 12:42:20 -0500 Subject: [Omaha.pm] The many faces of return; In-Reply-To: <6A40C083-205B-40F5-996A-611E2A89CAA4@jays.net> References: <6A40C083-205B-40F5-996A-611E2A89CAA4@jays.net> Message-ID: <1643D299-5004-43BD-8D2E-FDC377C89DDE@petdance.com> On Sep 3, 2008, at 12:11 PM, Jay Hannah wrote: > I got hung up on "return false" today. Apparently "return false" is > common lingo for return; or return (); which are both > guaranteed to be false in scalar or array context. As opposed to > return undef; or return 0; which are false in scalar context, > but true in array context. That's one of the things that Perl::Critic catches. If you want to return failure or nothing, just use "return". See Perl Best Practices for details, or this page: http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/Subroutines/ProhibitExplicitReturnUndef.pm Returning undef upon failure from a subroutine is pretty common. But if the subroutine is called in list context, an explicit return undef; statement will return a one-element list containing (undef). Now if that list is subsequently put in a boolean context to test for failure, then it evaluates to true. But you probably wanted it to be false. sub read_file { my $file = shift; -f $file || return undef; #file doesn't exist! #Continue reading file... } #and later... if ( my @data = read_file($filename) ){ # if $filename doesn't exist, # @data will be (undef), # but I'll still be in here! process(@data); } else{ # This is my error handling code. # I probably want to be in here # if $filname doesn't exist. die "$filename not found"; } The solution is to just use a bare return statement whenever you want to return failure. In list context, Perl will then give you an empty list (which is false), and undef in scalar context (which is also false). sub read_file { my $file = shift; -f $file || return; #DWIM! #Continue reading file... } xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Sep 4 10:50:21 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 04 Sep 2008 12:50:21 -0500 Subject: [Omaha.pm] Search and replace Message-ID: <48C01FDD.5060200@jays.net> Challenge: Write this before I get around to it this afternoon sometime. :) j Objective: find $search_string in $seq and replace it with the opposite case Search is case sensitive. Two examples: search_string= att ATT seq= gaattcacccgat GAATTCACCCGAT result= gaATTcacccgat GAattCACCCGAT From andy at petdance.com Thu Sep 4 11:14:10 2008 From: andy at petdance.com (Andy Lester) Date: Thu, 4 Sep 2008 13:14:10 -0500 Subject: [Omaha.pm] Search and replace In-Reply-To: <48C01FDD.5060200@jays.net> References: <48C01FDD.5060200@jays.net> Message-ID: On Sep 4, 2008, at 12:50 PM, Jay Hannah wrote: > > search_string= att ATT > seq= gaattcacccgat GAATTCACCCGAT > result= gaATTcacccgat GAattCACCCGAT Roughly this: $seq =~ s/($search_string)/translate($1)/e; sub translate { $_[0] =~ tr/A-Z/a-z/; return $_[0]; } That should work, although there may be a slick way to do it w/o the func call. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Sep 4 11:52:50 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 04 Sep 2008 13:52:50 -0500 Subject: [Omaha.pm] Search and replace In-Reply-To: References: <48C01FDD.5060200@jays.net> Message-ID: <48C02E82.1010301@jays.net> Andy Lester wrote: > Roughly this: > > $seq =~ s/($search_string)/translate($1)/e; > > sub translate { > $_[0] =~ tr/A-Z/a-z/; > return $_[0]; > } > > That should work, although there may be a slick way to do it w/o the > func call. Ya, but it needs to go both ways. Upper to lower, and lower to upper. :) Cause that's how we roll. :) j From andy at petdance.com Thu Sep 4 11:55:27 2008 From: andy at petdance.com (Andy Lester) Date: Thu, 4 Sep 2008 13:55:27 -0500 Subject: [Omaha.pm] Search and replace In-Reply-To: <48C02E82.1010301@jays.net> References: <48C01FDD.5060200@jays.net> <48C02E82.1010301@jays.net> Message-ID: On Sep 4, 2008, at 1:52 PM, Jay Hannah wrote: > Ya, but it needs to go both ways. Upper to lower, and lower to > upper. :) $_[0] =~ tr/A-Za-z/a-zA-Z/; -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Sep 4 13:54:00 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 04 Sep 2008 15:54:00 -0500 Subject: [Omaha.pm] Search and replace In-Reply-To: References: <48C01FDD.5060200@jays.net> <48C02E82.1010301@jays.net> Message-ID: <48C04AE8.3040301@jays.net> Andy Lester wrote: > On Sep 4, 2008, at 1:52 PM, Jay Hannah wrote: >> Ya, but it needs to go both ways. Upper to lower, and lower to >> upper. :) > $_[0] =~ tr/A-Za-z/a-zA-Z/; Laugh! That's a neat trick! :) Thanks, j From dthacker9 at cox.net Thu Sep 4 18:39:50 2008 From: dthacker9 at cox.net (Dave Thacker) Date: Thu, 4 Sep 2008 20:39:50 -0500 Subject: [Omaha.pm] Fumbling with formats and IO:Handle. Message-ID: <200809042039.50784.dthacker9@cox.net> Objective. Read a list of records out of a database table and generate a series of roster files. Each file should have an identical two line header. I had some help with this over on the beginners at perl.org mailing list, but I'm stuck. I'll put the full current source after the post. My first attempt using format for the rosters would only put the header lines on the first of the roster file. format RF = @<<<<<<<<<<< @< @<< @< @< @< @< @< $name, $age, $nat, $st, $tk, $ps, $sh, $agg . format RF_TOP = Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP Inj Sus ------------------------------------------------------------------------------------------- . open (RF, ">$roster_file") or die "Can't open roster file $roster_file"; while ( ($name, $age, $nat, $st, $tk, $ps, $sh, $agg ) = $sth->fetchrow_array() ) { write RF; } close RF; It was suggested that I use IO:Handle and reset the position at zero everytime to make sure the RF_TOP was generated. That led me to this (non-working) code. format RF = @<<<<<<<<<<< @< @<< @< @< @< @< @< $name, $age, $nat, $st, $tk, $ps, $sh, $agg . format RF_TOP = Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP Inj Sus ------------------------------------------------------------------------------------------- . my $io = new IO::Handle; $io->fdopen(fileno(RF),"w"); ? $io->format_lines_left(0); while ( ($name, $age, $nat, $st, $tk, $ps, $sh, $agg ) = $sth->fetchrow_array() ) { write $io; } #close RF; undef $io; } So... what do I need to tweak to get the RF_TOP to get written at the beginning of every file? Entire program below. -----------start------------------- #!/usr/bin/perl use strict; use warnings; use DBI; use Getopt::Long; use IO::Handle; our ($opt_league, $opt_div); &GetOptions("league=s", "div=s"); print "Working on the $opt_league league, division $opt_div\n"; #connect to database my $dbh = DBI->connect("DBI:mysql:database=efl", 'root', 'Sournak0', ) or die "Can't connect to database"; #set the root directory of the installation my $rootdir= "/home/dthacker/efl/dev/"; #open teams.dir for reading open( CLUB, "<$rootdir/teams.dir" ) or die "Can't open teams.dir : $!"; while () { print $_; my $roster_file=$_; my $club = substr($_, 0,3); my $strsql = <prepare($strsql); $sth->execute() or die "Couldn't execute statement: $DBI::errstr; stopped"; my ($name, $age, $nat, $st, $tk, $ps, $sh, $agg); format RF = @<<<<<<<<<<< @< @<< @< @< @< @< @< $name, $age, $nat, $st, $tk, $ps, $sh, $agg . format RF_TOP = Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP Inj Sus ------------------------------------------------------------------------------------------- . my $io = new IO::Handle; $io->fdopen(fileno(RF),"w"); ? $io->format_lines_left(0); while ( ($name, $age, $nat, $st, $tk, $ps, $sh, $agg ) = $sth->fetchrow_array() ) { write $io; } #close RF; undef $io; } $dbh->disconnect(); close CLUB; ------end------------------- TIA Dave From jay at jays.net Fri Sep 5 09:54:22 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 05 Sep 2008 11:54:22 -0500 Subject: [Omaha.pm] Regex X-treme! Message-ID: <48C1643E.7010308@jays.net> That's a lot of mojo. :) j $linkrule =~ s/\$(\w+)/ CGI::escape( $1 eq 'ref' ? (($n = $seq_id) && "$n") || '' : $1 eq 'name' ? (($n = $feature->display_name) && "$n") || '' : $1 eq 'class' ? eval {$feature->class} || '' : $1 eq 'type' ? eval {$feature->method} || $feature->primary_tag || '' : $1 eq 'method' ? eval {$feature->method} || $feature->primary_tag || '' : $1 eq 'source' ? eval {$feature->source} || $feature->source_tag || '' : $1 =~ 'seq_?id' ? eval{$feature->seq_id} || eval{$feature->location->seq_id} || '' : $1 eq 'start' ? $feature->start || '' : $1 eq 'end' ? $feature->end || '' : $1 eq 'stop' ? $feature->end || '' : $1 eq 'segstart' ? $panel->start || '' : $1 eq 'segend' ? $panel->end || '' : $1 eq 'description' ? eval {join '',$feature->notes} || '' : $1 eq 'id' ? $feature->feature_id || '' : '$'.$1 ) /exg; Bio/Graphics/FeatureFile.pm link_pattern() Lincoln Stein lstein at cshl.org Copyright (c) 2001 Cold Spring Harbor Laboratory From jay at jays.net Mon Sep 8 07:29:06 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 8 Sep 2008 09:29:06 -0500 Subject: [Omaha.pm] Fumbling with formats and IO:Handle. In-Reply-To: <200809042039.50784.dthacker9@cox.net> References: <200809042039.50784.dthacker9@cox.net> Message-ID: On Sep 4, 2008, at 8:39 PM, Dave Thacker wrote: > Objective. > Read a list of records out of a database table and generate a > series of roster > files. Each file should have an identical two line header. Since I don't have your database and don't have "$rootdir/teams.dir" I can't debug your source. Why use format at all? Instead of this > format RF = > @<<<<<<<<<<< @< @<< @< @< @< @< @< > $name, $age, $nat, $st, $tk, $ps, $sh, $agg > . Try this? printf( "%12s %2s %3s %2s %2s %2s %2s %2s\n", $name, $age, $nat, $st, $tk, $ps, $sh, $agg ); Since the _TOP magic isn't working the way you want it, don't use format? You can run sprintf or printf whenever you want. Or if you *really* want to use formats, can you post a demo of your problem w/o other dependencies? HTH, j From dan at linder.org Mon Sep 8 09:42:10 2008 From: dan at linder.org (Dan Linder) Date: Mon, 8 Sep 2008 11:42:10 -0500 Subject: [Omaha.pm] Fumbling with formats and IO:Handle. In-Reply-To: References: <200809042039.50784.dthacker9@cox.net> Message-ID: <3e2be50809080942w7b60c26dg669c1dd09793bdb6@mail.gmail.com> On Mon, Sep 8, 2008 at 9:29 AM, Jay Hannah wrote: > Or if you *really* want to use formats, can you post a demo of your problem > w/o other dependencies? > When I first started playing with Perl (~1995?), my mentor showed me a piece of his code that used formats to handle a complex text table that he had to work with. In the mean time I haven't ever really used them (resorting to the printf as Jay mentioned). I personally wouldn't mind seeing some sample format scripts just to get familiar with them. Dan (And I did get some basic AJAX stuff working with the CGI module - I've been pushed to other tasks, but I'll get a sample of that code to the list soon...) -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Tue Sep 9 16:12:36 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 9 Sep 2008 18:12:36 -0500 Subject: [Omaha.pm] September 9, 2008, 7pm-9pm - Prototype by Ben Heath References: <34c74d710809061523y2471dfa7w42b2669362d88932@mail.gmail.com> Message-ID: <8A46C6BF-F01E-4B1A-891A-C64F393BA7FC@jays.net> Shh! Secret Perl Mongers meeting starts in 50m. I am not sorry for the late notice, since it's a secret. :) I'll probably do a 5m update on the latest ChemChains sandbox, the test suite: http://jays.net/wiki/ChemChains_sandbox#Regression_Testing j Begin forwarded message: > From: "Blaine Buxton" > Date: September 6, 2008 5:23:44 PM CDT > To: odynug > Subject: [odynug] September 9, 2008, 7pm-9pm - Prototype by Ben Heath > Reply-To: odynug at googlegroups.com > > Last time, Ben showed us how to write the server-side of our web > applications in PHP. Now, he returns to display how the client side > can be done. He will blowing our minds with what you can do with > Javascript and Prototype. Come prepared to be amazed. > > Ben has been kind of enough to share the presentation and code > examples with us and they are available at the following URLs: > http://www.tconl.com/~benheath/downloads/Prototype.pdf > http://www.tconl.com/~benheath/downloads/prototype.zip > or > http://github.com/brheath/prototype-presentation/tree/master > > As always we'll have free pizza and great conversation. There might > even me a surprise as well! You don't want to miss a second! > > http://odynug.kicks-ass.org > > Meeting location is UNO's Peter Kiewit Institute (PKI) building > 1110 South 67th Street > Omaha, NE > -- > Blaine Buxton > Sorcerer Of Digital Construction > http://blog.blainebuxton.com From jay at jays.net Tue Sep 9 22:17:28 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Sep 2008 00:17:28 -0500 Subject: [Omaha.pm] Fwd: [pm_groups] Pittsburgh Perl Workshop 2008 References: <5AA97519-D95F-4F5F-86F3-EC375D7795DA@robertblackwell.com> Message-ID: <779C0F02-9FBF-41D4-9F71-0D9EFAA4DCDA@jays.net> FYI j Begin forwarded message: > From: Robert Blackwell > Date: September 9, 2008 8:22:25 PM CDT > > The Pittsburgh Perl Workshop is a low-cost technical conference > held at the Carnegie Mellon University's Oakland Campus. The > workshop will be held on October 11?12 2008. > > * Talk Proposals > > * Classes > > * Hack-a-thons > > > > * Talk Proposals > > The deadline for talk proposals in by 12 September 2008. > > The Pittsburgh Perl Workshop 2008 is the perfect opportunity to > share your ideas, code, and projects with masses of code-loving > Perl hackers. Shouldn't you have a speaking slot at this year's > event? Shouldn't you experience the full, PPW-powered glory that > only speakers can know? > > Of course you should! > > Haven't you ... > done interesting stuff for Perl? > written cool code? > seen the future of Perl? > got a story to tell? > got a trick to share? > > In fact, if you have anything to say that would interest Perl > people, we want to hear you say it! > > Just go to http://pghpw.org and submit a talk proposal. It's that > easy. > > But don't delay. Get your proposal in by 12 September 2008 -- or > else you might miss out. > > Seize the day! Own the fun! Submit a talk proposal for PPW 2008 now! > > > > * Classes > > This year we are offering three great classes: > > Dan Klein is back teaching From Zero to Perl. > http://pghpw.org/ppw2008/zerotoperl.html > > Peter Scott - Maintaining Code While Staying Sane > http://pghpw.org/ppw2008/maintainingcode.html > > brian d foy - Mastering Perl > http://pghpw.org/ppw2008/masteringperl.html > > > * Hack-a-thons > > We are having a Rakudo, (Perl 6) hack-a-thon. From jay at jays.net Wed Sep 10 08:25:55 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Sep 2008 10:25:55 -0500 Subject: [Omaha.pm] Catalyst::Runtime POD Message-ID: Got another patch applied to Catalyst today. Now I don't have to remember where I put that note-to-self, it's in the docs for everyone's benefit. (Especially mine!) :) j $ svn info Catalyst.pm URL: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/ 5.80/trunk/lib/Catalyst.pm $ svn diff -r8393:8394 Index: Catalyst.pm =================================================================== --- Catalyst.pm (revision 8393) +++ Catalyst.pm (revision 8394) @@ -1011,6 +1011,15 @@ C<@args> is an arrayref it is treated as a list of captures to be passed to C. +You can maintain the arguments captured by an action (e.g.: Regex, Chained) +using C<< $c->req->captures >>. + + # For the current action + $c->uri_for($c->action, $c->req->captures); + + # For the Foo action in the Bar controller + $c->uri_for($c->controller->('Bar')->action_for('Foo'), $c->req- >captures); + =cut sub uri_for { From jay at jays.net Mon Sep 15 16:25:57 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 15 Sep 2008 18:25:57 -0500 Subject: [Omaha.pm] Fwd: New Perl Projects References: <48CEDBBD.50702@cosmicperl.com> Message-ID: <887EC959-9813-49D7-9DAC-4C77B6D1C02A@jays.net> FYI, j Begin forwarded message: From: Lyle Date: September 15, 2008 5:03:41 PM CDT Subject: New Perl Projects Hi All, We started a number of new Perl projects. I'd appreciate it if you could forward at least some of the details of these onto your groups. The projects are:- Perl Certified Hosting Free Perl Course Project Perl Donation (from everybody) Perl Certification (Please note you need to remove the ** from the domain names, this is because they were being picked up an inaccurate filter) Details below:- Perl Certified Hosting The idea for this project was put forth by Amias of Bristol & Bath Perl Mongers. We are creating a Perl Certified Hosting scheme that will be open for all hosting companies to join. Requirements will include a set list of web related Perl Modules and proper webserver configuration. Please visit the site:- http://www.perl**certifiedhosting.com For more details and to get involved with helping this scheme become a reality. Free Perl Course Project The idea in this project is that every Perl programmer teach at least one other person to code. Be that a family member, friend, work colleague, employee, friend of a friend, or even friend of an employee. Following the success of the Free Perl Course offered by Bristol & Bath Perl Mongers this project has been started to encourage other Perl groups and programmers to do the same. Please check out the site:- http://www.perl**project.org Perl Donation (from everybody) This scheme has been started with the aim to give the Perl 6 development budget a big boost. http://www.perl**donate.com Please take the time to make your small donation. The aim is that we all make a small donation so that it amounts to a lot. Perl Certification I've been starting a Perl Certification list, this time not for debate, but for actually starting a certification scheme. I know this can be a very touchy subject, but we'd like to put together a working solution that people can evaluate. http://www.perl**cert.com Lyle ** Must be removed from all domain names From jay at jays.net Tue Sep 16 17:30:18 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 16 Sep 2008 19:30:18 -0500 Subject: [Omaha.pm] Catalyst-Plugin-Session-Store-DBIC v0.07 Message-ID: Hi Daniel, I threw a patch into SVN for you. Let me know what you think. Cheers, j $ svn info URL: http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst- Plugin-Session-Store-DBIC $ svn log -v -r8424:8425 ------------------------------------------------------------------------ r8425 | jhannah | 2008-09-16 19:22:59 -0500 (Tue, 16 Sep 2008) | 4 lines Changed paths: M /trunk/Catalyst-Plugin-Session-Store-DBIC/Changes M /trunk/Catalyst-Plugin-Session-Store-DBIC/lib/Catalyst/Plugin/ Session/Store/DBIC.pm M /trunk/Catalyst-Plugin-Session-Store-DBIC/t/04dbic.t M /trunk/Catalyst-Plugin-Session-Store-DBIC/t/05dbic-schema.t M /trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Model/ DBIC/Session.pm M /trunk/Catalyst-Plugin-Session-Store-DBIC/t/lib/TestApp/Schema/ Session.pm Code was silently truncating storage to MySQL, rendering the session unreadable. Patched to check DBIx::Class size from column_info (if available). From jay at jays.net Wed Sep 17 10:04:47 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 17 Sep 2008 12:04:47 -0500 Subject: [Omaha.pm] Perl Catalyst, Ruby on Rails Message-ID: Looks like a pretty good article: http://www.dtschmitz.com/dts/2008/09/catalyst-perls-answer-to-ruby-on- rails-and-ajax.html I've never coded RoR. We've got thousands of lines of Catalyst at $work now. I'd be interested to hear Ruby folks thoughts. j Omaha Perl Mongers: http://omaha.pm.org From jay at jays.net Tue Sep 23 11:16:29 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 23 Sep 2008 13:16:29 -0500 Subject: [Omaha.pm] Catalyst uri_for() Message-ID: <79491D25-CC2E-44C9-B1A0-55FA7CE68A4D@jays.net> uri_for() is a sweet little chunk of magic. I throw this into my template: [refresh] And the appropriate URL relative to my current Action happens automatically... In this case: http://cac-dev.omnihotels.com:3000/omnicrs/hrms/refresh_sold_counts (not publicly accessible) So I can move my Controllers and/or applications around at will and all my URLs just magically work. :) Details: http://tinyurl.com/3kd8vu j From jay at jays.net Wed Sep 24 18:27:11 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 24 Sep 2008 20:27:11 -0500 Subject: [Omaha.pm] Another CPAN credit Message-ID: <2195AEBE-7EA2-44C5-B71F-1974A8113F1E@jays.net> http://search.cpan.org/~danieltwc/Catalyst-Plugin-Session-Store- DBIC-0.07/lib/Catalyst/Plugin/Session/Store/DBIC.pm "Jay Hannah, for tests and warning when session size exceeds DBIx::Class storage size." Yay! j From jay at jays.net Mon Sep 29 05:07:20 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 29 Sep 2008 07:07:20 -0500 Subject: [Omaha.pm] DNA Message-ID: <47A1E285-4C95-48EB-80DD-8A9911CA4C14@jays.net> http://search.cpan.org/~mschwern/DNA-0.03/lib/DNA.pm "Simply take your best one-liner, encode it with this nifty DNA module and head on down to your local sperm bank and have them inject that sucker in." Laugh, j From jay at jays.net Tue Sep 30 16:23:49 2008 From: jay at jays.net (jay at jays.net) Date: Tue, 30 Sep 2008 19:23:49 -0400 Subject: [Omaha.pm] 2005 is making a comeback! (Test-Harness-2.56) Message-ID: <88fd6c5d8b19ac6005377644429ab90b@jays.net> I love Test-Harness-2.56 (released 28-Sep-2005 16:10). It has this shiny feature way at the bottom of 'prove' that I just can't live without: 8 tests and 80 subtests skipped. Failed 18/293 test scripts, 93.86% okay. 180/17926 subtests failed, 99.00% okay. For some reason I love that "% okay" stuff. :) The latest version kicks out this at the very bottom: Files=293, Tests=17761, 2237 wallclock secs ( 0.32 usr 6.26 sys + 185.92 cusr 339.51 csys = 532.01 CPU) Result: FAIL The timing stuff is neat (same as 'time prove'?), but I'm pining for the summarized 18/293 (93.65% okay) of yesteryear. There have been 37 releases of Test::Harness since 2.56. I don't know at what point that favorite feature of mine disappeared, but it's gone in modern versions. I've never intentionally been this retro with a CPAN module before. Bummer. j (http://backpan.perl.org lists no versions past 2.56. cpan.perl.org has 2.28 through 3.14. ... Oh, correction: apparently by-module/ is glitchy and authors/ is where to look. Weird.)