Skip Menu |

This queue is for tickets about the Net-SCP-Expect CPAN distribution.

Report information
The Basics
Id: 57549
Status: new
Priority: 0/
Queue: Net-SCP-Expect

People
Owner: Nobody in particular
Requestors: FISH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.12
Fixed in: (no value)



Subject: : in path leads to wrong parsing in "_parse_scp_string"
(happend under 0.12, but seems to exist till today) _parse_scp_string uses a simple split by : to get the host and path portion of the string. This fails in the case where : is a part of the path, for example (a common case on many cisco routers) $scp->scp("$host:/nvram:startup-config", $foo) My quick and dirty proposal for fixing that: --- Expect.pm.orig Mon May 17 12:47:13 2010 +++ Expect.pm Mon May 17 12:52:13 2010 @@ -258,7 +258,7 @@ } my $temp = join('',@parts); - ($host,$dest) = split(/:/,$temp); + ($host,$dest) = $temp =~ /([^:]*):(.*)/; # scp('file','file') syntax, where local to remote is assumed unless($dest){