[Maypole] 2.07 PR

Peter Speltz peterspeltz@yahoo.com
Mon, 17 Jan 2005 14:49:36 -0800 (PST)


This isn't new to 2.07 however while we're on the subject . . . Line 183 in
Maypole::Model::Base , in the is_public sub, a warning is generated when there
aren't any attributes for the sub in question. Its annoying when called in a
loop.

I replace  line 183: 

my $attrs = join " ", attributes::get($cv);

with these 2 lines:

 my @attrs = attributes::get($cv) || ();
 my $attrs = join " ", @attrs;


Another thought on is_public: perhaps it should take an attribute argument in
case you already have the attributes. I overrode mine to use one because i
check for different types of attributes like so in one place:
my @attrs = attributes::get($cv);
my $attrs = join ' ', @attrs;
if $class->is_public( $method, $attrs) { . . . }
if $class->is_class($method, $attrs) {...}
if $class->is_object($method, $attrs ) {....}


thanks

=====
pjs


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo