You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/11/19 03:07:38 UTC
Re: cvs commit: modperl-2.0/t/response/TestDirective setupenv.pm
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
Re: cvs commit: modperl-2.0/t/response/TestDirective setupenv.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Tue, 20 Nov 2001, Stas Bekman wrote:
> I prefer t_debug(), ok? don't want people to start using t_print("ok 5").
that's fine. and maybe it could do more than 'print' would. like how
TestTrace does the expand() with Data::Dumper, rather than have another
function for t_dumper().
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestDirective setupenv.pm
Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
>>probably should add something like that:
>>
>>Apache::TestUtil:
>>sub t_print_debug { print map {"# $_\n"} map {split /\n/} @_ };
>>
>
> nice. naming it t_print() would be fine too.
I prefer t_debug(), ok? don't want people to start using t_print("ok 5").
_____________________________________________________________________
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
Re: cvs commit: modperl-2.0/t/response/TestDirective setupenv.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 19 Nov 2001, Stas Bekman wrote:
> 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).
right. i actually meant to take those out before committing.
> probably should add something like that:
>
> Apache::TestUtil:
> sub t_print_debug { print map {"# $_\n"} map {split /\n/} @_ };
nice. naming it t_print() would be fine too.
> 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);
+1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org