File Coverage

blib/lib/Reindeer/Role.pm
Criterion Covered Total %
statement 31 31 100.0
branch 2 4 50.0
condition n/a
subroutine 7 7 100.0
pod 0 1 0.0
total 40 43 93.0


line stmt bran cond sub pod time code
1             #
2             # This file is part of Reindeer
3             #
4             # This software is Copyright (c) 2011 by Chris Weyl.
5             #
6             # This is free software, licensed under:
7             #
8             # The GNU Lesser General Public License, Version 2.1, February 1999
9             #
10             package Reindeer::Role;
11             our $AUTHORITY = 'cpan:RSRCHBOY';
12             $Reindeer::Role::VERSION = '0.018';
13             # ABSTRACT: Reindeer in role form
14              
15 7     7   1668950 use strict;
  7         13  
  7         355  
16 7     7   30 use warnings;
  7         9  
  7         315  
17              
18 7     7   30 use Reindeer::Util;
  7         8  
  7         201  
19 7     7   938 use Moose::Exporter;
  7         11  
  7         207  
20 7     7   181 use Import::Into;
  7         10  
  7         1372  
21              
22             my (undef, undef, $init_meta) = Moose::Exporter->build_import_methods(
23             install => [ qw{ import unimport } ],
24              
25             also => [ 'Moose::Role', Reindeer::Util::also_list() ],
26             trait_aliases => [ Reindeer::Util::trait_aliases() ],
27             as_is => [ Reindeer::Util::as_is() ],
28             );
29              
30             sub init_meta {
31 12     12 0 130475 my ($class, %options) = @_;
32 12         23 my $for_class = $options{for_class};
33              
34 12 50       62 if ($] >= 5.010) {
35              
36 7     7   33 eval 'use feature';
  7         9  
  7         1159  
  12         547  
37 12         707 feature->import(':5.10');
38             }
39              
40             ### $for_class
41 12         77 Moose::Role->init_meta(for_class => $for_class);
42 12         27746 Reindeer::Util->import_type_libraries({ -into => $for_class });
43 12         967 Path::Class->export_to_level(1);
44 12         105 Try::Tiny->import::into(1);
45 12         2557 MooseX::Params::Validate->import({ into => $for_class });
46 12         2941 Moose::Util::TypeConstraints->import(
47             { into => $for_class },
48             qw{ class_type role_type duck_type },
49             );
50 12         5468 MooseX::MarkAsMethods->import({ into => $for_class }, autoclean => 1);
51              
52 12 50       58246 goto $init_meta if defined $init_meta;
53             }
54              
55             !!42;
56              
57             __END__
58              
59             =pod
60              
61             =encoding UTF-8
62              
63             =for :stopwords Chris Weyl
64              
65             =for :stopwords Wishlist flattr flattr'ed gittip gittip'ed
66              
67             =head1 NAME
68              
69             Reindeer::Role - Reindeer in role form
70              
71             =head1 VERSION
72              
73             This document describes version 0.018 of Reindeer::Role - released March 28, 2015 as part of Reindeer.
74              
75             =head1 SYNOPSIS
76              
77             # ta-da!
78             use Reindeer::Role;
79              
80             =head1 DESCRIPTION
81              
82             For now, see the L<Reindeer> docs for information about what meta extensions
83             are automatically applied.
84              
85             =for Pod::Coverage init_meta
86              
87             =head1 SEE ALSO
88              
89             Please see those modules/websites for more information related to this module.
90              
91             =over 4
92              
93             =item *
94              
95             L<Reindeer|Reindeer>
96              
97             =item *
98              
99             L<Moose::Role>
100              
101             =back
102              
103             =head1 SOURCE
104              
105             The development version is on github at L<http://https://github.com/RsrchBoy/reindeer>
106             and may be cloned from L<git://https://github.com/RsrchBoy/reindeer.git>
107              
108             =head1 BUGS
109              
110             Please report any bugs or feature requests on the bugtracker website
111             https://github.com/RsrchBoy/reindeer/issues
112              
113             When submitting a bug or request, please include a test-file or a
114             patch to an existing test-file that illustrates the bug or desired
115             feature.
116              
117             =head1 AUTHOR
118              
119             Chris Weyl <cweyl@alumni.drew.edu>
120              
121             =head2 I'm a material boy in a material world
122              
123             =begin html
124              
125             <a href="https://www.gittip.com/RsrchBoy/"><img src="https://raw.githubusercontent.com/gittip/www.gittip.com/master/www/assets/%25version/logo.png" /></a>
126             <a href="http://bit.ly/rsrchboys-wishlist"><img src="http://wps.io/wp-content/uploads/2014/05/amazon_wishlist.resized.png" /></a>
127             <a href="https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Freindeer&title=RsrchBoy's%20CPAN%20Reindeer&tags=%22RsrchBoy's%20Reindeer%20in%20the%20CPAN%22"><img src="http://api.flattr.com/button/flattr-badge-large.png" /></a>
128              
129             =end html
130              
131             Please note B<I do not expect to be gittip'ed or flattr'ed for this work>,
132             rather B<it is simply a very pleasant surprise>. I largely create and release
133             works like this because I need them or I find it enjoyable; however, don't let
134             that stop you if you feel like it ;)
135              
136             L<Flattr this|https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Freindeer&title=RsrchBoy's%20CPAN%20Reindeer&tags=%22RsrchBoy's%20Reindeer%20in%20the%20CPAN%22>,
137             L<gittip me|https://www.gittip.com/RsrchBoy/>, or indulge my
138             L<Amazon Wishlist|http://bit.ly/rsrchboys-wishlist>... If you so desire.
139              
140             =head1 COPYRIGHT AND LICENSE
141              
142             This software is Copyright (c) 2011 by Chris Weyl.
143              
144             This is free software, licensed under:
145              
146             The GNU Lesser General Public License, Version 2.1, February 1999
147              
148             =cut