Found Task::Kensho interesting to get an idea of the most common and recommended Perl modules out there.
Task::Kensho is a first cut at building a list of recommended modules for Enlightened Perl development. CPAN is wonderful, but there are too many wheels and you have to pick and choose amongst the various competing technologies.
Links:
Was trying to generate the Perl module DBIx::Class schema files from a database using DBIx::Class::Schema::Loader. Using the example on the CPAN page for DBIx::Class::Schema::Loader the following error came up.
Unable to load schema – chosen moniker/class naming style results in moniker clashes. Either change the naming style, or supply an explicit moniker_map: tables ‘dm_pp_hn’, ‘dm_pp_hns’ reduced to the same source moniker ‘DmPpHn’
The table names were obviously very similar and causing a problem when generating the schema. Additional information could be found in: DBIx::Class::Schema::Loader::Base
http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07000/lib/DBIx/Class/Schema/Loader/Base.pm#moniker_map
Basically changed the code from:
#!/usr/bin/perl
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
make_schema_at(
‘dbname::Schema’,
{ debug => 1,
dump_directory => ‘./Schema’,
},
[ 'dbi:mysql:dbname=dbname', 'user', 'pass',
# { loader_class => 'MyLoader' } # optionally
],
);
To:
#!/usr/bin/perl
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
make_schema_at(
‘dbname::Schema’,
{ debug => 1,
dump_directory => ‘./Schema’,
moniker_map => { ‘dm_pp_hn’ => ‘DmPpHn’,
‘dm_pp_hns’ => ‘DmPpHnS’,
},
},
[ 'dbi:mysql:dbname=dbname', 'user', 'pass',
# { loader_class => 'MyLoader' } # optionally
],
);
And the schema was dumped successfully.
It has been a while since writing a CGI frontend to an application… In fact, CGI.pm was the way to do things when I last wrote a CGI application with Perl.
Was having a look at Catalyst and CGI::Application as MVC frameworks. I decided that the learning curve for Catalyst was a little too great to start with and opted for CGI::Application (Catalyst does look really good though).
Some example code which I have found useful knocking up a test application:
* Found the reply from “Belgarion (Chaplain) on Dec 12, 2005 at 16:38 UTC” useful explaining the order in which CGI::Application (CAP) runs:
- cgiapp_init()
- setup()
- cgiapp_prerun()
- your selected run mode
- cgiapp_postrun()
- teardown()
Links:
Came across this the other day and thought it was pretty cool: