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

Gosh. I didn't know about parent. What was wrong with base?

Replies are listed 'Best First'.
Re^3: Where is the @ISA array?
by ikegami (Patriarch) on Jan 22, 2009 at 05:39 UTC

    It handles load failures badly.

      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.

        No, you could search Perl Monks. You could probably find some things on it on the P5P mailing list too. Google sees both.