File Coverage

blib/lib/MooseX/AttributeDocumented.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1 1     1   65238 use 5.10.1;
  1         11  
2 1     1   6 use strict;
  1         2  
  1         20  
3 1     1   4 use warnings;
  1         2  
  1         64  
4              
5             package MooseX::AttributeDocumented;
6              
7             # ABSTRACT: Add Documented trait to all to attributes
8             our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9             our $VERSION = '0.1004';
10              
11 1     1   519 use Moose;
  1         457298  
  1         6  
12 1     1   7299 use Moose::Exporter;
  1         3  
  1         6  
13              
14             Moose::Exporter->setup_import_methods(
15             class_metaroles => {
16             attribute => ['MooseX::AttributeDocumented::Meta::Attribute::Trait::Documented'],
17             },
18             );
19              
20             __END__
21              
22             =pod
23              
24             =encoding UTF-8
25              
26             =head1 NAME
27              
28             MooseX::AttributeDocumented - Add Documented trait to all to attributes
29              
30              
31              
32             =begin html
33              
34             <p>
35             <img src="https://img.shields.io/badge/perl-5.10.1+-blue.svg" alt="Requires Perl 5.10.1+" />
36             <a href="https://travis-ci.org/Csson/p5-MooseX-AttributeDocumented"><img src="https://api.travis-ci.org/Csson/p5-MooseX-AttributeDocumented.svg?branch=master" alt="Travis status" /></a>
37             <a href="http://cpants.cpanauthors.org/release/CSSON/MooseX-AttributeDocumented-0.1004"><img src="http://badgedepot.code301.com/badge/kwalitee/CSSON/MooseX-AttributeDocumented/0.1004" alt="Distribution kwalitee" /></a>
38             <a href="http://matrix.cpantesters.org/?dist=MooseX-AttributeDocumented%200.1004"><img src="http://badgedepot.code301.com/badge/cpantesters/MooseX-AttributeDocumented/0.1004" alt="CPAN Testers result" /></a>
39             <img src="https://img.shields.io/badge/coverage-100.0%-brightgreen.svg" alt="coverage 100.0%" />
40             </p>
41              
42             =end html
43              
44             =head1 VERSION
45              
46             Version 0.1004, released 2019-01-30.
47              
48             =head1 SYNOPSIS
49              
50             package The::Class;
51              
52             use Moose;
53             use MooseX::AttributeDocumented;
54              
55             has gears => (
56             is => 'ro',
57             isa => 'Int',
58             default => 21,
59             documentation => 'Number of gears on the bike',
60             documentation_order => 2,
61             );
62             has has_brakes => (
63             is => 'ro',
64             isa => 'Bool',
65             default => 1,
66             documentation => 'Does the bike have brakes?',
67             documentation_alts => {
68             0 => 'Hopefully a track bike',
69             1 => 'Always nice to have',
70             },
71             );
72              
73             =head1 DESCRIPTION
74              
75             Adds the L<Documented|MooseX::AttributeDocumented> trait to all attributes in the class.
76              
77             =head1 SEE ALSO
78              
79             =over 4
80              
81             =item *
82              
83             L<Moose>
84              
85             =back
86              
87             =head1 SOURCE
88              
89             L<https://github.com/Csson/p5-MooseX-AttributeDocumented>
90              
91             =head1 HOMEPAGE
92              
93             L<https://metacpan.org/release/MooseX-AttributeDocumented>
94              
95             =head1 AUTHOR
96              
97             Erik Carlsson <info@code301.com>
98              
99             =head1 COPYRIGHT AND LICENSE
100              
101             This software is copyright (c) 2016 by Erik Carlsson.
102              
103             This is free software; you can redistribute it and/or modify it under
104             the same terms as the Perl 5 programming language system itself.
105              
106             =cut