line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
18414
|
use 5.10.1; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
49
|
|
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
47
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package MooseX::AttributeDocumented; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.1003'; # VERSION |
8
|
|
|
|
|
|
|
# ABSTRACT: Add Documented trait to all to attributes |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
1056
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Moose::Exporter; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Moose::Exporter->setup_import_methods( |
14
|
|
|
|
|
|
|
class_metaroles => { |
15
|
|
|
|
|
|
|
attribute => ['MooseX::AttributeDocumented::Meta::Attribute::Trait::Documented'], |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding UTF-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
MooseX::AttributeDocumented - Add Documented trait to all to attributes |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Version 0.1003, released 2015-01-18. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package The::Class; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
use Moose; |
38
|
|
|
|
|
|
|
use MooseX::AttributeDocumented; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
has gears => ( |
41
|
|
|
|
|
|
|
is => 'ro', |
42
|
|
|
|
|
|
|
isa => 'Int', |
43
|
|
|
|
|
|
|
default => 21, |
44
|
|
|
|
|
|
|
documentation => 'Number of gears on the bike', |
45
|
|
|
|
|
|
|
documentation_order => 2, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
has has_brakes => ( |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
isa => 'Bool', |
50
|
|
|
|
|
|
|
default => 1, |
51
|
|
|
|
|
|
|
documentation => 'Does the bike have brakes?', |
52
|
|
|
|
|
|
|
documentation_alts => { |
53
|
|
|
|
|
|
|
0 => 'Hopefully a track bike', |
54
|
|
|
|
|
|
|
1 => 'Always nice to have', |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Adds the L<Documented|MooseX::AttributeDocumented> trait to all attributes in the class. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=over 4 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
L<Moose> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SOURCE |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L<https://github.com/Csson/p5-MooseX-AttributeDocumented> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 HOMEPAGE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<https://metacpan.org/release/MooseX-AttributeDocumented> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Erik Carlsson <info@code301.com> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
89
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |