Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re^4: strange error when subclassing packages (not use vs require)

by pfaut (Priest)
on Apr 21, 2003 at 12:50 UTC ( [id://251984]=note: print w/replies, xml ) Need Help??


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
  • Comment on Re: Re^4: strange error when subclassing packages (not use vs require)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found