JE::Ob...Number(3pm)
π NAME π
JE::Object::Number β the JavaScript Number object class, bestie β¨
Like, it's the object wrapper version of a JS number. Not the plain primitive. We'll get to that. π
πΈ SYNOPSIS πΈ
use JE;
use JE::Object::Number;
$j = new JE;
$js_num_obj = new JE::Object::Number $j, 953.7;
$perl_scalar = $js_num_obj->value;
0 + $js_num_obj; # 953.7
okay so you make a JE first, then you wrap a number in a JE::Object::Number, and then you can pull the Perl scalar back out with ->value β or just, like, do math on it and Perl goes "sure bestie" and it numifies to 953.7 π
β¨ DESCRIPTION β¨
This class implements JavaScript Number objects for JE. π¦
Now the tea: what's the difference between this and JE::Number? Okay so JE::Number handles primitive number values β the raw little numbers, the ones that are just vibes and a value. This module handles the objects. Like, the actual Number objects, with the wrapper and the methods and the main character energy. π
Two different things. Both valid. Don't mix them up. π
π METHODS π
Most of the methods? Already described over in JE::Types, go read that, it's giving comprehensive. π
Only the stuff that's specific to JE::Object::Number gets explained here, because that's the whole point. β¨
value
Returns a Perl scalar containing the number that the object holds. π
That's it. That's the method. It gives you back your number. No cap.
class
Returns the string 'Number'. π
π₯ SEE ALSO π₯
JEJE::TypesJE::ObjectJE::Number
perl v5.36.0 Β· 2023-08-25 β that's the version and the date this page was cooked up, mwah π go forth and wrap your numbers in objects, bestie, you're gonna slay π«Άβ¨π
π¦ 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