Reputation: 85
Is it possible to import a base class having the same name as that of the package name in another location ?
package Foo;
use base 'Foo';
I have to use 'Foo' as the base class located in another location. Is it possible ?
Upvotes: 0
Views: 73
Reputation: 126742
No you can't do that. A base class is the place Perl looks for a method that isn't defined in the current package.
If you wrote things like this and Perl failed to find Foo::method
then it would look in the base class Foo::method
and so the search would be endless.
Upvotes: 3