Deep/NoTest.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
import
1.0
CRAP 1.0
« Deep/Class.pm ↑ Summary Deep/RegexpVersion.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 # this is for people who don't want Test::Builder to be loaded but want to
5 # use eq_deeply. It's a bit hacky...
6  
7 package Test::Deep::NoTest 1.205;
8 # ABSTRACT: Use Test::Deep outside of the testing framework
9  
10 3 our $NoTest;
11  
12 {
13 3 local $NoTest = 1;
14 3 require Test::Deep;
15 }
16  
17 3 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
18 3 my $import = Test::Deep->can("import");
19 # make the stack look like it should for use Test::Deep
20 3 my $pkg = shift;
21 3 unshift(@_, "Test::Deep");
22 3 push @_, '_notest';
23 3 goto &$import;
24 }
25  
26 3 1;
27  
28 #pod =head1 SYNOPSIS
29 #pod
30 #pod use Test::Deep::NoTest;
31 #pod
32 #pod if (eq_deeply($a, $b)) {
33 #pod print "they were deeply equal\n";
34 #pod }
35 #pod
36 #pod =head1 DESCRIPTION
37 #pod
38 #pod This exports all the same things as Test::Deep but it does not load
39 #pod Test::Builder so it can be used in ordinary non-test situations.
40  
41 __END__
« Deep/Class.pm ↑ Summary Deep/RegexpVersion.pm »