lib/B/DeparseTree.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/B/DeparseTree.pm ↑ Summary lib/B/DeparseTree/P526.pm »
1 package B::DeparseTree;
2  
3 7 ▶use rlib '.';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use vars qw(@ISA $VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 $VERSION = '3.0.0';
8  
9 7 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 my $is_cperl = $Config::Config{usecperl};
11  
12 my $module;
13 if ($] >= 5.016 and $] < 5.018) {
14 # 5.16 and 5.18 are the same for now
15 $module = "P518";
16 } elsif ($] >= 5.018 and $] < 5.020) {
17 $module = "P518";
18 } elsif ($] >= 5.020 and $] < 5.022) {
19 $module = "P520";
20 } elsif ($] >= 5.022 and $] < 5.024) {
21 $module = "P522";
22 } elsif ($] >= 5.024 and $] < 5.026) {
23 $module = "P524";
24 } elsif ($] >= 5.026) {
25 $module = "P526";
26 } else {
27 die "Can only handle Perl 5.16..5.26";
28 }
29  
30 $module .= 'c' if $is_cperl;
31  
32 require "B/DeparseTree/${module}.pm";
33 *compile = \&B::DeparseTree::Common::compile;
34  
35 require Exporter;
36  
37 @ISA = ("Exporter", "B::DeparseTree::$module");
38 our @EXPORT = qw(is_cperl);
39  
40 1;
41  
42 __END__
« blib/lib/B/DeparseTree.pm ↑ Summary lib/B/DeparseTree/P526.pm »