The following module was proposed for inclusion in the Module List:

  modid:       Test::Warn
  DSLIP:       cdpfp
  description: Tests for expected/not wanted warnings
  userid:      BIGJ (Janek Schleicher)
  chapterid:    3 (Development_Support)
  communities:
    perl.qa

  similar:
    Test::Exception

  rationale:

    This module tests subroutines whether they gives a (special)
    warning or they don't. This isn't available yet in CPAN. The basic
    idea is identical to Test::Exception.

    There had been a little Discussion on perl.qa. The name Test::Warn
    seems to be O.K., as Test::Warning is a serious concurrent. I
    decided me to take the short version as it is similar clear what it
    does and quite shorter.

    The basic functionality is expressed in the function

    warns_ok BLOCK TEST_NAME.

    and an equivalent to check that the BLOCK didn't warn us.

    Chromatic gave the hint to include some testing functionality for
    the carp method. Adrian Howard had the idea to include a warns_like
    method. There had not been a final convention how to call the
    doesnt-warn-method. no_warns_ok - my first suggestion is a little
    bit awkward, warns_nok - suggested by Chromatic isn't really better.
    Another idea was no_warning but I didn't liked it very much as it is
    too similar to the statement 'no warnings;' I also thought to a name
    like doesnt_warn with or without a finishing _ok. But it doesn't
    follow the other names and I prefer to have a suffix like ok, like,
    is, like the well known functions from Test::More as I'd like to
    indicate to the reader that it is a test routine. (and
    doesnt_warn_ok seems to be very long).

    However, as I couldn't find any real good name, I think I return to
    the original idea no_warns_ok and keep open for any former
    suggestions.

    So the interface would look like:

    warns_ok BLOCK TEST_NAME

    warns_like BLOCK REGEXP TEST_NAME

    no_warns_ok BLOCK TEST_NAME

    and the same stuff for carp and cluck.

  enteredby:   BIGJ (Janek Schleicher)
  enteredon:   Wed Jul  3 23:53:30 2002 GMT

The resulting entry would be:

Test::
::Warn            cdpfp Tests for expected/not wanted warnings       BIGJ


Thanks for registering,
The Pause Team

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=24100000_374933b5b7330c22&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=24100000_374933b5b7330c22&SUBMIT_pause99_add_mod_insertit=1

Reply via email to