Group
Extension

Matches 79

Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_reader_generation.t ( view source; MetaCPAN )
;

    can_ok($foo, 'get_foo');
    is($foo->get_foo(), undef, '... got an undefined value');
    isnt( exception {
        $foo->get_foo(100);
    }, undef, '... get_foo is a read-only' );

    ok(!e
 can_ok($foo, 'get_lazy_foo');
    is($foo->get_lazy_foo(), 10, '... got an deferred value');
    isnt( exception {
        $foo->get_lazy_foo(100);
    }, undef, '... get_lazy_foo is a read-only' );
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/methods.t ( view source; MetaCPAN )
oo method' );
ok( !$Foo->has_method('foo'),
    '... !Foo->has_method(foo) we just removed it' );
isnt( exception { Foo->foo }, undef, '... cannot call Foo->foo because it is not there' );

is_deeply(
>meta->add_method( $method->name, $method );

my $new_method = Bar->meta->get_method('objecty');

isnt( $method, $new_method,
    'add_method clones method objects as they are added' );
is( $new_metho
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/type_constraints/custom_parameterized_types.t ( view source; MetaCPAN )
t correctly');
ok(!$th->check({foo1 => 1, bar2 => 0, baz3 => 1}), '... validated it correctly');

isnt( exception {
    Moose::Meta::TypeConstraint::Parameterized->new(
        name           => 'Str[
ter => find_type_constraint('Int'),
    );
}, undef, 'non-containers cannot be parameterized' );

isnt( exception {
    Moose::Meta::TypeConstraint::Parameterized->new(
        name           => 'Nonc
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attribute_triggers.t ( view source; MetaCPAN )
 Bling;
    use Moose;

    ::isnt( ::exception {
        has('bling' => (is => 'rw', trigger => 'Fail'));
    }, undef, '... a trigger must be a CODE ref' );

    ::isnt( ::exception {
        has('b
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/native_traits/shallow_clone.t ( view source; MetaCPAN )
one  = $obj->hash_clone;

isnt(refaddr($array), refaddr($array_clone), "array clone refers to new copy");
is_deeply($array_clone, $array, "...but contents are the same");
isnt(refaddr($hash),  refaddr
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/native_traits/trait_hash.t ( view source; MetaCPAN )
or params' );

        isnt( exception {
            $obj->set_option( bar => {} );
        }, undef, '... could not add a hash ref where an string is expected' );

        isnt( exception {
         
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_compose_requires.t ( view source; MetaCPAN )
';
    with 'My::Role1';
}, undef, 'class consumes role4(provides attribute); consumes role1' );

isnt( exception { package My::Test12; use Moose; with 'My::Role1'; with 'My::Role4'; }, undef, 'class 
le5';
    with 'My::Role1';
}, undef, 'class consumes role5(provides method); consumes role1' );

isnt( exception { package My::Test14; use Moose; with 'My::Role1'; with 'My::Role5'; }, undef, 'class 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/RT_27329_fix.t ( view source; MetaCPAN )
;

{
    my $clone = $foo->meta->clone_object($foo, foo => 'BAZ');
    isa_ok($clone, 'Foo');
    isnt($clone, $foo, '... and it is a clone');

    is($clone->get_foo, 'BAZ', '... got the right cloned
}

{
    my $clone = $foo->meta->clone_object($foo, foo => undef);
    isa_ok($clone, 'Foo');
    isnt($clone, $foo, '... and it is a clone');

    ok(!defined($clone->get_foo), '... got the right clo
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/rebless_instance.t ( view source; MetaCPAN )
rent", 'Parent->whoami gives parent');
is($foo->parent, "parent", 'Parent->parent gives parent');
isnt( exception { $foo->child }, undef, "Parent->child method doesn't exist" );

Child->meta->rebless_
rent", 'Parent->whoami gives parent');
is($foo->parent, "parent", 'Parent->parent gives parent');
isnt( exception { $foo->child }, undef, "Parent->child method doesn't exist" );

like( exception { Lef
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/meta_package.t ( view source; MetaCPAN )
;
use Class::MOP::Package;


isnt( exception { Class::MOP::Package->get_all_package_symbols }, undef, q{... can't call get_all_package_symbols() as a class method} );
isnt( exception { Class::MOP::Pac
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/bugs/create_anon_role_pass.t ( view source; MetaCPAN )
s.

    no Moose;
    __PACKAGE__->meta->make_immutable();

    1;
}

my $meta;
use Data::Dumper;
isnt ( exception {
    $meta = Moose::Meta::Class->create_anon_class(
        superclasses => [ 't::bu
[ 'Role::BreakOnLoad', ],
    )
}, undef, 'Class dies when attempting composition');

my $except;
isnt ( $except = exception {
    $meta = Moose::Meta::Class->create_anon_class(
        superclasses =
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/attributes/attr_dereference_test.t ( view source; MetaCPAN )
=> 'ArrayRef[Int]',
        auto_deref => 1,
    );
}

{
    my $autoderef = AutoDeref->new;

    isnt( exception {
        $autoderef->bar(1, 2, 3);
    }, undef, '... its auto-de-ref-ing, not auto-e
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, DOY, 2024; MetaCPAN )
Moose/t/metaclasses/throw_error.t ( view source; MetaCPAN )
 'Moose::Meta::Class',
        error_class => 'Moose::Error::Croak',
    );
    use Moose;

    ::isnt( ::exception { extends 'Baz::Sub' }, undef, 'error_class is included in metaclass compatibility c
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/role_conflict_detection.t ( view source; MetaCPAN )
def, '... composed the role with override okay' );

    package My::Test13;
    use Moose;

    ::isnt( ::exception {
        with 'Role::Plot';
    }, undef, '... cannot compose it because we have no
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/reinitialize_anon_role.t ( view source; MetaCPAN )
        for => $role1->name,
        role_metaroles => { role => ['Role::Metarole'] },
    );
    isnt($role1, $role2, "anon role was reinitialized");
    is($role1->name, $role2->name, "but it's the 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/more_role_edge_cases.t ( view source; MetaCPAN )
"RootC::foo" }

        package SubCA;
        use Moose::Role;

        with "RootC";

        ::isnt( ::exception {
            override foo => sub { "overridden" };
        }, undef, '... cannot co
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/runtime_roles_and_attrs.t ( view source; MetaCPAN )
t");
ok(!$obj->can( 'fur' ), 'ditto');
ok(!$obj->does('Dog'), '... we do not do any roles yet');

isnt( exception {
    $obj->dog($obj)
}, undef, '... and setting the accessor fails (not a Dog yet)' )
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/roles/roles_and_method_cloning.t ( view source; MetaCPAN )
iginal_fully_qualified_name, 'Role::Foo::foo',
        'original fq name is Role::Foo::foo' );
}

isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo");

is( ClassB->foo, '
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/todo_tests/various_role_features.t ( view source; MetaCPAN )
e Moose;

    {
        local our $TODO = "attrs and methods from a role should clash";
        ::isnt( ::exception { with qw(Tree Dog) }, undef );
    }
}

# these fail because of the deferral logic 
Moose ( E/ET/ETHER/Moose-2.2207.tar.gz, ETHER, 2024; MetaCPAN )
Moose/t/cmop/create_class.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

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