Think about Loose Coupling | |
PerlMonks |
Re^6: Making it clearer to say that a sub is defined within current packageby LanX (Saint) |
on Apr 11, 2019 at 16:02 UTC ( [id://1232454]=note: print w/replies, xml ) | Need Help?? |
I was talking about the need to have a hinthash to restrict the effects of "use My" to the scope. What are you talking about? I don't want to collide with any other product which is using My:: for its own purpose. Of course does the caller change. But any magic should be restricted to the local scope! Anyway reserving the Namespace on CPAN would be needed.
updateanother idea would be using a lexical object, and the method call would be channeled through AUTOLOAD.
this could indeed work without polluting other packages and the runtime effects would become obvious by the ->arrow .
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|