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
|
|
|
|
|
|
|
These methods are intended for use outside of the object, allowing parents |
24
|
|
|
|
|
|
|
and others to read publically visible state advertised by the object. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
4
|
|
59
|
use 5.008007; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
142
|
|
29
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
125
|
|
30
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
85
|
|
31
|
4
|
|
|
4
|
|
19
|
use POE::Declare::Meta::Slot (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
95
|
|
32
|
|
|
|
|
|
|
|
33
|
4
|
|
|
4
|
|
27
|
use vars qw{$VERSION @ISA}; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
323
|
|
34
|
|
|
|
|
|
|
BEGIN { |
35
|
4
|
|
|
4
|
|
16
|
$VERSION = '0.59'; |
36
|
4
|
|
|
|
|
412
|
@ISA = 'POE::Declare::Meta::Slot'; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
##################################################################### |
44
|
|
|
|
|
|
|
# Main Methods |
45
|
|
|
|
|
|
|
|
46
|
14
|
|
|
14
|
0
|
115
|
sub as_perl { <<"END_PERL" } |
47
|
|
|
|
|
|
|
use Class::XSAccessor { |
48
|
|
|
|
|
|
|
getters => { |
49
|
|
|
|
|
|
|
$_[0]->{name} => '$_[0]->{name}', |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
}; |
52
|
|
|
|
|
|
|
END_PERL |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SUPPORT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Bugs should be always be reported via the CPAN bug tracker at |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
L |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
For other issues, or commercial enhancement or support, contact the author. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 AUTHORS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SEE ALSO |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L, L |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Copyright 2006 - 2012 Adam Kennedy. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This program is free software; you can redistribute |
79
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The full text of the license can be found in the |
82
|
|
|
|
|
|
|
LICENSE file included with this module. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |