Thread Ambiguous call resolved as CORE::close() (5 answers)
Opened by RalphFFM at 2007-04-11 17:16

RalphFFM
 2007-04-11 17:16
#75952 #75952
User since
2006-11-16
258 articles
BenutzerIn
[Homepage] [default_avatar]
Was ist mit "qualify as such" gemeint in der Warnmeldung:
"Ambiguous call resolved as CORE::close(), qualify as such or use & at ftp.pm line 271."
Der Code an dieser Stelle sieht so aus:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
vec($rin,fileno(DATA),1) = 1;
for (;;) {
$condition = ($Timeout == 0) || select($rout=$rin, undef, undef, $Timeout);
if ($condition) {
last unless ($len = sysread(DATA, $buf, 1024));
if($Ascii) {
substr($buf,0,0)=$partial; ## prepend from last sysread
@buf=split(/\r?\n/,$buf); ## break into lines
if ($buf=~/\n$/) { $partial=''; } else { $partial=pop(@buf); }
foreach(@buf) { print DFILE $_,"\n"; }
} else {
last unless ( (syswrite(DFILE,$buf,$len)==$len) );
}
} else {
$Error = "Timeout while recieving data from $Host";
return &xferclean();
}
}
close DATA; # <-- Zeile 271 #################
close DFILE;


Ähnlich eine Warnmeldung an anderer Stelle:
"Ambiguous call resolved as CORE::open(), qualify as such or use & at ftp.pm line 450."
Code: (dl )
1
2
3
4
5
6
7
8
local($local, $remote) = @_;  
local($ret, $len)=(0,0);
local($buf);
($remote = $local) unless $remote;
unless (open(DFILE, "$local")) { # <-- Zeile 450 ##########
$Error = "Open of local file $local failed: $!";
return undef;
}


Wie kann ich diese Konstrukte ordnungsgemäß deklarieren, d.h. die Warnmeldungen vermeiden?
Im voraus vielen Dank für Infos. Mit Google habe ich nichts gefunden was weiter geholfen hat.

View full thread Ambiguous call resolved as CORE::close()