#138 [PATCH] handle empty complexTypes correctly

closed-duplicate
Martin Kutter
Parsing (10)
5
2008-01-30
2008-01-08
Anonymous
No

I get

Can't call method "name" without a package or object reference

when SOAP::Lite is passed and element with an empty complexType and no sequence.

<s:element name="DeletePrompts">
<s:complexType />
</s:element>

The code that parses this relies on "unspecified" perl behavior. I.e.

If the last statement of (a sub) is loop control structure ... then the return value is unspecified.

In particular, this returns [''] (not []) for me:

[(sub { if (defined(undef)) { } })->()]

I assume this is because that's what defined() returns.

The attached patch fixes it for me.

-Jim Radford (radford at blackbean dot org)

Discussion

  • Fix empty complexType bug

     
    Attachments
  • Martin Kutter
    Martin Kutter
    2008-01-30

    • assigned_to: byrnereese --> kutterma
    • status: open --> closed-duplicate
     
  • Martin Kutter
    Martin Kutter
    2008-01-30

    Logged In: YES
    user_id=884175
    Originator: NO

    Duplicate of ! Fixes #32810: [PATCH] handle empty complexTypes correctly (duplicate) on rt.cpan.org.

    Fixed in CVS.