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