Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thanks for correcting me regarding package. I wanted to clarify the leaking alias nit that you referred to. If I understand the perldoc correctly, I am leaking the alias to @Foo::Bar::ISA because the our declaration creates an alias that persists across the lexical scope. So if I had enclosed the packages in braces, the leak would be prevented. I like your approach of using BEGIN blocks to enclose inline modules. It more closely approximates the behavior of useing them from separate files (of course you may need to add an import if you want the full goodness of use). An excellent suggestion. This would have saved me hassles on a few occasions.
In reply to Re^5: Overridding subroutines called in private subroutines
by TGI
|
|