- Each Perl module file needs to declare pragmas at the top of the file for them to have any effect. This is irritating. All this time I thought I was coding in modern perl, with strict and warnings enabled. Adding those things back has been a PITA. At least this time I was smart enough to build a test suite.
- Test::More doesn’t handle UTF8 well at all. Because of how it duplicates the standard file handles, you can’t easily change STDOUT etc to handle UTF8. It can be fixed by adding some boilerplate to the test files:
<br /> use Test::More;<br /> my $builder = Test::More->builder;<br /> binmode $builder->output, ":utf8";<br /> binmode $builder->failure_output, ":utf8";<br /> binmode $builder->todo_output, ":utf8";<br />
And don’t forget to add strict and warnings to each and every test file.