X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FBase.pm;h=d0e9ba81670c357160685195b205736513712b0a;hb=1ea25ed1ecc3c2baa71a985e8a94a55bb8f871f2;hp=678c3994f3b5e9d07dd90b1788342becebf90978;hpb=d2c852208417c014caec0436a677fcadccc197d8;p=maypole.git diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index 678c399..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 ) = @_; @@ -180,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;