Group
Extension

Matches 79

Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/recipes/basics_binarytree_attributefeatures.t ( view source; MetaCPAN )
t)');

ok(isweak($left_right->{parent}), '... parent is a weakened ref');

# and check the error

isnt(
    exception {
        $left_right->right($left_left);
    },
    undef,
    '... cannot assign
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_lazy_initializer.t ( view source; MetaCPAN )
  $callback->("Hello $value World");
        },
    );

    __PACKAGE__->meta->make_immutable;
}

isnt( exception {
    Fail::Bar->new(foo => 10)
}, undef, '... this fails, because initializer returns
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/recipes/basics_bankaccount_methodmodifiersandsubclassing.t ( view source; MetaCPAN )
king_account->balance, 50,
        '... got the right checkings balance after withdrawal' );

    isnt(
        exception {
            $checking_account->withdraw(200);
        },
        undef,
    
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/type_constraints/match_type_operator.t ( view source; MetaCPAN )
. got the right value');
is( is_acceptable_color( 'black' ), 'CMYK', '... got the right value');

isnt( exception {
    is_acceptable_color( 'orange' )
}, undef, '... got the exception' );

## using i
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/runtime_roles_and_nonmoose.t ( view source; MetaCPAN )
 = Foo->new;
isa_ok($foo, 'Foo');

ok(!$bar->can( 'talk' ), "... the role is not composed yet");

isnt( exception {
    $foo->dog($bar)
}, undef, '... and setting the accessor fails (not a Dog yet)' )
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/inline_structor.t ( view source; MetaCPAN )
    );
        },
        q{},
        'no warning when replace_destructor is true'
    );

    ::isnt(
        $meta->find_method_by_name('new')->body,
        HasConstructor2->can('new'),
        'H
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/examples/example_Protomoose.t ( view source; MetaCPAN )
f the
# prototype
my $foo = Foo->new;
isa_ok($foo, 'Foo');

# the instance is *not* the prototype
isnt($foo, $foo_prototype, '... got a new instance of Foo');

# but it has the same values ...
is($foo
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/super_and_override.t ( view source; MetaCPAN )
ckage Bling::Bling;
    use Moose;

    extends 'Bling';

    sub bling { 'Bling::bling' }

    ::isnt( ::exception {
        override 'bling' => sub {};
    }, undef, '... cannot override a method wh
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/create.t ( view source; MetaCPAN )
 ARRAY ref of roles/ );

ok !is_class_loaded('Made::Of::Fail'), "did not create Made::Of::Fail";

isnt( exception {
    Moose::Meta::Class->create(
        'Continuing::To::Fail',
        superclasses
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/inner_and_augment.t ( view source; MetaCPAN )
ckage Bling::Bling;
    use Moose;

    extends 'Bling';

    sub bling { 'Bling::bling' }

    ::isnt( ::exception {
        augment 'bling' => sub {};
    }, undef, '... cannot augment a method whic
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/basic_class_setup.t ( view source; MetaCPAN )
t the &meta method');
ok(Foo->isa('Moose::Object'), '... Foo is automagically a Moose::Object');

isnt( exception {
   Foo->meta->has_method()
}, undef, '... has_method requires an arg' );

can_ok('Fo
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/basics/moose_respects_type_constraints.t ( view source; MetaCPAN )


is( exception {
    $bar->foo('Foo');
}, undef, '... checked the type constraint correctly' );

isnt( exception {
    $bar->foo(Foo->new);
}, undef, '... checked the type constraint correctly' );

d
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/immutable/immutable_moose.t ( view source; MetaCPAN )
able" );
    is( exception { $meta->identifier }, undef, "->identifier on metaclass lives" );
    isnt( exception { $meta->add_role($foo_role) }, undef, "Add Role is locked" );
    is( exception { Foo
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/add_attribute_alternate.t ( view source; MetaCPAN )
or');

is($point->x, 2, '... the x attribute was initialized correctly through the metaobject');

isnt( exception {
    $point->x(42);
}, undef, '... cannot write to a read-only accessor' );
is($point
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/immutable_w_custom_metaclass.t ( view source; MetaCPAN )
ok( $meta->can('mymetaclass_attributes'),
        '... meta can do method after immutable' );
    isnt( Scalar::Util::blessed( Baz->meta ),
        Scalar::Util::blessed( Bar->meta ),
        'Baz and
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/add_method_modifier.t ( view source; MetaCPAN )
;
is( $savings_account->balance, 200,
    '... got the right savings balance after withdrawal' );
isnt( exception {
    $savings_account->withdraw(250);
}, undef, '... could not withdraw from savings 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/moose_util/method_mod_args.t ( view source; MetaCPAN )
'before', [ ['foo', 'bar'], sub { $COUNT++ } ]);
}, undef, 'method modifier with an arrayref' );

isnt( exception {
    add_method_modifier('Foo', 'before', [ {'foo' => 'bar'}, sub { $COUNT++ } ]);
},
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/immutable/inlined_constructors_n_types.t ( view source; MetaCPAN )
 an int");
    }, undef, "... the constructor doesn't care about 'zot' ($mutable_string)" );

    isnt( exception {
        Foo->new(foo => "Hello World", bar => 100, baz => "Hello World");
    }, und
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_delegation.t ( view source; MetaCPAN )
->new },
        handles => ['bar']
    );

    package Goorch::Autoloaded;
    use Moose;

    ::isnt( ::exception {
        has 'foo' => (
            is      => 'rw',
            default => sub { F

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.