I've gotten a few more emails about Net::SCP::Expect. A couple of bug reports. One is a simple parsing error (which most people will probably never hit), the other is password-less ssh/scp.
Since I never expected people to use the module who had password-less ssh set up (I mean, the *whole point* of the module is to send a password via Expect), I never accounted for that possibility. However, someone has pointed out that he's in a loop and some machines require passwords and some don't. Since that's probably going to be a fairly common scenario, I'll need to deal with it now.
Ben Trott, save me!!!
Since that's probably going to be a fairly common scenario, I'll need to deal with it now.
No you don't, just learn from history: "No patch? Oh, well. Take care." :)
Seriously, if you decide you want to tackle it, I don't think it will be too hard. Expect with undef timeout, if you get eof, the command completed without asking for a password, if you get a password prompt, send the password and then expect for eof. Don't forget to omit any steps you might previously have taken to insist that the programmer specified a password, as it will no longer be required for all cases.
Or, best yet, take the person who requested the feature, point them at this journal entry, and encourage them to try their hand at writing the patch!