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   617 use Modern::Perl;
  1         8190  
  1         8  
2             package Renard::Incunabula::Common::Setup;
3             # ABSTRACT: Packages that can be imported into every module
4             $Renard::Incunabula::Common::Setup::VERSION = '0.003';
5 1     1   620 use autodie;
  1         12423  
  1         6  
6              
7 1     1   7558 use Import::Into;
  1         2174  
  1         24  
8              
9 1     1   1163 use Function::Parameters ();
  1         3668  
  1         21  
10 1     1   648 use Return::Type ();
  1         75739  
  1         40  
11 1     1   1008 use MooX::TypeTiny ();
  1         193  
  1         19  
12              
13 1     1   523 use Try::Tiny ();
  1         1112  
  1         20  
14 1     1   814 use Renard::Incunabula::Common::Error ();
  1         4  
  1         21  
15              
16 1     1   1641 use Path::Tiny ();
  1         9620  
  1         279  
17              
18              
19             sub import {
20 5     5   98 my ($class) = @_;
21              
22 5         35 my $target = caller;
23              
24 5         175 Modern::Perl->import::into( $target );
25 5         2136 autodie->import::into( $target );
26              
27 5     0   35358 my %type_tiny_fp_check = ( reify_type => sub { Type::Utils::dwim_type($_[0]) }, );
  0         0  
28 5         126 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 5         6298 Return::Type->import::into( $target );
37              
38 5         1153 Try::Tiny->import::into( $target );
39 5         1219 Renard::Incunabula::Common::Error->import::into( $target );
40              
41 5         1064 Path::Tiny->import::into( $target );
42              
43 5         1414 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.003
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