Lines 4-9
use warnings;
Link Here
|
4 |
use strict; |
4 |
use strict; |
5 |
|
5 |
|
6 |
use File::Spec; |
6 |
use File::Spec; |
|
|
7 |
use Data::Dumper; |
7 |
|
8 |
|
8 |
use C4::Installer::PerlDependencies; |
9 |
use C4::Installer::PerlDependencies; |
9 |
|
10 |
|
Lines 80-87
sub version_info {
Link Here
|
80 |
} |
81 |
} |
81 |
} |
82 |
} |
82 |
else { |
83 |
else { |
83 |
for (sort keys(%{$PERL_DEPS})) { |
84 |
my $Readonly_XS_Version; |
|
|
85 |
PERLDEP: for (sort keys(%{$PERL_DEPS})) { |
84 |
my $pkg = $_; # $_ holds the string |
86 |
my $pkg = $_; # $_ holds the string |
|
|
87 |
if ($pkg eq 'Readonly::XS') { |
88 |
eval "require Readonly"; |
89 |
if (!$@) { |
90 |
use Readonly; |
91 |
if ($Readonly::XSokay) { |
92 |
if (-e "/usr/bin/dpkg") { |
93 |
my @data = |
94 |
`/usr/bin/dpkg -l libreadonly-xs-perl`; |
95 |
my $line = pop @data; |
96 |
# line is likely: |
97 |
# ii libreadonly-xs {version} |
98 |
# col0 col1 col2 |
99 |
# handle the extra spaces to get col2 |
100 |
$line =~ s/ / /g; |
101 |
@data = split(/ /,$line); |
102 |
$Readonly_XS_Version = $data[2]; |
103 |
} |
104 |
} |
105 |
} |
106 |
if (!$Readonly_XS_Version) { |
107 |
push (@{$self->{'missing_pm'}}, {$_ => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); |
108 |
} |
109 |
elsif ($Readonly_XS_Version lt $PERL_DEPS->{$_}->{'min_ver'}) { |
110 |
push (@{$self->{'upgrade_pm'}}, {$_ => {cur_ver => $Readonly_XS_Version, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); |
111 |
} |
112 |
else { |
113 |
push (@{$self->{'current_pm'}}, {$_ => {cur_ver => $Readonly_XS_Version, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); |
114 |
} |
115 |
next PERLDEP; |
116 |
} |
85 |
eval "require $pkg"; |
117 |
eval "require $pkg"; |
86 |
if ($@) { |
118 |
if ($@) { |
87 |
push (@{$self->{'missing_pm'}}, {$_ => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); |
119 |
push (@{$self->{'missing_pm'}}, {$_ => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); |
88 |
- |
|
|