in reply to Re^3: Parsing SOAP::Lite results
in thread Parsing SOAP::Lite results
I see what's causing my issue with the 'Not an ARRAY ref' error. When there is only one location it's not an array.
$VAR1 = { 'Toys' => bless( { 'Toy' => [ bless( { 'ToyLocations' => bless( { 'ToyLocation' => { 'toyQuantity' => '2', 'locationName' => 'toy +box' } }, 'ArrayOfToyLocation' ), 'color' => 'brown', 'toyName' => 'bear', 'size' => 'large' }, 'Stuffed' ), bless( { 'ToyLocations' => bless( { 'ToyLocation' => [ { 'toyQuantity' => '1', 'locationName' => 'toy +box' }, { 'toyQuantity' => '4', 'locationName' => 'she +lf' } ] }, 'ArrayOfToyLocation' ), 'color' => 'none', 'toyName' => 'Sorry', 'size' => 'medium' }, 'Board' ) ] }, 'ArrayOfToy' ) };
Still stuck on what to do in this case. Would this be where introspection comes in? pseudo:(if HASH, then ... %$location) elsif ARRAY, then ... @$location) ? Thanks to all who are helping me learn this!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Parsing SOAP::Lite results
by kcott (Archbishop) on Sep 28, 2012 at 13:21 UTC | |
by Roboz (Novice) on Sep 28, 2012 at 13:44 UTC | |
by kcott (Archbishop) on Sep 28, 2012 at 15:13 UTC | |
Re^5: Parsing SOAP::Lite results
by Anonymous Monk on Sep 28, 2012 at 12:57 UTC |
In Section
Seekers of Perl Wisdom