develooper Front page | perl.perl5.porters | Postings from December 2009

Re: Pod::Abstract 0.19 generating warnings on 5.11.3

Thread Previous | Thread Next
From:
Eric Brine
Date:
December 28, 2009 08:25
Subject:
Re: Pod::Abstract 0.19 generating warnings on 5.11.3
Message ID:
f86994700912280824p67d8f754id6b27c2f56b4add3@mail.gmail.com
On Mon, Dec 28, 2009 at 6:39 AM, <hv@crypt.org> wrote:

> FWIW I have copies of this scattered around various codebases:
>    sub _isa {
>        my($val, $class) = @_;
>        eval { $val->can('isa') }
>            ? $val->isa($class)
>            : UNIVERSAL::isa($val, $class);
>    }
>

Why isn't that just

eval { $val->isa($class) }

Are you doing

_isa($val, 'ARRAY')

instead of

eval { @$val; 1 }

?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About