in reply to Re^4: strange error when subclassing packages (not use vs require)
in thread problem using Class::Factory
The only time it will only look in a single package is using the syntax $foo->Bar::baz() or Foo->Bar::baz(), which will pass a $self of $foo or "Foo", respectively, but invoke the method in the Bar package.
Ok, I see where I had it wrong. Derived::foo() would not find Base::foo() but Derived->foo() would.
You are also wrong about import(); it is the entire point of OO not to have to sully someone else's namespace with your own symbols.
I understand that completely. I was just pointing out that the manner in which the routine was being invoked might not work without the import. Unfortunately, I was wrong. Sorry to muddy the waters.
90% of every Perl application is already written. ⇒ |
dragonchild |
In Section
Seekers of Perl Wisdom