CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Net::SCP::Expect and timeout

 



AsiaSkyly
Novice

May 4, 2012, 5:02 PM

Post #1 of 3 (10358 views)
Net::SCP::Expect and timeout Can't Post

I am having a problem where the timeout on Expect appears to work as a delay rather than a timeout.

Is there a way to make the timeout expire if the pattern is matched?

Code
my $scpe = Net::SCP::Expect->new( 
host=>$host,
user=>$user,
password=>$password,
timeout=>15,
preserve=> 1,
auto_yes => 1
);


For some reason the speed of my connection is controled by the timeout. Timeout of 1 is quicker, but of course, then you run the problem that it might indeed timeout too soon. I want to use a long timeout but quit as soon as the pattern match is made.


AsiaSkyly
Novice

May 8, 2012, 11:54 AM

Post #2 of 3 (7997 views)
Re: [AsiaSkyly] Net::SCP::Expect and timeout [In reply to] Can't Post

No one else has this issue? :(


wickedxter
User

May 30, 2012, 4:20 AM

Post #3 of 3 (7259 views)
Re: [AsiaSkyly] Net::SCP::Expect and timeout [In reply to] Can't Post

I looked threw the module doc. On cpan and the timeout options should timeout after the set value amd between each call.. Also Tue timeout option ur setting also is default set to 10 and from what u want ur going to have to make ur script autaticly timeout once it returns successful

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives