The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

# Note: See thread "Undef issues" by Adrian Taylor on p6l # http://groups.google.com/groups?threadm=20050601002444.GB32060@wall.org

plan 75;

our $GLOBAL;

# "Scalar/"=item undef"" in S29

is(undef, undef, "undef is equal to undef"); ok(!defined(undef), "undef is not defined");

{ my $a; ok(!defined($a), "uninitialized lexicals are undef"); }

# "Scalar/"=item undefine"" in S29 { my @ary = "arg1"; my $a = @ary.pop; ok(defined($a), "pop from array"); $a = @ary.pop; ok(!defined($a), "pop from empty array"); }

#?rakudo skip 'access to &your_sub' { sub a_sub { "møøse" }

    ok(defined(&a_sub), "defined sub");
}

# rules # TODO. refer to S05 # "Match objects/"they will all be undefined" closure # "let keyword"" in S05

# - unmatched alternative should bind to undef #?rakudo skip 'null PMC access in type()' #?DOES 10 { my ($num, $alpha); my ($rx1, $rx2); eval ' $rx1 = rx '; ok(defined($num), '{$_}: successful hypothetical'); }

# subroutines { sub bar ($bar, $baz?, :$quux) { is($bar, "BAR", "defined param"); # sanity

        # L<<S06/Optional parameters/Missing optional arguments>>
        ok(!defined($baz), "unspecified optional param");

        # L<S06/Named parameters/Named parameters are optional>
        ok(!defined($quux), "unspecified optional param");
    }

    bar("BAR");

}

# autoloading # "Autoloading" in S10

#?pugs skip 'parsefail' #?rakudo skip 'parsefail' flunk('FIXME: parsefail');

# Extra tests added due to apparent bugs is((undef) + 1, 1, 'undef + 1'); is(1 + (undef), 1, '1 + undef');

# http://colabti.de/irclogger/irclogger_log/perl6?date=2006-09-12,Tue&sel=145#l186 # See log above. From IRC, TimToady says that both of these # should be false. (At time of writing, @(undef,) is true.) is ?(@(undef,)), Bool::False, '?(@(undef,)) is false';

# "Something else" in S19 is ?(list(undef,)), Bool::False, '?(@(undef,)) is false';

1 POD Error

The following errors were encountered while parsing the POD:

Around line 43:

Non-ASCII character seen before =encoding in '"møøse"'. Assuming UTF-8