X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=211bd056a007d4505351bee182ccb941ce2cace4;hb=74f4bd70e03353b0df65decf6a9ef77aa2401b3e;hp=03205a61486545dde470811213440cfc9e09adb6;hpb=8d3f7b6c5612270c10042d8e0a9e52ad4ad54a46;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 03205a6..211bd05 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_pre4'; +our $VERSION = '2.111'; 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; @@ -1151,6 +1154,11 @@ sub object { Get/set a hash of template variables. +Maypole reserved words for template variables will over-ride values in template_variables. + +Reserved words are : r, request, object, objects, base, config and errors, as well as the +current class or object name. + =item stash A place to put custom application data. Not used by Maypole itself.