App-pltest

 view release on metacpan or  search on metacpan

pod/examples.pod  view on Meta::CPAN


Java .jar, .ear & .war files (which are aliases for .zip), after a clean build
have many class files with the identical crc, but a different date.  This
excludes the date.  There are examples for L<how to
combine|canned-commands/Shell Functions> these variants as Shell functions:

    pltest -o 'piped {
            keydiff $2 if s@.{16} ([\da-f]{8})  (.+)@$1@;
        } "unzip", "-vqq", $_' *.zip

Browsers have a bug of not checking for updated css & javascript.  A common
workaround is to add a hex number to those file names.  In that case use only
the meaningful part of the filename as a key:

    pltest -o 'piped {
            keydiff $2
                if s@.{16} ([\da-f]{8})  (.+?)(?:\.([0-9a-f]{20})(\..[a-z]+))?$@if( $3 ) {
                    $n = "$2.\$x$4"; "$1  \$x=$3"
                } else {
                    $n = $2; $1
                }@e



( run in 0.260 second using v1.01-cache-2.11-cpan-05444aca049 )