Elizabeth Mattijsen wrote: > At 21:33 +0100 1/25/04, Rafael Garcia-Suarez wrote: > >> Elizabeth Mattijsen wrote: >> > 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. >> Because it tries to load PerlIO::Scalar while trying to load >> PerlIO::Scalar. > > > Indeed. This works like a charm: > > BEGIN { > require PerlIO::Scalar; > unshift( @INC,sub { > my $data; open( my $in,'<',\$data ); > } ); > } > use Foo; > > But I would never have gotten from the error message to this fix. > > But this implies that PerlIO::Scalar is only loaded the first time you > try to do an open() like that. Are there many more situations like that > in Perl nowadays? Is there a list of this modules that get > automatically loaded on demand? Could be important for optimizing Perl > on mod_perl prefork MPMs... Liz, Module::Use will tell you about all modules that get loaded behind the scenes: http://search.cpan.org/dist/Module-Use/ Load it the very last thing in httpd.conf. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.comThread Previous | Thread Next