Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: HASH error

by Sententiosus (Initiate)
on Sep 13, 2013 at 08:21 UTC ( [id://1053858]=note: print w/replies, xml ) Need Help??


in reply to Re: HASH error
in thread HASH error

thanks McA

the Output

$VAR1 = { 'OBJECT' => { 'PROPERTY' => [ { 'content' => 'error', 'name' => 'response-type' }, { 'content' => '1', 'name' => 'response-type-numer +ic' }, { 'content' => 'Unauthorized acc +ess requested', 'name' => 'response' }, { 'content' => '6', 'name' => 'return-code' } ], 'oid' => '1', 'name' => 'status', 'basetype' => 'status' } }; Not a HASH reference at ./hp-msa.pl line 19.

Replies are listed 'Best First'.
Re^3: HASH error
by McA (Priest) on Sep 13, 2013 at 10:10 UTC

    As I'm not the author of that program I can only guess. Please change the line:

    my $ref = XMLin($res->content, KeyAttr => "oid");

    to the following

    my $ref = XMLin($res->content, KeyAttr => "oid", ForceArray => [ 'OBJE +CT' ]);

    and give it a try.

    McA

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1053858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-24 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found