File Coverage

blib/lib/MoopsX/TraitFor/Parser/UsingMoose.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1 1     1   48709 use 5.14.0;
  1         3  
  1         39  
2 1     1   3 use strict;
  1         1  
  1         29  
3 1     1   4 use warnings;
  1         7  
  1         54  
4              
5             package MoopsX::TraitFor::Parser::UsingMoose;
6              
7             our $VERSION = '0.0101'; # VERSION:
8             # ABSTRACT: A Moops::Parser traits that sets 'using Moose'
9              
10 1     1   4 use Moo::Role;
  1         1  
  1         5  
11              
12             after parse => sub {
13             shift->relations->{'using'} = ['Moose'];
14             };
15              
16             1;
17              
18             __END__
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             MoopsX::TraitFor::Parser::UsingMoose - A Moops::Parser traits that sets 'using Moose'
27              
28             =head1 VERSION
29              
30             Version 0.0101, released 2015-03-19.
31              
32             =head1 SYNOPSIS
33              
34             use Moops traits => ['MoopsX::TraitFor::Parser::UsingMoose'];
35              
36             class My::Class {
37              
38             # This is a Moose class
39              
40             }
41              
42             =head1 DESCRIPTION
43              
44             This class is a trait for L<Moops::Parser> that automatically sets 'using Moose' on C<role> and C<class> statements.
45              
46             But use L<MoopX::UsingMoose> instead.
47              
48             =head1 SOURCE
49              
50             L<https://github.com/Csson/p5-MoopsX-UsingMoose>
51              
52             =head1 HOMEPAGE
53              
54             L<https://metacpan.org/release/MoopsX-UsingMoose>
55              
56             =head1 AUTHOR
57              
58             Erik Carlsson <info@code301.com>
59              
60             =head1 COPYRIGHT AND LICENSE
61              
62             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
63              
64             This is free software; you can redistribute it and/or modify it under
65             the same terms as the Perl 5 programming language system itself.
66              
67             =cut