in reply to Howto use Net::ISC::DHCPd::OMAPI to get failover state
G'day Chris,
I don't use Net::ISC::DHCPd::OMAPI; however, here's a couple of suggestions.
# as per cpan page # my $failover = $omapi->new_object("failover",(name => 'st1_dhcpb' +));
As per the Net::ISC::DHCPd::OMAPI::Failover CPAN page:
$failover = $omapi->new_object("failover", { $attr => $value });
Note there's only two scalar arguments, the second being a hashref. ("failover",(name => 'st1_dhcpb')) will be interpreted as three arguments like this: ('failover', 'name', 'st1_dhcpb')
Also, if you add a newline to your die message, you'll lose potentially useful information. See die for details.
-- Ken
|
|---|