File Coverage

blib/lib/Renard/Incunabula/Common/Setup.pm
Criterion Covered Total %
statement 38 39 97.4
branch n/a
condition n/a
subroutine 10 11 90.9
pod n/a
total 48 50 96.0


line stmt bran cond sub pod time code
1 1     1   612 use Modern::Perl;
  1         11435  
  1         6  
2             package Renard::Incunabula::Common::Setup;
3             # ABSTRACT: Packages that can be imported into every module
4             $Renard::Incunabula::Common::Setup::VERSION = '0.005';
5 1     1   1134 use autodie;
  1         16492  
  1         4  
6              
7 1     1   7574 use Import::Into;
  1         2979  
  1         29  
8              
9 1     1   632 use Function::Parameters ();
  1         13624  
  1         44  
10 1     1   802 use Return::Type ();
  1         204252  
  1         29  
11 1     1   558 use MooX::TypeTiny ();
  1         3005  
  1         22  
12              
13 1     1   479 use Try::Tiny ();
  1         1277  
  1         22  
14 1     1   453 use Renard::Incunabula::Common::Error ();
  1         6  
  1         27  
15              
16 1     1   1179 use Path::Tiny ();
  1         14574  
  1         279  
17              
18              
19             sub import {
20 2     2   6 my ($class) = @_;
21              
22 2         13 my $target = caller;
23              
24 2         50 Modern::Perl->import::into( $target );
25 2         921 autodie->import::into( $target );
26              
27 2     0   14107 my %type_tiny_fp_check = ( reify_type => sub { Type::Utils::dwim_type($_[0]) }, );
  0         0  
28 2         50 Function::Parameters->import::into( $target,
29             {
30             fun => { defaults => 'function_lax' , %type_tiny_fp_check },
31             classmethod => { defaults => 'classmethod_lax', %type_tiny_fp_check },
32             method => { defaults => 'method_lax' , %type_tiny_fp_check },
33             callback => { defaults => 'function_lax' , %type_tiny_fp_check, check_argument_count => 0 },
34             }
35             );
36 2         2759 Return::Type->import::into( $target );
37              
38 2         574 Try::Tiny->import::into( $target );
39 2         741 Renard::Incunabula::Common::Error->import::into( $target );
40              
41 2         427 Path::Tiny->import::into( $target );
42              
43 2         629 return;
44             }
45              
46             1;
47              
48             __END__
49              
50             =pod
51              
52             =encoding UTF-8
53              
54             =head1 NAME
55              
56             Renard::Incunabula::Common::Setup - Packages that can be imported into every module
57              
58             =head1 VERSION
59              
60             version 0.005
61              
62             =head1 AUTHOR
63              
64             Project Renard
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             This software is copyright (c) 2017 by Project Renard.
69              
70             This is free software; you can redistribute it and/or modify it under
71             the same terms as the Perl 5 programming language system itself.
72              
73             =cut