perl - Single parameters to new() must be a HASH ref data -


i have perl script , works on perl version 5.8.8 5.14 got error: odd number of elements in anonymous hash at

here code:

$session->begin_privileged({ $_enable_password }) 

previously this:

$session->begin_privileged( $_enable_password ) 

and @ time error:

single parameters new() must hash ref data 

i have similar typed lines above , same single parameters error on each.

i googled not find regular solution.

if $session instance of net::appliance::session call should this:

$session->begin_privileged({ password => $_enable_password }); 

but still not sure $_enable_password isn't hash reference in first place, in case should pass single parameter without enclosing braces. more explanation $_enable_password isn't being set correctly perl v14 has stopped working.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -