develooper Front page | perl.perl5.porters | Postings from November 2003

Re: DynaLoader (was Re: [5.12.0] Proposal for changing UNIVERSAL semantics)

Thread Previous | Thread Next
Michael G Schwern
November 5, 2003 18:01
Re: DynaLoader (was Re: [5.12.0] Proposal for changing UNIVERSAL semantics)
Message ID:
On Wed, Nov 05, 2003 at 09:05:52PM +0000, Graham Barr wrote:
> On Nov 4, 2003, at 23:13, Michael G Schwern wrote:
> >So, basically, you pick up an AUTOLOAD by inheriting from any module 
> >that
> >uses XS.  Feeling paranoid yet? :)  Should we change can() to ignore
> >methods inherited from DynaLoader now?
> Thats been a known issue for a long time. The only reason you need to 
> inherit from DynaLoader is that bootstrap may call the dl_load_flags 
> method.

Are you sure you mean dl_load_flags?  It appears that the autoloaded
methods are:

I wonder if autoloading these 135 lines of code is really saving us
anything worth the trouble of accidental AutoLoader inheritence.

> The annoying thing is that because you do have AUTOLOAD there then you 
> get different warnings.

I've been pondering changing the AutoLoader error message so it looks
a bit more like a normal method/function lookup failure.  Possibly 
placing the normal error in front of the extended AutoLoader information.
This way at least checks like 
$@ =~ /^Can't locate object method "$meth" via package "$class"/ will
still work.

Michael G Schwern
Monkey tennis

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About