Test::Smoke::Patcher 1.19 review

Download
by rbytes.net on

Test::Smoke::Patcher is a OO interface to help patching the source-tree. SYNOPSIS use Test::Smoke::Patcher; my $patc

License: Perl Artistic License
File size: 151K
Developer: Abe Timmerman
0 stars award from rbytes.net

Test::Smoke::Patcher is a OO interface to help patching the source-tree.

SYNOPSIS

use Test::Smoke::Patcher;

my $patcher = Test::Smoke::Patcher->new( single => {
ddir => $build_dir,
pfile => $patch,
popts => '-p1',
v => 1, # 0..2
});
$patcher->patch;
or
my $patcher = Test::Smoke::Patcher->new( multi => {
ddir => $buildir,
pfile => $patch_info,
v => 1, #0..2
});
$patcher->patch;

Okay, you will need a working patch program, which I believe is available for most platforms perl runs on.

There are two ways to initialise the Test::Smoke::Patcher object.

single mode

The pfile attribute is a pointer to a single patch. There are four (4) ways to specify that patch.

refernece to a SCALAR

The scalar holds the complete patch as literal text.

reference to an ARRAY

The array holds a list of lines (with newlines) that make up the patch as literal text ($patch = join "", @$array_ref).

reference to a GLOB

You passed an opened filehandle to a file containing the patch.

filename

If none of the above apply, it is assumed you passed a filename. Relative paths are rooted at the builddir (ddir attribute).

multi mode

The pfile attribute is a pointer to a recource that contains filenames of patches. The format of this recource is one filename per line optionally followed by a semi-colon (;) and switches for the patch program.

The patch-resource can also be specified in four (4) ways.

reference to a SCALAR
reference to an ARRAY
reference to a GLOB
filename

Requirements:
Perl

Test::Smoke::Patcher 1.19 keywords