On 2002.01.05 23:45 Michael G Schwern wrote: > Here's an interesting alternative. Do C<local $^C = 0> just before > running the tests, though that's pretty ugly.
Interesting idiom, but I don't see when this can be done. > > But I rwally like the environment variable better, because with the > > package variable solution I need to set it unconditionally ( because > > for it to have effect it must be set in the init code, and in the > > init code I can't look at parameters, because parameters are passed > > in the call to compile, so I can't set it using a parameter ), and > > because I was hoping to keep B::C clear from > > hacks-to-make-the-testsuite-happy. > > From my PoV, I'm hoping to keep Test::Builder clear from > hacks-to-make-perlcc-happy. :) The $^C thing is already a hack for > B::Deparse. Instead of using an environment variable, you can use a global variable in the O namespace. Let's say $O::No_Test_Output defaults to 1 (set by O.pm). In Test::Builder (line #571) you would have return if $O::No_Test_Output; # Don't print headers under compiler backends instead of return if $^C; and B::C (and other backends that want to behave this way) could override this setting by doing $O::No_Test_Output = 0.