File Coverage

blib/lib/Moo/Role/Lax.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 26 26 100.0


line stmt bran cond sub pod time code
1             #
2             # This file is part of Moo-Lax
3             #
4             # This software is Copyright (c) 2014 by Damien Krotkine.
5             #
6             # This is free software, licensed under:
7             #
8             # The Artistic License 2.0 (GPL Compatible)
9             #
10             package Moo::Role::Lax;
11             {
12             $Moo::Role::Lax::VERSION = '0.15';
13             }
14              
15             #ABSTRACT: Loads Moo::Role without turning warnings to fatal.
16              
17              
18 1     1   26177 use strict;
  1         1  
  1         70  
19 1     1   6 use warnings;
  1         1  
  1         63  
20              
21 1     1   991 use Moo::Role ();
  1         43502  
  1         581  
22 1     1   16 use Import::Into;
  1         2  
  1         73  
23              
24             sub import {
25 1     1   5 no warnings 'uninitialized';
  1         3  
  1         114  
26 1     1   10 my $previous_bits = ${^WARNING_BITS} & $warnings::DeadBits{all};
27 1         10 local $ENV{PERL_STRICTURES_EXTRA} = 0;
28 1         9 Moo::Role->import::into(caller, @_);
29 1         1932 ${^WARNING_BITS} &= ~$warnings::DeadBits{all} | $previous_bits;
30 1         3951 return;
31             }
32              
33             1;
34              
35             __END__