get hints from strictures as late as possible
authorGraham Knop <haarg@haarg.org>
Wed, 1 Jul 2015 10:31:36 +0000 (06:31 -0400)
committerGraham Knop <haarg@haarg.org>
Wed, 1 Jul 2015 10:31:36 +0000 (06:31 -0400)
commit6c8bf56cd4942ec40e37a6db79d4bab121e1cff8
tree943b85b075adca042551e88abc689406783c53a8
parent21496cf62aad43a37846bed5d517b663e5cd5915
get hints from strictures as late as possible

strictures v1 enables all fatal warnings, which included anything custom
registered by other modules.  Moo will delay loading modules for as long
as possible, which means some things, like Class::Method::Modifiers,
won't be loaded until the WithHintPersistence role is applied at object
creation time.  This may what causes vars.pm to be loaded, which
registers a warning category and can break the test.

If we delay checking the expected hints until immediately before going
the eval test, all warning categories should be loaded.
t/hints.t
t/lib/get_strictures_hints.pm