Andreas J. König > Perl-Repository-APC > binsearchaperl

Download:
Perl-Repository-APC-2.002001.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

binsearchaperl - binary search perl versions that exhibit changing behaviour

SYNOPSIS ^

 binsearchaperl --bounds 17000-18000 --prog testscript.pl --build
 binsearchaperl --show-cache
 binsearchaperl --h

DESCRIPTION ^

This script is built upon the buildaperl script and the Perl::Repository::APC module and All Perl Changes . You pass with the --bounds or --exact-bounds option an interval of patch numbers and with the --prog option a test script that exhibits some change in the behaviour of perl. The script then does a binary search to determine when exactly the change in behaviour occurred. It dies when it cannot find or build any working perl anymore. This means, normal end of operation is dieing. Only operations that are documented to exit, return a zero status to the shell.

The --h option displays all available options.

The most convenient setup to run this script is described in the buildaperl manpage.

Test programs are ideally written in a simple style that outputs "ok" or "not ok", but you did know that already.

Cache resulting perls in the install directory

Per default the underlying buildaperl script installs all resulting perls for later perusal. binsearchaperl searches in the tree of installed perls and uses them if they seem useful for a comparison. The upside of this is faster execution, but the downside is that binsearchaperl just looks at the branch and the patch number to determine the usefulness of a cached perl. In case you work with the --config option and change these options sometimes, the result of binsearchaperl may be wrong. It may happen that a difference in behaviour is due to different config options and not merely to the patch level. When in doubt, remove your whole installed-perls directory or remove all perls compiled with irrelevant config options.

To help maintaining the cache, binsearchaperl can be given the --show-cache option. With this option a list of all perls in the cache is printed to STDOUT, sorted ascending by patch number, then the script exits. A convenient usage of this list is these shell scripts:

  binsearchaperl --show-cache | while read p ; do
    echo $p;
    $p -V:usethreads
  done

or

  for p in `binsearchaperl --bounds 18700-99999 --show-cache` ; do
    echo $p;
    $p -V:config_args
  done

PREREQUISITES ^

Same prerequisites as mentioned in patchaperlup

AUTHOR ^

Andreas Koenig <andk@cpan.org>

syntax highlighting: