in reply to Re^2: Where is the @ISA array?
in thread Where is the @ISA array?

It handles load failures badly.

Replies are listed 'Best First'.
Re^4: Where is the @ISA array?
by Anonymous Monk on Jan 22, 2009 at 13:31 UTC
    So we should just take your word for that? Can you give an example? I mean ... I have never had problems with this like you describe. Perhaps you are not using it properly?

      From base.pm:

      die if $@ && $@ !~ /^Can't locate .*? at \(eval /;

      So you won't ever hear of a file that couldn't be found, instead you get a useless message about the base class being empty:

      Carp::croak(<<ERROR); Base class package "$base" is empty. (Perhaps you need to 'use' the module which defines that package f +irst.) ERROR

      ... and that only if the namespace wasn't ever touched before. The following code will not fail nor warn despite the file Foo/Bar.pm not existing:

      use strict; BEGIN { print "Foo::Bar::VERSION : $Foo::Bar::VERSION\n"; }; package Foo::Baz; use base 'Foo::Bar'; package main; print "done\n.";

      ... because base.pm does not look in %INC to see whether a module was loaded.

        That's a petty and trivial reason to not use base, no? And if it is such a problem for everyone ... how did that get out the production door? Why has there not been a "bug" fix?
      No, you could search Perl Monks. You could probably find some things on it on the P5P mailing list too. Google sees both.