X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=d476b56a46e55ed9dad22695f8a10e33b9e0db5d;hb=1c8db728a3fb5adb4f0ea876ea1316457700edf8;hp=c3e3525d585c0c2422459d09c80d59bf634b0884;hpb=6fb98ace4f824a32e25cbd161743814892d11408;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index c3e3525..d476b56 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -12,7 +12,7 @@ use URI::QueryParam; use NEXT; use File::MMagic::XS qw(:compat); -our $VERSION = '2.11_pre5'; +our $VERSION = '2.11'; our $mmagic = File::MMagic::XS->new(); # proposed privacy conventions: @@ -35,6 +35,9 @@ The canonical example used in the Maypole documentation is the beer database: # choose a frontend, initialise the config object, and load a plugin use Maypole::Application qw/Relationship/; + + # set everything up + __PACKAGE__->setup("dbi:SQLite:t/beerdb.db"); # get the empty config object created by Maypole::Application my $config = __PACKAGE__->config; @@ -62,8 +65,8 @@ The canonical example used in the Maypole documentation is the beer database: date => [ qw/date/], ); - # set everything up - __PACKAGE__->setup("dbi:SQLite:t/beerdb.db"); + # note : set up model before calling this method + BeerDB::Beer->required_columns([qw/name/]); 1;