Thanks for the tip, Joel.  The equivalence information
is a help for developers wishing to be compatible with
all PDL installations.  Support for perl 5.8.x is needed
for that.

--Chris

On 3/4/2012 11:07 AM, Joel Berger wrote:
And you probably want to test for definedness in case of a $_ which is a
falsey value.

use List::Util qw/first/;
unless do {
     my $test = $_;
     defined first { $test eq $_ } @$arg_names
};

On Sun, Mar 4, 2012 at 9:31 AM, Joel Berger<[email protected]>  wrote:

1) Prima.pm.PL contains a syntax error for 5.8.x :
unless $_ ~~ @$arg_names


The smart match operator was introduced in
version 5.10.1.


I'm sure you know this, but about the closest you can get to that
construct that is back portable is something like:

use List::Util qw/first/;
unless do {
     my $test = $_;
     first { $test eq $_ } @$arg_names
};

And List::More has been core since 5.7.3 so its not even an extra dep for
5.8

Cheers,
Joel

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to