Brad Appleton <[EMAIL PROTECTED]> writes:
> On Tue, Mar 07, 2000 at 06:40:12PM -0600, Brad Appleton wrote:
>> Russ Allbery <[EMAIL PROTECTED]> wrote

>>> -      next unless (ref || ref eq 'SCALAR');
>>> +      next if (!ref || ref eq 'SCALAR');
>>>        if ($_->isa('Pod::InteriorSequence') or $_->can('nested')) {

>> Eeek! When I apply this patch, it breaks my code. Pod::Text (my test
>> version of it anyay ;-) fails to pass some basic tests, like t/pod/lref
>> and t/pod/headings to name a few.

>> If you want to allow scalars, then you can't use them as refs right?
>> So if its a plain scalar, then we can't try to do $_->methodname
>> correct?

> D'Oh!!! My apologies. It works just fine *if* I alow follow the previous
> suggestion of calling isa() & can() as functions rather than as methods
> (duh!).

Okay, I'm very confused... I made exactly the above patch to my local copy
and it works fine for me under 5.005_03.  Did something change
dramatically in 5.6?

That loop is performing operations that should only be performed on
objects.  Previously, it was skipping anything that wasn't a ref and
anything that wasn't a scalar ref (which is completely redundant and
somewhat obviously meaningless).  After my patch, it's skipping anything
that's not a ref or anything that is a ref to a scalar.

Were you using refs to scalars internally in a way that had to be
reparented using that code?  (Blessed scalar refs, maybe?)  Or am I
horribly confused about something?

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to