Hi Shlomi, Everyone
On 12:38:40 08/08/2012 Shlomi Fish <shlo...@shlomifish.org> wrote:
> perl-5.10.1 is very old and no longer actively maintained. There's
> already perl-5.16.0. List::MoreUtils is at version 0.33:
> https://metacpan.org/release/List-MoreUtils .

I am aware that this perl is quite an old one. But for me I am facing the
fact that my piece of code should be able to run on RHEL without "playing
around" on that system. I am not the administrator so there is really no
way to upgrade to a newer version :-(

> Note that List::MoreUtils has both XS and pure-Perl versions of its
> routines, and it is possible there is still a bug in the pure-Perl
> version. 

I would say the bug is in the XS Version:

[root@bach tmp]# perl -wle 'BEGIN {$ENV{LIST_MOREUTILS_PP} = 1}; use
List::MoreUtils; print List::MoreUtils::minmax(1)'
String found where operator expected at (eval 1) line 206, near
"Carp::croak "each_arrayref: argument is not an array reference\n""
        (Do you need to predeclare Carp::croak?)
String found where operator expected at (eval 1) line 226, near
"Carp::croak "each_array: unknown argument '$method' passed to iterator.""
        (Do you need to predeclare Carp::croak?)
Use of inherited AUTOLOAD for non-method List::MoreUtils::minmax() is
deprecated at -e line 1.
Can't locate auto/List/MoreUtils/minmax.al in @INC (@INC contains:
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at -e
line 1
### HUH?? 
### so google showed me this: http://www.perlmonks.org/?node_id=742386

[root@bach tmp]# perl -wle 'BEGIN {$ENV{LIST_MOREUTILS_PP} = 1}; use Carp;
use List::MoreUtils; print List::MoreUtils::minmax(1)'
11
### Cool!

[root@bach tmp]# perl -MCarp -wle 'BEGIN {eval "use List::MoreUtils 0.33";
$ENV{LIST_MOREUTILS_PP} = 1 if ($@)};use List::MoreUtils; print
List::MoreUtils::minmax(1)'
Use of uninitialized value in subroutine entry at -e line 1.
Use of uninitialized value in print at -e line 1.
1
### Why is something like this not working and how can I get it to work?
### FYI:

[root@bach tmp]# perl -wle 'use List::MoreUtils 0.33'
List::MoreUtils version 0.33 required--this is only version 0.22 at -e line
1.
BEGIN failed--compilation aborted at -e line 1.



Regards
 -Martin


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to