develooper Front page | perl.perl5.porters | Postings from September 2001

Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC

Thread Previous | Thread Next
From:
Benjamin Goldberg
Date:
September 3, 2001 21:41
Subject:
Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC
Message ID:
3B9408B9.F0098D6C@earthlink.net
Rafael Garcia-Suarez wrote:
> 
> This patch makes useful the info put in %INC when a file is
> loaded via a hook. So, if several hooks are put in @INC, it's
> possible to know which hook loaded which module.

[snip]
> +If the file was loaded via a hook (see L<perlfunc/require> for a
> +description of these hooks), a fake filename is inserted into %INC.
> +It looks like F</loader/0x81095c8/Foo.pm>, where the hexadecimal
> +number corresponds to the reference that was put in @INC.

I suppose this is a silly question, but why not simply put the code ref
[or arrayref or objectref] itself into %INC ?  Would this make it much
easier to patch the other stuff [AutoLoader, DynaLoader] to work with
hooks in @INC ?

-- 
"I think not," said Descartes, and promptly disappeared.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About