--- Simon Flack <sf at flacks.net> wrote:
> Simon Flack wrote:
> > Peter Speltz wrote:
> > > 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;
> >
> > Thanks, I'll apply that.
>
> In fact, you can also avoid those warnings by making sure your
> &FETCH_CODE_ATTRIBUTES returns an empty list instead of undef, e.g.:
>
> sub FETCH_CODE_ATTRIBUTES { @{$remember{$_[1]} || []} }
>
> Simon
>
I'm glad you brought this up. I didn't modify this. However i've been wanting
to ask -- What the bejezess does this do? How does it effect the attribute::get
call.
Would that have anything to do with why only the first attribute is gotten in
attribute::get calls? In experiementing with attributes, i found that :
SUB declaration attribute::get returns
sub list : Exported : Class { ... } ( 'Exported' )
sub list : Class : Expaorted {...} ( 'Class' )
sub list : Exported (Class) ( 'Exported (Class)' )
So i'm using the last method, which I happen to like better.
=====
pjs
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT