Dist::Z...Encoding(3)

πŸ’– Dist::Zilla::Plugin::Encoding πŸ’–

okay so bestie, welcome to the Dist::Zilla::Plugin::Encoding page β€” it lives in the User Contributed Perl Documentation section, and it's here to solve a very specific little problem for you. no cap.

✨ VERSION ✨

version 6.040 β€” yes she's got a number, she's official.


🌸 NAME 🌸

Dist::Zilla::Plugin::Encoding β€” she sets the encoding of arbitrary files. literally that's the whole job. iconic.

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the tea: this plugin lets you explicitly set the encoding on some files in your distribution. not all of them, not vibes-based, just the ones you pick. and you've got two ways to pick them:

  • you can spell out the exact set of files (with the filenames parameter), or
  • you can hand over some regular expressions to check (using match).

either way, you're the main character here. πŸ’…

In your dist.ini:

[Encoding]
encoding = Latin-3

filename = t/esperanto.t  ; this file is Esperanto
match     = ^t/urkish/    ; these are all Turkish

see how she eats? one encoding to rule them all, one exact filename for the Esperanto file, and one match regex catching every Turkish file under ^t/urkish/. slay.


🐚 PERL VERSION 🐚

real talk: this module should work on any version of perl still receiving updates from the Perl 5 Porters. that means any perl released in the last two to three years. fr fr. so like, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.

okay and now the mild jump scare πŸ™ˆ β€” although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come at her with a downgrade PR, bestie, she already told you.

πŸ’œ ATTRIBUTES πŸ’œ

🌈 encoding

this is the encoding to set on the selected files. and there's a special little secret value: "bytes" β€” use that one to indicate raw files that should not be encoded. it's giving "don't touch me I'm raw." πŸ“

🌸 filenames

this is an arrayref of filenames to have their encoding set. you name 'em, she encodes 'em.

πŸ¦‹ matches

this is an arrayref of regular expressions. any file whose name matches one of these regexes will have its encoding set. regex girlies rise. ✨

πŸ’… ignore

this is an arrayref of regular expressions too β€” but this one's the exclusion list. any file whose name matches one of these regexes will not have its encoding set. super useful when you need to ignore a few files that would otherwise get swept up by matches. it's the "not you, babe" list. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Ricardo SIGNES 😏 <cpan@semiotic.systems>

not the 😏 in the author line, I can't, that's so unserious and I love it for him.

this software is copyright (c) 2026 by Ricardo SIGNES.

it's free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt.


and that's the whole page, bestie 🫢 go forth and encode responsibly.

πŸŽ€ cute little sign-off: this was perl v5.42.3, dated 2026-10-19, straight from Dist::Z...Encoding(3). bye babe, hydrate, run your tests πŸ’–πŸŒŸ
πŸ“¦ where this page comes from