File Coverage

blib/lib/Jojo/Compat.pm
Criterion Covered Total %
statement 3 11 27.2
branch 0 4 0.0
condition n/a
subroutine 1 2 50.0
pod n/a
total 4 17 23.5


line stmt bran cond sub pod time code
1              
2             package Jojo::Compat;
3              
4             our $VERSION = '0.1.0';
5              
6             # ABSTRACT: Jojo::Base and Jojo::Role for pure Perl environments
7              
8 1     1   1010 use Importer::Zim 'Module::Spec::V2' => 'try_module', 'need_module';
  1         2  
  1         9  
9              
10             sub import {
11              
12 0 0   0     unless ( try_module('Jojo::Role~0.5.0') ) {
13 0           need_module('Jojo::Role::Compat');
14 0           *Jojo::Role:: = \*Jojo::Role::Compat::;
15 0           $INC{'Jojo/Role.pm'} = $INC{'Jojo/Role/Compat.pm'};
16             }
17              
18 0 0         unless ( try_module('Jojo::Base~0.7.0') ) {
19 0           need_module('Jojo::Base::Compat');
20 0           *Jojo::Base:: = \*Jojo::Base::Compat::;
21 0           $INC{'Jojo/Base.pm'} = $INC{'Jojo/Base/Compat.pm'};
22             }
23             }
24              
25             1;
26              
27             #pod =encoding utf8
28             #pod
29             #pod =head1 SYNOPSIS
30             #pod
31             #pod use Jojo::Compat; # before any code which uses Jojo::Base and/or Jojo::Role
32             #pod
33             #pod =head1 DESCRIPTION
34             #pod
35             #pod This is meant to help run code which uses L and L
36             #pod on installations where L is not available.
37             #pod L is the module responsible for the magic of lexical imports
38             #pod and requires a C compiler to build. L provides an
39             #pod alternative that uses clean imports via L instead.
40             #pod
41             #pod =head1 SEE ALSO
42             #pod
43             #pod L, L.
44             #pod
45             #pod =head1 ACKNOWLEDGEMENTS
46             #pod
47             #pod The development of this library has been sponsored by Connectivity, Inc.
48             #pod
49             #pod =cut
50              
51             __END__