1package T1;
2use base 'Object::Simple';
3
4use strict;
5use warnings;
6
7__PACKAGE__->attr('m1');
8__PACKAGE__->class_attr('m2');
9__PACKAGE__->dual_attr('m3');
10
11__PACKAGE__->attr([qw/m4_1 m4_2/]);
12__PACKAGE__->class_attr([qw/m5_1 m5_2/]);
13__PACKAGE__->dual_attr([qw/m6_1 m6_2/]);
14
15__PACKAGE__->class_attr('m9', default => 9);
16__PACKAGE__->dual_attr('m10', default => 10);
17
18__PACKAGE__->attr('m11' => 1);
19__PACKAGE__->attr('m12' => sub { 9 });
20
21__PACKAGE__->class_attr('m13' => 'm13');
22__PACKAGE__->class_attr('m14' => sub { 'm14' });
23
24__PACKAGE__->dual_attr('m15' => 'm15');
25__PACKAGE__->dual_attr('m16' => sub { 'm16' });
26
27__PACKAGE__->attr([qw/m18 m19/] => 5);
28__PACKAGE__->class_attr([qw/m20 m21/] => 6);
29__PACKAGE__->dual_attr([qw/m22 m23/] => 7);
30
31
32__PACKAGE__->dual_attr('m24', default => sub { {a => 1} },
33                              inherit => 'hash_copy');
34
35__PACKAGE__->dual_attr('m25', default => sub { [1, 2] },
36                              inherit => 'array_copy');
37
38__PACKAGE__->dual_attr('m26', default => 1,
39                              inherit => 'scalar_copy');
40
41__PACKAGE__->class_attr('m27', default => sub { {} }, inherit => 'hash_copy');
42__PACKAGE__->m27->{a1} = 1;
43
44__PACKAGE__->class_attr('m28', default => sub { [] }, inherit => 'array_copy');
45__PACKAGE__->m28->[0] = 1;
46
47__PACKAGE__->class_attr('m29', default => sub { shift->m30 }, inherit => 'scalar_copy');
48__PACKAGE__->dual_attr('m30', default => 5);
49
50__PACKAGE__->attr(m31 => sub { shift->m30 });
51__PACKAGE__->class_attr(m32 => sub { shift->m30 });
52
53__PACKAGE__->attr(
54    [qw/m33 m34/],
55    m35 => 1,
56    m36 => sub { 5 }
57);
58
59__PACKAGE__->attr(
60    m37 => 1,
61    m38 => sub { 5 }
62);
63
64package T1_2;
65use base 'T1';
66
67__PACKAGE__->m27->{a2} = 2;
68__PACKAGE__->m28->[1] = 2;
69
70package T1_3;
71use base 'T1_2';
72
731;
74