Greg Lindahl <greg <at> blekko.com> writes: >Inspired by C-Reduce, perl-reduce takes a perl program that causes a >bug in perl itself, such as a core-dump in the perl interpreter, and >tries to reduce the program to the minimum program needed to cause the >bug. > >https://github.com/blekko/perl-reduce This looks very handy. Until now I have used 'delta' for this job, but that is a simple text-based tool that just removes whole lines. Next time I will try your tool instead. A feature I've sometimes wished for is to automatically inline libraries, replacing 'use Foo' with the contents of Foo.pm followed by 'package main;'. Once you have a minimal test case, but it contains a 'use' line, you can expand out that library and minimize again. Sometimes, too, I will inline file contents as DATA sections. They can then be minimized line-by-line. So as well as B::Deparse it might be useful to try knocking out lines from DATA sections or here documents. -- Ed Avis <eda@waniasset.com>Thread Previous