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

Re: The coderef in @INC strikes back

Thread Previous | Thread Next
Rafael Garcia-Suarez
August 22, 2001 14:32
Re: The coderef in @INC strikes back
Message ID:
On 2001.08.22 22:38 Rafael Garcia-Suarez wrote:
> The Foo::INC method trick seems to work very well (see my reply to
> J. Stowe). Just remember that INC should always be fully qualified.

Strange. I can use blessed hashrefs and scalar refs in @INC, but
not blessed arrayrefs :

sub Foo::INC { print "@_\n"; undef }
unshift @INC, bless([123], 'Foo');
require Foo::Bar;

Output :

Undefined subroutine &main::123 called at /home/rafael/bin/quux line 5.

That's a case for the bug you were referring to.

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