Skip Menu |

This queue is for tickets about the Win32-Internet CPAN distribution.

Report information
The Basics
Id: 46382
Status: new
Priority: 0/
Queue: Win32-Internet

Owner: Nobody in particular
Requestors: Mike.Earley [...]

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

Subject: Bug in Win32::Internet::FTP subroutine when using a parameter hash.
Date: Tue, 26 May 2009 16:15:15 -0400
To: <bug-Win32-Internet [...]>
From: "Mike Earley" <Mike.Earley [...]>
Download (untitled) / with headers
text/plain 1.3k
This works: %<-------------------------------------------- use Win32::Internet; my $internet = new Win32::Internet(); my $ftp; print "result = ", $internet->FTP($ftp, "", "myname", "mypassword" ); ------------------------------------------>% This doesn't: %<-------------------------------------------- use Win32::Internet; my $internet = new Win32::Internet(); my $ftp; my $hash = { "server" => "", "username" => "myname", "password" => "mypassword", }; print "result = ", $internet->FTP( $ftp, $hash ), "\n"; ------------------------------------------>% The code that interprets the hash is this: if(ref($server) and ref($server) eq "HASH") { $port = $server->{'port'}; $username = $server->{'username'}; $password = $password->{'host'}; my $myserver = $server->{'server'}; $pasv = $server->{'pasv'}; $context = $server->{'context'}; undef $server; $server = $myserver; } What is the $password->{'host'} doing there? When I run this through the debugger $password is undef as expected. Shouldn't the line be: $password = $server->{'password'}; If the password assignment is correct could you tell me how to set the password in a hash reference so that the call might work? Thanks. Mike Earley

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to