Dist::...Writer(3pm)
πΈ Name πΈ
okay so bestie, this is Dist::Zilla::Plugin::PotWriter β the thing that writes gettext language translation template files. that's the whole job. she's a role, she's a plugin, she's lowkey iconic π
β¨ Synopsis β¨
with 'Dist::Zilla::Role::PotWriter';
# ...
sub execute {
my $self = shift;
$self->write_pot(%params);
}
like, that's it. you consume the role, you call the method, you move on with your life π«Ά
π Description π
so this role hands you a lil utility method for generating a GNU gettext-style language translation template. the gettext website is at http://www.gnu.org/software/gettext/ if you wanna go look at it, which honestly? slay.
π¦ Instance Methods π¦
write_pot
$self->write_pot(%params);
creates or updates a GNU gettext-style language translation file (http://www.gnu.org/software/gettext/ β yes i'm mentioning it again, it's important, okay?). and here's the tea on the supported parameters, bestie, listen up:
toβ aPath::Tinyobject that represents the file you're writing to. required. noto, no deal. that's the vibe check.scan_filesβ an array reference listing out the files to scan. defaults to every single*.pmfile thatDist::Zillagathered up. so if you don't say anything, she's gonna look at all of them fr fr.xgettextβ the path to thexgettextapplication. defaults to just plainxgettext(xgettext.exeif you're on Windows, bestie, we don't make the rules) β which should work fine as long as it's sitting in your path. β¨encodingβ the encoding to assume when she's scanning for localizable strings. defaults toUTF-8. as it should be, periodt.packageβ the name of the localization package. defaults to the distribution name exactly as it's configured forDist::Zilla. no extra thinking required, she already knows. πversionβ the version of the package. defaults to whatever version is configured forDist::Zilla. same energy. same slay.copyright_holderβ the name of the translation copyright holder. defaults to the copyright holder that's configured forDist::Zilla. she's just gonna go with what you already told her. πbugs_emailβ the email address for reporting translation bugs. defaults to the email address of the first author known toDist::Zilla, if that's available and parseable byEmail::Address::XS. if it's not available, orEmail::Address::XSlooks at it and goes π, then no default for you.
π Author π
David E. Wheeler <david@justatheory.com> β the main character, honestly π
π Contributor π
Charles McGarvey <ccm@cpan.org> β also here, also serving, we love a collaborator π«Ά
π Copyright and License π
this software is copyright (c) 2012-2017 by David E. Wheeler. that's the whole range, don't @ me.
and it's free software, bestie β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. that's the deal. take it, it's yours. π
one tiny heads up so nobody's surprised: this doc came from perlv5.26.2and it's dated2018-07-08. go off, vintage queen π§
that's the whole page, bestie β now go write those .pot files. slay π
β¨
π¦ where this page comes from
- debian bookworm: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms