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: dl_findfile dl_expandspec dl_find_symbol_anywhere 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 schwern@pobox.com http://www.pobox.com/~schwern/ Monkey tennisThread Previous | Thread Next