Skip to content

Instantly share code, notes, and snippets.

$ perl ./Build test
t/00-load.t ....... ok
t/pod-coverage.t .. ok
t/pod.t ........... ok
All tests successful.
Files=3, Tests=25, 1 wallclock secs ( 0.03 usr 0.02 sys + 0.57 cusr 0.07 csys = 0.69 CPU)
Result: PASS
$ perl ./Build test
$ perl ./Build test merge=1 tap_harness_args=formatter_class=TAP::Formatter::JUnit
sub do_tests {
my $self = shift;
my $tests = $self->find_test_files;
if(@$tests) {
my $args = $self->tap_harness_args;
if($self->use_tap_harness or ($args and %$args)) {
$self->run_tap_harness($tests);
}
use strict;
use warnings;
use Module::Build;
my $class = Module::Build->subclass(
class => "Module::Build::Custom",
code => <<'SUBCLASS' );
sub ACTION_hudson_test {
my $self = shift;
use strict;
use warnings;
use Module::Build;
my $class = Module::Build->subclass(
class => "Module::Build::Custom",
code => <<'SUBCLASS' );
sub ACTION_hudson_test {
my $self = shift;
use strict;
use warnings;
use Module::Build;
my $class = Module::Build->subclass(
class => "Module::Build::Custom",
code => <<'SUBCLASS' );
sub ACTION_hudson_test {
my $self = shift;
use strict;
use warnings;
use Module::Build;
my $class = Module::Build->subclass(
class => "Module::Build::Custom",
code => <<'SUBCLASS' );
sub ACTION_hudson_test {
my $self = shift;
$ perl Build.PL
# on linux
$ ./Build hudson_test
# on windows
> Build hudson_test
# the result is in hudson_test_output.xml
{
package Person::Child;
use base 'Person';
__PACKAGE__->attributes('parent');
}
my $child = Person::Child->new();
ok $child->parent($p), 'setting parent';
ok $child->name('bob'), 'setting child name';
ok $child->age(5), 'setting child age';