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

Don't turn on global warnings via shebang parsing in tests #3

Merged
merged 1 commit into from
Oct 9, 2013

Conversation

avar
Copy link

@avar avar commented Oct 2, 2013

A tests in t/06-compiler.t was broken because it relied on $^W being
true via the shebang being parsed. Mason actually doesn't turn on
warnings for you by default, and these tests were just implicitly
relying on perl setting $^W because it would parse the shebang of this
file.

Do a "use warnings" in t/06-compiler.t and other tests instead of
turning $^W on implicitly via the shebang.

fix tests that were relying on global warnings not to not do
so (Mason won't warn about runtime warnings like "$x + undef" by
default), and add new tests to show that the previous behavior only
kicks in if you add an explicit "use warnings".

Remove the shebangs for all tests except t/12-taint.t, where it's
actually used to enable taint support.

This is needed because I was going to add a use_warnings option similar
to use_strict, but couldn't actually test for it because it didn't do
anything, because warnings were globally enabled!

A tests in t/06-compiler.t was broken because it relied on $^W being
true via the shebang being parsed. Mason actually *doesn't* turn on
warnings for you by default, and these tests were just implicitly
relying on perl setting $^W because it would parse the shebang of this
file.

Do a "use warnings" in t/06-compiler.t and other tests instead of
turning $^W on implicitly via the shebang.

fix tests that were relying on global warnings not to not do
so (Mason *won't* warn about runtime warnings like "$x + undef" by
default), and add new tests to show that the previous behavior only
kicks in if you add an explicit "use warnings".

Remove the shebangs for all tests except t/12-taint.t, where it's
actually used to enable taint support.

This is needed because I was going to add a use_warnings option similar
to use_strict, but couldn't actually test for it because it didn't do
anything, because warnings were globally enabled!
@avar avar mentioned this pull request Oct 2, 2013
jonswar added a commit that referenced this pull request Oct 9, 2013
Don't turn on global warnings via shebang parsing in tests
@jonswar jonswar merged commit b1d7d91 into jonswar:master Oct 9, 2013
@jonswar
Copy link
Owner

jonswar commented Oct 9, 2013

Fixed in 1.52, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants