line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::MetaDescription::Meta::Attribute; |
2
|
7
|
|
|
7
|
|
49
|
use Moose; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
53
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
5
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'Moose::Meta::Attribute'; |
8
|
|
|
|
|
|
|
with 'MooseX::MetaDescription::Meta::Trait'; |
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
7
|
|
48344
|
no Moose; 1; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
39
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__END__ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=pod |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
MooseX::MetaDescription::Meta::Attribute - Custom attribute metaclass for meta-descriptions |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package Foo; |
23
|
|
|
|
|
|
|
use Moose; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'bar' => ( |
26
|
|
|
|
|
|
|
# use the meta description attribute metaclass for this attr |
27
|
|
|
|
|
|
|
metaclass => 'MooseX::MetaDescription::Meta::Attribute', |
28
|
|
|
|
|
|
|
is => 'ro', |
29
|
|
|
|
|
|
|
isa => 'Str', |
30
|
|
|
|
|
|
|
default => sub { 'Foo::bar' }, |
31
|
|
|
|
|
|
|
description => { |
32
|
|
|
|
|
|
|
baz => 'Foo::bar::baz', |
33
|
|
|
|
|
|
|
gorch => 'Foo::bar::gorch', |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This module provides a custom attribute metaclass to add meta |
40
|
|
|
|
|
|
|
description capabilities to your class attributes. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
NOTE: these are methods composed into this class from |
45
|
|
|
|
|
|
|
L<MooseX::MetaDescription::Meta::Trait> refer to that |
46
|
|
|
|
|
|
|
module for the complete description. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item B<description> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item B<metadescription_classname> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item B<metadescription> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item B<meta> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=back |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 BUGS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
All complex software has bugs lurking in it, and this module is no |
63
|
|
|
|
|
|
|
exception. If you find a bug please either email me, or add the bug |
64
|
|
|
|
|
|
|
to cpan-RT. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 AUTHOR |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Stevan Little E<lt>stevan.little@iinteractive.comE<gt> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Copyright 2008 Infinity Interactive, Inc. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L<http://www.iinteractive.com> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
77
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |