App-PFT

 view release on metacpan or  search on metacpan

bin/pft-make  view on Meta::CPAN


    make_path $dirname;

    my $temp = File::Spec->catfile($dirname, "." . basename $path);

    open($fh, ">:encoding($enc)", $temp) or croak "Opening $temp: $!";
    print $fh $data;
    close $fh;

    if (-e "$path") {
        # This branch enables an upload-time optimization: if the file
        # created file is exactly the same as the previous compilation (same
        # checksum) we keep the old one.  Rsync will not upload it again.
        my $md5 = Digest::MD5->new;
        $md5->add(encode($enc, $data));
        my $digest_new = $md5->hexdigest;

        open($fh, "<:raw", $path)
            or croak "Opening $path: $!";
        $md5->addfile($fh);
        close $fh;

        if ($digest_new eq $md5->hexdigest) {



( run in 1.226 second using v1.01-cache-2.11-cpan-b16cb0d3907 )