Dist::Z...le::File(3)
π Dist::Z...le::File - the manual, but make it a group chat π
okay bestie, we're looking at Dist::Z...le::File(3) from the User Contributed Perl Documentation, and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
Dist::Zilla::Role::File β something that can act like a file π
like, a file but make it a role. it's giving shapeshifter energy.
πΈ VERSION πΈ
version 6.040 β that's the one, no cap.
π¦ DESCRIPTION π¦
so this role? it describes a file that may be written into the shipped distribution. that's it, that's the whole vibe. it's the blueprint for anything that wants to end up in the thing you actually ship out into the world. main character behavior, fr fr.
β PERL VERSION β
okay this part is important so listen up π
this module should work on any version of perl still receiving updates from the Perl 5 Porters. and what does that mean in human terms? it means it works on any version of perl released in the last two to three years.
concrete example, because we love a concrete example: if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38. slay.
BUT. and this is the but, bestie. although it may work on older versions of perl, there is no guarantee made that the minimum required version will not be increased. it can get bumped for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come through with a "please support perl 5.8" PR and expect a yes. π
π ATTRIBUTES π
π name
this is the name of the file to be written out. the label. the nametag. the whole identity.
π added_by
this is a list of strings describing when and why the file was added to the distribution and when it was updated β whether that update was to its content, its filename, or other attributes.
it will generally be updated by a plugin implementing the FileMunger role. so if you're out here wondering who keeps touching this list, it's the mungers. it's always the mungers.
and plot twist: its accessor will return the list of strings, concatenated with '; '. so what you get back is one string, glued together with semicolon-space. got it? got it. β¨
π mode
this is the mode with which the file should be written out. it's an integer with the usual chmod semantics β you know, the permissions thing, the numbers thing, the 0644 of it all.
and it defaults to 0644. periodt. π₯
π METHODS π
π§ is_bytes
Returns true if the "encoding" is bytes.
and here's the spicy part β when true, accessing "content" will be an error. so if you check is_bytes and it says yeah, and then you go reaching for content anyway? that's an error. don't do that to yourself. π«Ά
π AUTHOR π
Ricardo SIGNES π <cpan@semiotic.systems>
(he's got the emoji in the name, we respect it, we love it, iconic.)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
like, free as in freedom bestie, go wild, just keep the terms. π
and that's the whole page!! this one came to us via perl v5.42.3, dated 2026-10-19, from the Dist::Z...le::File(3) man page itself. mwah. go write some files into a distribution, you absolute icon. πΈβ¨π¦
π¦ where this page comes from
- fedora 44: perl-Dist-Zilla 6.040-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms