[EMAIL PROTECTED] (Doug MacEachern) wrote:
>On Sun, 17 Jun 2001, Stas Bekman wrote:
>> What do you think about adding some semantics for the debug printing
>> during 'make test'. So users can visually tell warnings from errors, and
>> errors from notice statements.
>>
>> so we can use:
>>
>> mpt_warn("this is a warning");
>> mpt_error("this is an arror");
>> mpt_notice("this is a notice");
>>
>> (mpt stands for mod_perl_test) and
>>
>> sub mpt_error { print "!!!: ", join "\n", @_}
>> sub mpt_warn { print "***: ", join "\n", @_}
>> sub mpt_notice { print "---: ", join "\n", @_}
>>
>> or similar semantics, and the functions could handle the wrapping too (and
>> thus appending the right preamble to the beginning of every line).
>>
>> or may be we want to change the debug prints only for warn/error ones, so
>> the normal printing will stay as it is now.
>>
>> we can also overload these subs with a set of subs which use Curses (for
>> those who have it installed) and have the output colorized like
>> /usr/bin/colorgcc does. The latter uses Term::ANSIColor which seems to
>> come with the core perl (at least 5.6.0, not sure about earlier versions).
>>
>> finally we could ucfirst() the beginning of sentences :)
>
>this would be useful, maybe in its own module ModPerl::Trace that
>exports error(), warning(), notice(), debug(), etc.
Heck, why not call it Test::Notify or something more generic. Nothing
mod_perl-specific here. My guess is that Schwern would welcome the
fancy output into the Test:: class. =)
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]