Re: [Ssh-sftp-perl-users] Net::SSH::Perl error handling
Brought to you by:
dbrobins
From: Ofer N. <on...@sh...> - 2005-03-10 05:49:07
|
Mark A. Fuller wrote: >BTW: Earlier you said it was too bad that I had to do something outside of Perl. Why's that bad? What is the downside of using Expect.pm (a Perl module) to drive an executable module (like an open-ssh sftp module)? > > > Well, Expect is wonderful because in that it helps you when you're forced to drive an external app. But it is a last line of defense. It's a hack. I use perl because it is a powerful and expressive programming language. All that goes out the window the minute I have to call system() and use a seperate executable (not to mention the fact that you fork several times needlessly in the process). And what is my feedback? An 8-bit integer, and maybe some STDOUT/STDERR output that I have to capture and parse? How can you possibly compare that to the richness and elegance of returning complex data structures, like a native function can? Or being able to throw execptions that are captured? I only go outside perl when I have no choice. And that is why I love Net::SSH::Perl. Native, pure-perl implementation of SSH. Much needed and much appreciated. -ofer |