File Coverage

blib/lib/Test/Deep/NoTest.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1 3     3   67528 use strict;
  3         23  
  3         80  
2 3     3   19 use warnings;
  3         5  
  3         458  
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.204;
8             # ABSTRACT: Use Test::Deep outside of the testing framework
9              
10             our $NoTest;
11              
12             {
13             local $NoTest = 1;
14             require Test::Deep;
15             }
16              
17             sub import {
18 3     3   47 my $import = Test::Deep->can("import");
19             # make the stack look like it should for use Test::Deep
20 3         9 my $pkg = shift;
21 3         7 unshift(@_, "Test::Deep");
22 3         7 push @_, '_notest';
23 3         12 goto &$import;
24             }
25              
26             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__