package falsify; use strict; use overload 'bool' => sub { 0 }, '""' => sub { ${$_[0]} }, 'fallback' => 1; sub import { my $caller = caller; no strict 'refs'; *{$caller."::falsify"} = \&falsify; } sub falsify { my $string = "".shift; # force it to be a string my $self = \$string; bless($self, __PACKAGE__); } 1;
In reply to "Falsify" scalar strings by Fastolfe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |