File Coverage

blib/lib/Dist/Zilla/Plugin/Author/Plicease/NoUnsafeInc.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package Dist::Zilla::Plugin::Author::Plicease::NoUnsafeInc 2.39 {
2              
3 2     2   2715620 use 5.014;
  2         9  
4 2     2   12 use Moose;
  2         4  
  2         15  
5              
6             # ABSTRACT: Set x_use_unsafe_inc = 0
7              
8              
9             # Similar to [UseUnsafeInc], except, we don't require a recent Perl
10             # for releases without a environment variable. Risky! But at
11             # least not annoying. We also don't provide an interface to setting
12             # to 1. Code should instead be fixed.
13              
14             with 'Dist::Zilla::Role::MetaProvider',
15             'Dist::Zilla::Role::AfterBuild';
16            
17 2     2   12626 use namespace::autoclean;
  2         6  
  2         19  
18              
19             sub metadata
20             {
21 1     1 0 78446 my($self) = @_;
22 1         6 return { x_use_unsafe_inc => 0 };
23             }
24            
25             sub after_build
26             {
27 1     1 0 10064 my($self) = @_;
28 1         9 $ENV{PERL_USE_UNSAFE_INC} = 0;
29             }
30            
31             __PACKAGE__->meta->make_immutable;
32              
33             };
34              
35             1;
36              
37             __END__
38              
39             =pod
40              
41             =encoding UTF-8
42              
43             =head1 NAME
44              
45             Dist::Zilla::Plugin::Author::Plicease::NoUnsafeInc - Set x_use_unsafe_inc = 0
46              
47             =head1 VERSION
48              
49             version 2.39
50              
51             =head1 SYNOPSIS
52              
53             [Author::Plicease::NoUnsafeInc]
54              
55             =head1 DESCRIPTION
56              
57             Use C<[UseUnsafeInc]> with dot_in_INC set to 0 instead.
58              
59             =head1 AUTHOR
60              
61             Graham Ollis <plicease@cpan.org>
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2017 by Graham Ollis.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut