File Coverage

blib/lib/Test/Legacy/More.pm
Criterion Covered Total %
statement 11 11 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 15 16 93.7


line stmt bran cond sub pod time code
1             package Test::Legacy::More;
2              
3 2     2   1027 use strict;
  2         3  
  2         139  
4 2     2   10 use vars qw(@ISA);
  2         3  
  2         287  
5              
6             require Test::More;
7             @ISA = qw(Test::More);
8              
9             sub import {
10 2     2   16 my $class = shift;
11 2         6 my $caller = caller;
12              
13 2         116 my $ret = eval qq{
14             package $caller;
15             Test::More->import(\@_, import => [qw(!ok !skip !plan)]);
16             };
17              
18 2 50       707 die $@ if $@;
19              
20 2         1830 return $ret;
21             }
22              
23              
24             =head1 NAME
25              
26             Test::Legacy::More - Test::More wrapper for use with Test::Legacy
27              
28             =head1 SYNOPSIS
29              
30             use Test::Legacy;
31             use Test::Legacy::More;
32              
33             ...use Test::Legacy and Test::More as normal...
34              
35             =head1 DESCRIPTION
36              
37             Both Test::Legacy and Test::More export functions called ok(), skip()
38             and plan(). When you use them together you have to tell Test::More
39             not to export those functions.
40              
41             use Test::Legacy;
42             use Test::More import => [qw(!ok !skip !plan)];
43              
44             Since the purpose of Test::Legacy is to transition to Test::More it
45             can be a bit annoying to have to write that all the time.
46             Test::Legacy::More simply does that work for you. It loads Test::More
47             and supresses the exporting of any functions which might conflict with
48             Test::Legacy. It otherwise works just like Test::More.
49              
50              
51             =cut
52              
53             1;