From 02bef53e74ef3e7f7f8257f32ffa1a507845bbf2 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Sat, 9 Feb 2008 13:58:54 +0000 Subject: Add ->passive method to switch between PORT/PASV connections --- Net/FTP.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Net/FTP.pm b/Net/FTP.pm index a99592e..581a16c 100644 --- a/Net/FTP.pm +++ b/Net/FTP.pm @@ -124,6 +124,12 @@ sub host { ${*$me}{'net_ftp_host'}; } +sub passive { + my $ftp = shift; + return ${*$ftp}{'net_ftp_passive'} unless @_; + ${*$ftp}{'net_ftp_passive'} = shift; +} + sub hash { my $ftp = shift; # self @@ -1439,6 +1445,10 @@ to change the directory to the root directory. Change directory to the parent of the current directory. +=item passive ( [ PASSIVE ] ) + +Set or get if data connections will be initiated in passive mode. + =item pwd () Returns the full pathname of the current directory. -- cgit v1.2.3-24-ge0c7