Russ Allbery <[EMAIL PROTECTED]> wrote
> - next unless (ref || ref eq 'SCALAR');
> + next if (!ref || ref eq 'SCALAR');
> if ($_->isa('Pod::InteriorSequence') or $_->can('nested')) {
While correcting the logic, why not get rid of the dodgy test entirely?
if (UNIVERSAL::isa($_, 'Pod::InteriorSequence') or
UNIVERSAL::can($_, 'nested')) {
My rule of thumb is that if you're doing an explicit equality test
on the result of ref(), there's almost certainly a better way.
And it's usually better practice to use can() and isa() as subroutines
rather than methods. (I hate to think about classes that override
either of these ... )
Mike Guy