zaven has asked for the wisdom of the Perl Monks concerning the following question:
I have the following relationship between some classes:
Foo::TestScript.pm: use base qw(Test::Class); use Test::More; # both CPAN modules myTest.pm: use base qw(Foo::TestScript);
So myTest ISA Foo::TestScript and Foo::TestScript is using Test::More. Now, I expect to be able to call methods from Test::More (for example, is() and isnt()) from myTest.pm. But when I do I get an error that &myTest::is() is undefined.
If I "use Test::More" directly from myTest.pm, I can call the methods just fine. However, I would prefer to inherit this functionality via the parent class, TestScript.
So what am I missing about subclassing here? Much thanks.
-zaven
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing the namespace of a class's grandparent
by rhesa (Vicar) on Dec 17, 2006 at 02:15 UTC |