in reply to Re^2: Getting the value of a pointer
in thread Getting the value of a pointer
That's odd. It should overload numerification and numerical ops instead of (or in additon to) stringification.
There is only one case where stringification is needed that comes to mind: When the function behaves differently whether a parameter is a string* or an object, and the parameter is an object with an overloaded stringification operator. For example,
sub output { my ($fh, ...) = @_ if (!ref($fh) && ref($fh) ne 'GLOB') { open($fh, '>>', $fh); } ... }
* or number vs object, or boolean vs object
|
|---|