Usage of a reference is no option because too many existing files are manipulating the scalar itself.
Blessing a string is possible (done by that MongoDB module), even if I usually don't like it.
bless should always use the two-argument-form, see Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless
In reply to Re^2: Bless a string
by Sewi
in thread Bless a string
by Sewi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |