in reply to Using Net::SSH2 with Net::Telnet::Cisco
The first option is to stop using threads. This is not as crazy as it sounds. Try replacing threads with forks, and see if it works. If it does, then your thread problems may go away. If they don't go away, then be careful to require the module from within the same "thread" as you instantiate the object and they definitely should go away.
Another option is to create a standalone process that uses Net::Appliance::Session and Net::SSH::Perl which can be driven from within a thread in your main application. Be warned that this type of network programming usually takes more work than you were planning on.
The third option I see is to try to debug the thread problems in the original modules. I have no idea how easy or hard that will be. If you're lucky it will be as simple as not using the modules, but instead require them in the thread that you instantiate the objects from.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Net::SSH2 with Net::Telnet::Cisco
by Anonymous Monk on Jan 14, 2011 at 03:56 UTC | |
by Argel (Prior) on Jan 15, 2011 at 00:21 UTC | |
by ryber (Acolyte) on Jan 18, 2011 at 18:12 UTC | |
by Argel (Prior) on Jan 19, 2011 at 02:40 UTC | |
by ryber (Acolyte) on Jan 20, 2011 at 18:12 UTC |