in reply to Broken Net::Telnet::Netscreen module?

Probably good news, spivey49. Your program starts to die when Net::Telnet::Netscreen restores the settings of Net::Telnet before calling Telnet::error() in &scrolling_cmd. By default, Net::Telnet dies on error. So this is not really a bug in Net::Telnet::Netscreen, just behaviour inherited from Net::Telnet. When something goes wrong your program dies. You can see that by setting $SIG{__DIE__}.

You may continue with one of the two (there are more, see Net::Telnet) alternatives:

... # w/o ALT1,2 - try: $SIG{__DIE__} = sub { warn "\nDIIIII\n", caller }; $fw = new Net::Telnet::Netscreen( host => $host ); # ALT1: Ignore (bad idea, but quick debugging fix): # $fw->errmode("return"); # ALT2: Analyse problem yourself / decide to abort or to continue: # $fw->errmode( sub { warn "ERRHANDLER: @_\n"; } ); ...

Since I don't own a Netscreen FW, I simulated it manually with netcat. Here is what your program does (it misses a 'save'?):

login:
netscreen
password:
netscreen
set address Untrust AutoGenRule_1.1.0.1 1.1.0.1/32 "Created with perl for testing"
set policy id 150 from Untrust to Trust AutoGenRule_1.1.0.1 any any perm log
set address Untrust AutoGenRule_1.1.0.2 1.1.0.2/32 "Created with perl for testing"
set policy id 150 from Untrust to Trust AutoGenRule_1.1.0.2 any any perm log
Being not a well trained Netscreen FW, I didn't respond to the commands. Consequently, a timeout occurred, which was ignored due to reconfiguring the error-behaviour to "return". You might experience other errors, but your program won't die in the middle of somewhere. One small step forward...