perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: modperl-2.0/t/response/TestDirective setupenv.pm
Date Mon, 19 Nov 2001 02:07:38 GMT
dougm@apache.org wrote:

> dougm       01/11/18 16:14:53
> 
>   Added:       t/directive setupenv.t
>                t/response/TestDirective setupenv.pm
>   Log:
>   add test for PerlOptions +SetupEnv
>   
>   Revision  Changes    Path
>   1.1                  modperl-2.0/t/directive/setupenv.t



>   for my $line (split /\n/, $env) {
>       next unless $line =~ /=/;
>       my($key, $val) = split /=/, $line, 2;
>       $env{$key} = $val || '';
>   }
>   use Data::Dumper;
>   print Dumper \%env;

We should try not to print debug stuff without prefixing each line with 
# (at least for the new tests that we write). Otherwise it may mess up 
Test::Harness (according to its docs).

probably should add something like that:

Apache::TestUtil:
sub t_print_debug { print map {"# $_\n"} map {split /\n/} @_ };

and also

sub t_dumper {
     require Data::Dumper;
     t_print_debug(Data::Dumper::Dumper(@_));
}

so now all you've to write is

t_dumper(\%env);

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message