Subject: | debug is sent to STDERR |
I think that a nice feature will be to provide a way to add a callback to the debug method found in the Net::SSH::Perl. That callback will then replace the print statement found in that method. By default the package could define a callback that will print the debug statement to STDERR, to ensure compatibility with all scripts that are already using the library.
Having a callback will have the benefits of permitting to any program handle the debug messaged, this way a program that does it's reporting through a logger could provide it's own callback that will intercept the debug messages and process them through the logging API.