| 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__ | ||