Lines Matching refs:from
46 my($from, $to) = @_;
52 return File::Spec->catfile($to, basename($from));
57 my ($from, $to) = map {
62 return '' if ( (ref $from) xor (ref $to) );
63 return $from == $to if ref $from;
64 return $from eq $to;
71 my $from = shift;
80 my $from_a_handle = (ref($from)
81 ? (ref($from) eq 'GLOB'
82 || UNIVERSAL::isa($from, 'GLOB')
83 || UNIVERSAL::isa($from, 'IO::Handle'))
84 : (ref(\$from) eq 'GLOB'));
91 if (_eq($from, $to)) { # works for references, too
92 carp("'$from' and '$to' are identical (not copied)");
96 if (!$from_a_handle && !$to_a_handle && -d $to && ! -d $from) {
97 $to = _catname($from, $to);
102 my @fs = stat($from);
105 if (@ts && $fs[0] == $ts[0] && $fs[1] eq $ts[1] && !-p $from) {
106 carp("'$from' and '$to' are identical (not copied)");
111 elsif (_eq($from, $to)) {
112 carp("'$from' and '$to' are identical (not copied)");
122 if ($^O eq 'VMS' && -e $from
123 && ! -d $to && ! -d $from) {
136 return syscopy($from, $to) || 0;
146 $from_h = $from;
148 open $from_h, "<", $from or goto fail_open1;
209 my($from,$to) = @_;
210 my(@fromstat) = stat $from;
251 my($from,$to,$fallback) = @_;
255 if (-d $to && ! -d $from) {
256 $to = _catname($from, $to);
260 $fromsz = -s $from;
266 if ($^O eq 'VMS' && -e $from
267 && ! -d $to && ! -d $from) {
280 return 1 if rename $from, $to;
284 return 1 if defined($fromsz) && !-e $from && # $from disappeared
296 $fallback->($from,$to) or die;
297 my($atime, $mtime) = (stat($from))[8,9];
299 unlink($from) or die;