Re: hooks in @INC of the form &code:function::name
by Nicholas Clark other posts by this author
Nov 26 2003 11:19PM messages near this date
hooks in @INC of the form &code:function::name
|
Re: hooks in @INC of the form &code:function::name
On Tue, Nov 25, 2003 at 06:15:21PM -0800, Edward S. Peschko wrote:
> I'd like to make perl be able to handle syntax like:
>
> @INC = ( '&code:function::name', 'lib', 'lib2' );
>
> which would work the same as
>
> @INC = ( sub { }, 'lib', 'lib2' );
>
> except be more robust in being able to be evaluated (again, this is hurting in
> PAR, which uses code refs in @INC and hence doesn't handle AutoLoader.pm and
> Inline.pm very well - both of which use eval "use something" or require "something",
> which stringifies @INC and hence breaks any code refs in it).
Do you have an example of AutoLoader breaking with a code ref @INC?
IIRC ex::lib::zip tests loading autosplit modules via a code ref @INC and
everything works.
I'd like to find the "like" syntax, as I don't feel calm with the idea
of strings in @INC starting '&' now having special meaning.
[Although only BOFHs on Unix would go around using local directories with
names starting & for holding their modules]
Nicholas Clark
Thread:
Edward S. Peschko
Nicholas Clark
Rafael Garcia-Suarez
|