develooper Front page | perl.perl5.porters | Postings from January 2004

Recursive call to Perl_load_module in PerlIO_find_layer

Thread Next
From:
Elizabeth Mattijsen
Date:
January 25, 2004 07:59
Subject:
Recursive call to Perl_load_module in PerlIO_find_layer
Message ID:
p05111b03bc3996080fcb@[192.168.56.3]
Could anyone explain to me why this little gem:

=========================================
BEGIN {
     unshift( @INC,sub {
         my $data; open( my $in,'<',\$data );
     } );
}
use Foo;
=========================================

dies with the error:

  Recursive call to Perl_load_module in PerlIO_find_layer line 3.
  BEGIN failed--compilation aborted line 6.
  BEGIN failed--compilation aborted line 6.


I ran into this while developing my new "ifdef" pragma (soon to be 
found on CPAN, now also available from http://www.liz.nl/CPAN ).

I actually don't need the functionality to create a handle on a 
scalar while in an @INC handler anymore, as I've chosen a line based 
approach.  But it still makes me wonder why this is would be a 
problem.  And if and how it can be circumvented.


Liz

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