JE::Boolean(3pm)
π JE::Boolean π
okay bestie, so this page is all about JE::Boolean β that's the little Perl class that does JavaScript boolean primitive values β¨ like, the actual true / false vibe, not the fancy wrapper object.
β¨ SYNOPSIS β¨
here's the whole thing in action, no cap:
use JE;
use JE::Boolean;
$j = JE->new;
$js_true = new JE::Boolean $j, 1;
$js_false = new JE::Boolean $j, 0;
$js_true ->value; # returns 1
$js_false->value; # returns ""
"$js_true"; # returns "true"
$js_true->to_object; # returns a new JE::Object::Boolean
like, look at her go π«Ά she really said "I contain multitudes."
πΈ DESCRIPTION πΈ
so this class implements JavaScript boolean values for JE. periodt. π
now here's the part where people get confused, and honestly? valid. π The difference between this and JE::Object::Boolean is that that module implements boolean objects, while this module implements the primitive values. so like, JE::Boolean is the raw, unbothered, main-character primitive, and JE::Object::Boolean is the object that wraps around it. two different girls, two different jobs, both iconic π
and the way that stringification and boolean operators are overloaded?? literally the bestie behavior. she just knows what you mean when you say "$js_true". no extra effort required. π
π¦ SEE ALSO π¦
go read these too, they're part of the lore:
JEJE::TypesJE::Object::Boolean
and that's the whole page, bestie π no notes, she ate and left no crumbs.
okay byeee π this was documented under perl v5.36.0, dated 2023-08-25, and it lives in the User Contributed Perl Documentation section β you're welcome, mwah πβ¨π
π¦ where this page comes from
- debian trixie: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms