in reply to Re^4: Where is the @ISA array?
in thread Where is the @ISA array?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Where is the @ISA array?
by Anonymous Monk on Jan 22, 2009 at 13:48 UTC | |
by Corion (Patriarch) on Jan 22, 2009 at 13:52 UTC | |
by Anonymous Monk on Jan 22, 2009 at 13:55 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 14:07 UTC | |
by Anonymous Monk on Jan 22, 2009 at 14:21 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 14:26 UTC | |
by Anonymous Monk on Jan 22, 2009 at 14:30 UTC | |
|