pokki has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I'm lost at sea trying to understand how Dist::Zilla::Plugin::PodWeaver, Pod::Weaver, and my POD work together. I have a ~500l .pm file containing the regular stuff: a package declaration, an # ABSTRACT, a bunch of imports, code, and finally
__END__ =pod =head1 SYNOPSIS (redacted because closed source) =head1 DESCRIPTION etc.The SYNOPSIS has a couple Unicode UTF-8 characters (math symbols) which render correctly in Emacs and /usr/bin/less. Both Emacs and /usr/bin/file report "UTF-8 Unicode". I have use utf8; although I don't think that's relevant (but you never know).
My issue is the following: I have two versions of this file, one from an older changeset, one from the current version of the project. None of them have =encoding UTF-8 in the POD. In both cases the dist.ini is identical apart from the dist's version number.
When I dzil build...
I have no idea what controls the addition of =encoding... I came across the Pod::Weaver plugin SingleEncoding but AFAICT it is disabled. All three machines (mine, old CI, new CI) use dzil 5.008. My machine has Pod::Weaver 4.006 (which according to CHANGES has SingleEncoding disabled by default), old CI has 3.101635 which didn't have SingleEncoding at all, new CI has 3.101640 (same).
This breaks HTML rendering with Pod::Simple::XHTML; I see mojibake on the =encoding-less files (and good-looking Unicode on the rest).
Does anyone have any tips for ensuring that dzil-based distributions always have =encoding all the time? Failing that, does anyone know why some files have =encoding and others don't?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dist::Zilla, Pod::Weaver, and the =encoding directive
by Corion (Patriarch) on Jan 22, 2015 at 17:58 UTC | |
by pokki (Monk) on Jan 23, 2015 at 09:41 UTC |