sub mirror { my($self, $url, $file) = @_; my $tmpfile = "$file-$$"; rename( $tmpfile, $file ) or die "Cannot rename '$tmpfile' to '$file': $!\n";