ziggy on Wed, 26 Apr 2000 09:07:45 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Perl 5.6 question (fwd)


Forwarded message:
> Date: Wed, 26 Apr 2000 01:00:01 -0400 (EDT)
> From: "Schuyler D. Erle" <sderle@alphaaccess.net>
> To: phl@lists.pm.org
> Subject: Re: Perl 5.6 question
> 
> > Can subs be marked :'lvalue' dynamically, so AUTOLOAD can whip up such
> > nifty attribute accessors on-the-fly?
> 
> I've not seen anything in the 5.6 documentation. This looks like a
> compile-time thing. So you can eval the subs, or how about just ... ?
> 
> sub AUTOLOAD : lvalue { $_[0]->{$AUTOLOAD} }
> 
> If you 'use fields' this will still throw an exception if the field is
> undefined for the class...
> 
> SDE
> 
> 

**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**