|P is for Practical|
Re: Making it clearer to say that a sub is defined within current package (package aliasing)by LanX (Sage)
|on Apr 11, 2019 at 17:20 UTC||Need Help??|
This is pretty clean, put your private stuff into a sub-package and alias that long package path it to a shorter package name at compile time.
(of course these subs won't be able to call imported subs in the parent package without full qualification or inheritance ;-)
the magic in the BEGIN/END blocks could be done in the importer of a module called with
use PackageAlias "X::Y:Z::my" => "my" and no PackageAlias "my"
I just realised that Package::Alias already exists, even with a pretty similar interface.
Skipped colons in my example to avoid confusion.