Subject: | Doesn't work on non-ref scalars. |
$ perl -Mautobox -wle 'sub SCALAR::bar { 42 } $thing = 23; print
$thing->bar'
42
$ perl -MMoose::Autobox -wle 'sub SCALAR::bar { 42 } $thing = 23;
print $thing->bar'
Can't call method "bar" without a package or object reference at -e line 1.
While this does potentially conflict with class method calls, calling
methods on simple scalars is really handy. $string->strip_ws, for example.