Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm pretty sure I understand what you're saying, but I'm not seeing what the problem is. If you're just talking about subroutines in packages, then calling xyz() while you're in X::Y::Z won't accidentally call ::xyz() in the event that X::Y::Z::xyz() isn't defined. Instead you'll get an error about the missing subroutine:
If you're talking about object-oriented programming and you're using inheritance, then if someone overrides your xyz() you'd want to let it get called. Calling a specific implementation of an xyz() is usually an error because the wrong specialization won't know about any potential extra constraints on your object. ...roboticus When your only tool is a hammer, all problems look like your thumb. In reply to Re: Making it clearer to say that a sub is defined within current package
by roboticus
|
|