NAME

BarefootJS::Undefined - JS undefined for the BarefootJS Perl runtime

SYNOPSIS

use BarefootJS;

my $u = $BarefootJS::UNDEF;               # JS undefined
BarefootJS::Undefined::is_undefined($u);  # 1
BarefootJS::Undefined::is_null(undef);    # 1 (Perl undef is JS null)
BarefootJS::Undefined::is_nullish($u);    # 1

DESCRIPTION

Perl's undef is JS null. JS undefined is the singleton $BarefootJS::UNDEF, which is false in boolean context, prints as '', numifies to NaN, and is defined in Perl's sense. Test it with is_undefined, is_null and is_nullish, never with defined or //.