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

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

Thread Previous | Thread Next
Gisle Aas
August 28, 2001 09:31
Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC
Message ID:
Rafael Garcia-Suarez <> writes:

> 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.

What is still missing is to make sure pp_require() invokes the hook
again when an absolute filename starting with things like
"/loader/0x81095c8/" is used.  Currently this bypass the @INC search
which is quite likely to make the require fail.

If you for instance try to serve up the Tk modules via a hook like
this you will discover that it has a special AUTOLOAD function that
construct absolute file names based on the %INC value.  It will then
load its .al files like this:

    require '/loader/0x81095c8/auto/Tk/Frame/';


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