NAME
HTML::Object::DOM::Boolean - HTML Object DOM Boolean
SYNOPSIS
use HTML::Object::DOM::Boolean;
my $bool = HTML::Object::DOM::Boolean->new(1) ||
die( HTML::Object::DOM::Boolean->error, "\n" );
say $bool->toString;
say $bool->valueOf;
VERSION
v0.2.0
DESCRIPTION
This implements an object wrapper for a boolean value.
The value passed as the first parameter is converted to a boolean value, if necessary. If the value is omitted or is 0
, -0
, undef
, or the empty string (""), the object has an initial value of false (i.e. 0
in perl). All other values, including any object, an empty array ([]), or the string "false", create an object with an initial value of true (i.e. 1
in perl).
METHODS
toString
Returns a string of either true
or false
depending upon the value of the object.
valueOf
Returns the primitive value of the Boolean object, i.e. 0
for false, or 1
for true.
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
COPYRIGHT & LICENSE
Copyright(c) 2021 DEGUEST Pte. Ltd.
All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.