File Coverage

blib/lib/HTTP/Throwable/Variant.pm
Criterion Covered Total %
statement 14 15 93.3
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 19 22 86.3


line stmt bran cond sub pod time code
1             package HTTP::Throwable::Variant;
2             our $AUTHORITY = 'cpan:STEVAN';
3             $HTTP::Throwable::Variant::VERSION = '0.027';
4 5     5   35 use strict;
  5         8  
  5         138  
5 5     5   23 use warnings;
  5         9  
  5         219  
6              
7             use Package::Variant 1.002000
8 5         40 importing => ['Moo', 'MooX::StrictConstructor'],
9 5     5   2328 subs => [ qw(extends with) ];
  5         35589  
10              
11             sub make_variant {
12 60     60 0 196476 my ($class, $target_package, %arguments) = @_;
13 0         0 extends @{ $arguments{superclasses} }
14 60 50       137 if @{ $arguments{superclasses} };
  60         261  
15 60         155 with @{ $arguments{roles} };
  60         265  
16             }
17              
18             1;
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             HTTP::Throwable::Variant - a package that constructs Moo-based HTTP::Throwables for you
27              
28             =head1 VERSION
29              
30             version 0.027
31              
32             =head1 OVERVIEW
33              
34             This package is used by L to build
35             exceptions at runtime. The exceptions are L-based, with
36             L applied as well. It takes two arguments:
37             C, an arrayref of classes to extend, and C, an
38             arrayref of roles to compose.
39              
40             =head1 AUTHORS
41              
42             =over 4
43              
44             =item *
45              
46             Stevan Little
47              
48             =item *
49              
50             Ricardo Signes
51              
52             =back
53              
54             =head1 COPYRIGHT AND LICENSE
55              
56             This software is copyright (c) 2011 by Infinity Interactive, Inc.
57              
58             This is free software; you can redistribute it and/or modify it under
59             the same terms as the Perl 5 programming language system itself.
60              
61             =cut
62              
63             __END__