]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/Base.pm
added missing file
[maypole.git] / lib / Maypole / Model / Base.pm
index 678c3994f3b5e9d07dd90b1788342becebf90978..d0e9ba81670c357160685195b205736513712b0a 100644 (file)
@@ -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;