hooks in @INC of the form &code:function::name
by Edward S. Peschko other posts by this author
Nov 26 2003 2:15AM messages near this date
Re: [PATCH] dynaloader patch for PAR-0.76
|
Re: hooks in @INC of the form &code:function::name
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).
Anyways, I was trying to hunt down the patch that Ken Fox made on this (back in
1999) and can't find it via google. Is it available in the perl archives somewhere?
If not, is there a good pointer into the code where it is available?
Otherwise, is there an easy fix for making @INC = (sub { }, ...) work even in
evaluated strings? My gut feel says no (that this would require a good mechanism
for stringifying and un-stringifying code references), but what do I know.
Thanks much,
Ed
Thread:
Edward S. Peschko
Nicholas Clark
Rafael Garcia-Suarez
|