]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/Base.pm
use strict
[maypole.git] / lib / Maypole / Model / Base.pm
index 3375dfd26fba523b126e784c93e32a9779b8cfb6..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 ) = @_;
@@ -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;