Lines Matching refs:obj
42 my $obj = MyObj->new;
43 isa_ok $obj, 'MyObj';
45 $obj->s('foo');
46 is $obj->s(), 'foo';
48 isa_ok $obj->a, 'ARRAY';
49 $obj->a(2, 'secundus');
50 is $obj->a(2), 'secundus';
52 $obj->a([4,5,6]);
53 is $obj->a(1), 5;
55 isa_ok $obj->h, 'HASH';
56 $obj->h('x', 10);
57 is $obj->h('x'), 10;
59 $obj->h({h=>7,r=>8,f=>9});
60 is $obj->h('r'), 8;
62 is $obj->c, undef;
64 $obj = MyObj->new( c => aClass->new );
65 isa_ok $obj->c, 'aClass';
66 is $obj->c->meth(), 42;
69 $obj = MyOther->new;
70 isa_ok $obj, 'MyOther';
72 $obj->s('foo');
73 is $obj->s(), 'foo';
75 isa_ok $obj->a, 'ARRAY';
76 $obj->a(2, 'secundus');
77 is $obj->a(2), 'secundus';
79 $obj->a([4,5,6]);
80 is $obj->a(1), 5;
82 isa_ok $obj->h, 'HASH';
83 $obj->h('x', 10);
84 is $obj->h('x'), 10;
86 $obj->h({h=>7,r=>8,f=>9});
87 is $obj->h('r'), 8;
89 is $obj->c, undef;
91 $obj = MyOther->new( c => aClass->new );
92 isa_ok $obj->c, 'aClass';
93 is $obj->c->meth(), 42;