in reply to Re: passing args to tests from Module::Build
in thread passing args to tests from Module::Build

thx for the reply, I have done this, perhaps its blindingly obvious but I seem to be missing how to then refer to these args in the test files themselves ...
  • Comment on Re^2: passing args to tests from Module::Build

Replies are listed 'Best First'.
Re^3: passing args to tests from Module::Build
by Anonymous Monk on Oct 19, 2009 at 13:35 UTC
    #!/usr/bin/perl -- ## t/file.t use File::Spec::Functions qw' updir catfile rel2abs '; use File::Basename qw' dirname '; my $thisf = rel2abs(__FILE__); my $thisd = dirname($thisf); my $conff = catfile( $thisd, updir, qw! _build build_params ! ); my $conf = require $conff; my $args = $conf->[0]; my %ARGS = %{$conf->[0] }; print "Cake? $$args{Cake}\n"; print "pi? $ARGS{pi}\n";