Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May want to reconsider exporting warnings by default #939

Open
leonerd opened this issue Mar 17, 2023 · 0 comments
Open

May want to reconsider exporting warnings by default #939

leonerd opened this issue Mar 17, 2023 · 0 comments

Comments

@leonerd
Copy link
Contributor

leonerd commented Mar 17, 2023

A default import of use Test2::V0 will import a bunch of symbols, including a warnings function.

This gets in the way of using the warnings pragma module as a class, e.g.

use warnings;
use Test2::V0;

BEGIN { warnings->import( .... ) }

because it complains:

Not enough arguments for Test2::Tools::Warnings::warnings at ...

Simple enough solutions to this are use Test2::V0 qw( :DEFAULT !warnings ); or warnings::->import .... but either is slightly annoying to remember to do.

@exodist exodist transferred this issue from Test-More/Test2-Suite Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant