From 4b6fca4879b54b12587eca6d76d865817fe5e34d Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Mon, 27 Sep 2004 00:36:15 +0000 Subject: [PATCH] fixed is_public() git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@208 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole.pm | 2 +- lib/Maypole/Model/Base.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Maypole.pm b/lib/Maypole.pm index b4e1d62..6063582 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -136,7 +136,7 @@ sub is_applicable { return DECLINED() unless exists $config->ok_tables->{ $self->{table} }; # Is it public? - return DECLINED unless $r->model_class->is_public( $r->{action} ); + return DECLINED unless $self->model_class->is_public( $self->{action} ); return OK(); } diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index b592eaa..b6ef5f4 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -155,13 +155,13 @@ sub description { "A poorly defined class" } sub is_public { my ( $self, $action ) = @_; my $cv = $self->can($action); - return DECLINED() unless $cv; + return 0 unless $cv; my $attrs = join " ", attributes::get($cv); do { warn "$action not exported" if Maypole->debug; - return DECLINED(); + return 0; } unless $attrs =~ /\bExported\b/i; - return OK; + return 1; } 1; -- 2.39.2