AC-Yenta
view release on metacpan or search on metacpan
lib/AC/Yenta/Status.pm view on Meta::CPAN
is_local => ($here eq $pd->{datacenter} ? 1 : 0),
};
if( $pd->{subsystem} eq 'yenta' ){
$data->{map} = $pd->{map};
}
print FILE encode_json( $data ), "\n";
}
close FILE;
unless( rename("$file.tmp", $file) ){
problem("cannot rename save file '$file': $!");
}
}
}
################################################################
# diagnostic reports
sub report {
my $res;
lib/AC/Yenta/Store/File.pm view on Meta::CPAN
# save file
my $f;
unless( open($f, "> $base/$name.tmp") ){
problem("cannot save file '$base/$name.tmp': $!");
return;
}
debug("saving file '$base/$name'");
print $f $$cont;
close $f;
rename "$base/$name.tmp", "$base/$name";
return 1;
}
1;
( run in 0.442 second using v1.01-cache-2.11-cpan-f29a10751f0 )