in reply to Re^2: Readonly vs ReadonlyX
in thread Readonly vs ReadonlyX
Thanks for the feedback and sorry for my maybe overly harsh reaction.
I think the issue with Readonly and ReadonlyX colliding could be easily fixed if you released an extra module - probably in the same distribution - which put's ReadonlyX subs into another namespace before exporting.
Something like ReadonlyX::Proper or ReadonlyXXX (There are for sure better names)
Like this modules using the subs qw/Scalar Array Hash/ from there, won't see strange collision effects, if other modules deeper down use Readonly or ReadonlyX.
I think this could be done without adding much code by refactoring all the code into an extra readonly_code.pl w/o namespace and letting ReadonlyX and ReadonlyX::Proper do the file after declaring their packages.
But of course you are the expert here :)
Thanks for your work!!!
OTOH Const::Fast exists and seems to do the job already with a new interface.
If your point was to have a drop-in replacement, I doubt this can be done with those fully qualified subs like Readonly::Scalar without caveats.
Maybe you should just mention those drawbacks in the module's POD.
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
|---|