ingydotnet / boolean-pm

Boolean Type Support for Perl
7 stars 5 forks source link

Just one more line to make it JSON-friendly #1

Closed dankogai closed 11 years ago

dankogai commented 11 years ago

ingy,

It's rather unfortunate JSON(::XS)? does not regard boolean.pm. It's fortunate we need a single line to fix that.

sub TO_JSON() { ${$_[0]} ? \1 : \ 0 }

Would you merge so the rest of us can save the line?

Dan the Fan of Yours

ingydotnet commented 11 years ago

boolean-0.29 successfully released.

Relax. Have a beer. \o/

dankogai commented 11 years ago

you++;