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?


In reply to Dist::Zilla, Pod::Weaver, and the =encoding directive by pokki

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.