Test2::Plugin::NoWarnings(3) User Contributed Perl Documentation Test2::Plugin::NoWarnings(3)

# [SYNOPSIS](#SYNOPSIS)

```
    use Test2::V0;
    use Test2::Plugin::NoWarnings;
    ...;
```

# [DESCRIPTION](#DESCRIPTION)

Loading this plugin causes your tests to fail if there any warnings while they run. Each warning generates a new failing test and the warning content is outputted via "diag".

This module uses $SIG{\_\_WARN\_\_}, so if the code you're testing sets this, then this module will stop working.

# [ECHOING WARNINGS](#ECHOING_WARNINGS)

By default, this module suppresses the warning itself so it does not go to "STDERR". If you'd like to also have the warning go to "STDERR" untouched, you can ask for this with the "echo" import argument:

```
    use Test2::Plugin::NoWarnings echo => 1;
```

2026-10-26 perl v5.44.0

---

Document: Test2::Plugin::NoWarnings(3pm) from perl-test2-plugin-nowarnings 0.10-r11 (Chainguard OS)
Source: https://github.com/houseabsolute/Test2-Plugin-NoWarnings
