line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Declare::Meta::Attribute; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
POE::Declare::Meta::Attribute - Named accessor with read-only accessor |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
declare status => 'Attribute'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $object = My::Class->new; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
print $object->status . "\n"; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
A B is a L subclass |
20
|
|
|
|
|
|
|
that represents the simplest possible slot, a named attribute with a data |
21
|
|
|
|
|
|
|
storage element in the object HASH, and a readonly accessor. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
7
|
|
|
7
|
|
79
|
use 5.008007; |
|
7
|
|
|
|
|
12
|
|
26
|
7
|
|
|
7
|
|
23
|
use strict; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
98
|
|
27
|
7
|
|
|
7
|
|
19
|
use warnings; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
109
|
|
28
|
7
|
|
|
7
|
|
21
|
use POE::Declare::Meta::Slot (); |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
103
|
|
29
|
|
|
|
|
|
|
|
30
|
7
|
|
|
7
|
|
22
|
use vars qw{$VERSION @ISA}; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
342
|
|
31
|
|
|
|
|
|
|
BEGIN { |
32
|
7
|
|
|
7
|
|
12
|
$VERSION = '0.23_01'; |
33
|
7
|
|
|
|
|
501
|
@ISA = 'POE::Declare::Meta::Slot'; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
##################################################################### |
41
|
|
|
|
|
|
|
# Main Methods |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
|
|
sub _compile { <<"END_PERL" } |
44
|
|
|
|
|
|
|
use Class::XSAccessor getters => { $_[0]->{name} => '$_[0]->{name}' }; |
45
|
|
|
|
|
|
|
END_PERL |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SUPPORT |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Bugs should be always be reported via the CPAN bug tracker at |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
For other issues, or commercial enhancement or support, contact the author. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHORS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SEE ALSO |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
L, L |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright 2006 - 2009 Adam Kennedy. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This program is free software; you can redistribute |
72
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The full text of the license can be found in the |
75
|
|
|
|
|
|
|
LICENSE file included with this module. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |