X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FBase.pm;h=d0e9ba81670c357160685195b205736513712b0a;hb=refs%2Ftags%2F2.10;hp=3375dfd26fba523b126e784c93e32a9779b8cfb6;hpb=05b8c530848b1b7bada1e39ceb8325eb688c35d0;p=maypole.git diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index 3375dfd..d0e9ba8 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -1,5 +1,6 @@ package Maypole::Model::Base; +use strict; use Maypole::Constants; use attributes (); @@ -7,7 +8,7 @@ our %remember; sub MODIFY_CODE_ATTRIBUTES { $remember{ $_[1] } = $_[2]; () } -sub FETCH_CODE_ATTRIBUTES { $remember{ $_[1] } } +sub FETCH_CODE_ATTRIBUTES { $remember{ $_[1] } || () } sub process { my ( $class, $r ) = @_; @@ -169,14 +170,6 @@ sub column_names { } $class->columns; } -=head2 description - -A description of the class to be passed to the template. - -=cut - -sub description { "A poorly defined class" } - =head2 is_public should return true if a certain action is supported, or false otherwise. @@ -188,7 +181,7 @@ sub is_public { my ( $self, $action ) = @_; my $cv = $self->can($action); return 0 unless $cv; - my $attrs = join " ", attributes::get($cv); + my $attrs = join " ", (attributes::get($cv) || ()); do { warn "$action not exported" if Maypole->debug; return 0;