Rafael Garcia-Suarez <[EMAIL PROTECTED]> writes:

> I'm still not entirely satisfied with the coderef-in-@INC feature. So,
> before it gets documented into a production release :
> currently, when a module is loaded via a hook in @INC, the string
> '/loader/0x81095c8/Foo.pm' is set as the corresponding value in %INC.
> This looks too much like a real file name and it's not really useful.
> So I suggest (I think the original idea is from B. Goldberg) to put the
> hook itself in %INC : e.g.
>       %INC = (
>           ...,
>           'Foo.pm' => sub { hook that has loaded 'Foo.pm' },
>           ...,
>       );
> The '/loader/0x81095c8/Foo.pm' string is still here, deeply buried :
> it's the value of __FILE__ in Foo.pm while it's parsed.
> The patch (doc and code) is below. I'll provide tests if you approve it.

How would you patch AutoLoader::AUTOLOAD and AutoLoader::import to
cope with it?

What about other modules that use their own AUTOLOAD implementation
(like Tk).


Reply via email to