Date: | Mon, 26 Sep 2005 09:46:17 -0500 |
From: | Mark Stosberg <mark [...] summersault.com> |
To: | Michael G Schwern <schwern [...] pobox.com> |
Subject: | Thanks, and a suggestion for "note". |
Michael,
Thanks so much for your work on Test::Simple/More/Builder.
I'd like to share another enhancement that has worked well for me.
I wanted to have comments that showed up in verbose mode but note in the
condensed mode. It just makes sense to able to have more detailed
comments along with more detailed test output.
I implemented it like this, for my own project:
=head2 note()
note "My Comment Only for Verbose Mode"
Use this function to create a comment that shows up in verbose
test output, but not the bulk test runs.
=cut
sub note($) {
my $msg = shift;
print "# $msg\n";
}
From looking at the source code for "diag", a proper solution might more
complicated, but this worked great for me without any noticeable drawbacks.
The name difference of "diag" versus "note" could be improved to better reflect
their relationship, but "note" is certainly handy for being so short.
Mark