in reply to Re^2: Broken Net::Telnet::Netscreen module?
in thread Broken Net::Telnet::Netscreen module?
This means the error function gets called in your method unsetValue. Since the parameters are definitely not empty the call is probably because of this line
if ($result =~ /\w+/) { return $self->error($result); }
this line should be on line 150 of your changed Netscreen.pm. I don't know what is in $result, but normally you should get some error message while running the script and that return value is probably what the telnet session answered when the unset command was issued to the netscreen machine. Noticing (and reporting) that error message would have made things much easier
If you don't see this error message, you might put something like print STDERR "<<$result>>\n"; between line 149 and 150 into Netscreen.pm.
The probable cause of that error is that the unset command on the netscreen machine doesn't need/want/allow a parameter $value, because you are UNSETTING and not setting a value. So you might try the following line in your unsetValue method
my @results=$self->cmd("unset ".$setting);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Broken Net::Telnet::Netscreen module?
by spivey49 (Monk) on Aug 13, 2008 at 20:18 UTC | |
by jethro (Monsignor) on Aug 13, 2008 at 20:38 UTC | |
by spivey49 (Monk) on Aug 13, 2008 at 21:07 UTC | |
by jethro (Monsignor) on Aug 13, 2008 at 21:47 UTC | |
by spivey49 (Monk) on Aug 14, 2008 at 17:22 UTC |