package Maypole::Model::Base;
+
+use Maypole::Constants;
+use attributes ();
+
our %remember;
+
sub MODIFY_CODE_ATTRIBUTES { $remember{ $_[1] } = $_[2]; () }
sub FETCH_CODE_ATTRIBUTES { $remember{ $_[1] } }
sub description { "A poorly defined class" }
-1;
+sub is_public {
+ my ( $self, $action ) = @_;
+ my $cv = $self->can($action);
+ return DECLINED() unless $cv;
+ my $attrs = join " ", attributes::get($cv);
+ do {
+ warn "$action not exported" if Maypole->debug;
+ return DECLINED();
+ } unless $attrs =~ /\bExported\b/i;
+ return OK;
+}
+1;