%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/perl-Moose-2.1005/t/attributes/
Upload File :
Create Path :
Current File : //usr/share/doc/perl-Moose-2.1005/t/attributes/default_undef.t

#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
use Test::Moose;

{
    package Foo;
    use Moose;

    has foo => (
        is        => 'ro',
        isa       => 'Maybe[Int]',
        default   => undef,
        predicate => 'has_foo',
    );
}

with_immutable {
    is(Foo->new->foo, undef);
    ok(Foo->new->has_foo);
} 'Foo';

done_testing;

Zerion Mini Shell 1.0