> Like: > > use overload > 'bool' => \&my_truth; > > sub my_truth { > 1; # objects of this class are always true > } > > This works in Perl5. Right, a lot of this stuff (like STRING and BOOLEAN) can be accomplished through overloading. However, having a standard builtin method similar to tie and import makes things easier and more consistent I think. If we make "everything an object" then these become necessities. -Nate
- explicit boolean accessor David L. Nicol
- Re: explicit boolean accessor Nathan Wiger
- Re: explicit boolean accessor Nathan Torkington
- Re: explicit boolean accessor Nathan Wiger
- Re: explicit boolean accessor Nathan Torkington
- Re: explicit boolean accessor Nathan Wiger
- Re: explicit boolean accessor Damian Conway
- Re: explicit boolean accessor David L. Nicol