Driver/MemcachedFast/Test.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 36 CC 2 SCAR 11.0
CC
2
Cov
0%
export_to_level
6.0
import
2.0
packages_to_import
2.0
CRAP 3.0
1 # $Id: $
2 #
3 package CHI::Driver::MemcachedFast::Test;
4 use CHI::Driver::MemcachedFast::Util qw(require_dynamic);
5 use strict;
6 use warnings;
7  
8 sub import {
9 my $class = shift;
10 $class->export_to_level( 1, undef, @_ );
11 }
12  
13 sub packages_to_import {
14 return (
15 qw(
16 Test::Deep
17 Test::More
18 Test::Exception
19 CHI::Driver::Memcached::Test::Util
20 )
21 );
22 }
23  
24 sub export_to_level {
25 my ( $class, $level, $ignore ) = @_;
26  
27 foreach my $package ( $class->packages_to_import() ) {
28 require_dynamic($package);
29 my @export;
30 if ( $package eq 'Test::Deep' ) {
31  
32 # Test::Deep exports way too much by default
33 @export =
34 qw(eq_deeply cmp_deeply cmp_set cmp_bag cmp_methods subbagof superbagof subsetof supersetof superhashof subhashof);
35 }
36 else {
37  
38 # Otherwise, grab everything from @EXPORT
39 no strict 'refs';
40 @export = @{"$package\::EXPORT"};
41 }
42 $package->export_to_level( $level + 1, undef, @export );
43 }
44 }
45  
46 1;