Force particular response elements to always be represented as arrays when converted...
authorlevinse <levinse>
Sun, 28 Nov 2010 22:30:53 +0000 (22:30 +0000)
committerlevinse <levinse>
Sun, 28 Nov 2010 22:30:53 +0000 (22:30 +0000)
even if only one such element is present

lib/Net/Ikano.pm

index c1e4b87..8b8ec76 100644 (file)
@@ -322,7 +322,8 @@ sub AUTOLOAD {
        unless $resp->is_success;
     my $respxml = $resp->decoded_content;
 
-    $xs = new Net::Ikano::XMLUtil(RootName => undef, SuppressEmpty => '');
+    $xs = new Net::Ikano::XMLUtil(RootName => undef, SuppressEmpty => '',
+       ForceArray => [ 'Address', 'Product', 'StaticIp', 'OrderNotes' ] );
     my $resphash = $xs->XMLin($respxml);
 
     warn "DEBUG RESPONSE\n\tHASH:\n ".Dumper($resphash)."\n\tXML:\n $respxml"