jonswar/perl-HTML-Mason — pull request #3 by avar (2013-10-02 17:17:27+00:00)
Title: Don't turn on global warnings via shebang parsing in tests

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!