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
From:
Gisle Aas
Date:
August 28, 2001 09:31
Subject:
Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC
Message ID:
lrzo8kjgdm.fsf@caliper.ActiveState.com
Rafael Garcia-Suarez <rgarciasuarez@free.fr> 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/scrollbars.al';

Regards,
Gisle

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