Maypole::Plugin::Loader - Require all available model class modules |
Maypole::Plugin::Loader - Require all available model class modules
package BeerDB;
use Maypole::Application qw(Loader);
BeerDB->setup('dbi:Pg:dbname=beerdb', 'myuser', 'mypass');
Requires all available model class modules for you.
So you can just do this:
package BeerDB;
use Maypole::Application qw(Loader);
BeerDB->setup('dbi:Pg:dbname=beerdb', 'myuser', 'mypass');
Instead of this:
package BeerDB;
use Maypole::Application;
BeerDB->setup('dbi:Pg:dbname=beerdb', 'myuser', 'mypass'); BeerDB::Brewery->require; BeerDB::Beer->require; BeerDB::Handpump->require; BeerDB::Pub->require;
Sebastian Riedel, sri@oook.de
Max Maischein
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
Maypole::Plugin::Loader - Require all available model class modules |