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

Re: The coderef in @INC strikes back

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
August 22, 2001 14:32
Subject:
Re: The coderef in @INC strikes back
Message ID:
20010822233508.A14227@rafael
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 :

#!/opt/perl/bin/perl5.7.2
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About