12 sub new { bless {}, shift }
18 use Class::Struct 'struct';
20 use Class::Struct SomeClass => { SomeElem => '$' };
22 struct( s => '$', a => '@', h => '%', c => 'aClass' );
28 print "not " unless $obj->s() eq 'foo';
33 print "not " unless ref $arf eq 'ARRAY';
36 $obj->a(2, 'secundus');
38 print "not " unless $obj->a(2) eq 'secundus';
43 print "not " unless ref $hrf eq 'HASH';
48 print "not " unless $obj->h('x') == 10;
53 print "not " unless ref $orf eq 'aClass';
56 print "not " unless $obj->c->meth() == 42;
59 my $obk = SomeClass->new();
63 print "not " unless $obk->SomeElem() == 123;