Template-Alloy-XS
view release on metacpan or search on metacpan
t/00_base.t view on Meta::CPAN
sub process_ok { # process the value and say if it was ok
my $str = shift;
my $test = shift;
my $vars = shift || {};
my $conf = local $vars->{'tt_config'} = $vars->{'tt_config'} || [];
push @$conf, (COMPILE_PERL => $compile_perl) if $compile_perl;
push @$conf, (STREAM => 1) if $use_stream;
my $obj = shift || $module->new(@$conf); # new object each time
my $out = '';
my $line = (caller)[2];
delete $vars->{'tt_config'};
Taint::Runtime::taint(\$str) if test_taint;
my $fh;
if ($use_stream) {
open($fh, ">", "$test_dir/stream.out") || return ok(0, "Line $line \"$str\" - Can't open stream.out: $!");
select $fh;
}
t/01_includes.t view on Meta::CPAN
sub process_ok { # process the value and say if it was ok
my $str = shift;
my $test = shift;
my $vars = shift || {};
my $conf = local $vars->{'tt_config'} = $vars->{'tt_config'} || [];
push @$conf, (COMPILE_PERL => $compile_perl) if $compile_perl;
push @$conf, (STREAM => 1) if $use_stream;
my $obj = shift || $module->new(@$conf, ABSOLUTE => 1, INCLUDE_PATH => $test_dir); # new object each time
my $out = '';
my $line = (caller)[2];
delete $vars->{'tt_config'};
Taint::Runtime::taint(\$str) if test_taint;
my $fh;
if ($use_stream) {
open($fh, ">", "$test_dir/stream.out") || return ok(0, "Line $line \"$str\" - Can't open stream.out: $!");
select $fh;
}
( run in 0.998 second using v1.01-cache-2.11-cpan-a3c8064c92c )