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
Benjamin Goldberg
September 3, 2001 21:41
Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC
Message ID:
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.

> +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/>, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About