Subject: | Latest inline2test can't use a template that doesn't include [% plan %] |
The latest version of Test::Inline broke my testing environment, because
I use a template that doesn't include a plan. All my tests import a
test library that includes some tests that run automatically. Because
the number of automatic tests can vary based on several criteria, I
specified 'no_plan' in my template, which causes inline2test to fail in
2.105 because of this line in Test::Inline::Content::Simple:
$template =~ /\[\%\s+plan\s+\%\]/ or return undef;
The error message that this produces is rather cryptic: 'Failed to
create ContentHandler for inline2test.tmpl'.
I'm working around the problem by putting [% plan %] in a comment in my
template:
use Test::More 'no_plan'; # [% plan %]
But inline2test should probably either allow you to use a template that
doesn't include [% plan %], or at least provide a more meaningful error
message.