Dist::...yFiles(3pm)

πŸ’– Dist::Zilla::Role::Git::DirtyFiles πŸ’–

okay bestie, welcome to the manual page for Dist::Zilla::Role::Git::DirtyFiles β€” it's a Perl role (that's a <pink>User Contributed Perl Documentation</pink> kinda situation, you're in the right place) and honestly it's the little diva in charge of knowing which files in your git checkout are ✨messy✨.


⭐ VERSION ⭐

version 2.052 β€” that's the one, that's the vibe check.


🌸 DESCRIPTION 🌸

So this role lives inside the git plugin and its whole job is dealing with files that are dirty in your local git checkout. Like, uncommitted changes, deleted stuff, all that chaotic energy. It's giving "we need to know what's uncommitted before we ship." 🫢


πŸŽ€ ATTRIBUTES πŸŽ€

πŸ’… allow_dirty

A list of paths that are allowed to be dirty in the git checkout. Like, these ones get a pass, no questions asked.

Defaults to dist.ini and the changelog (as defined per the changelog attribute β€” shoutout to the next section).

Heads up bestie: if your repo_root is not the default ("."), then these pathnames are relative to Dist::Zilla's root directory, not the Git root directory. The way they're just... different roots. iykyk. 😭

πŸ¦‹ allow_dirty_match

A list of regular expressions that match paths allowed to be dirty in the git checkout. This gets combined with allow_dirty (they're a duo, a package deal πŸ’œ). Defaults to the empty list.

And a plot twist: the paths being matched here are relative to the Git root directory, even if your repo_root is not the default ("."). Yes, different from allow_dirty. No, I don't make the rules. πŸ’€

πŸ“ changelog

The name of the changelog. Defaults to Changes. That's it, that's the whole thing. Iconic behaviour, honestly. ✨


πŸ”₯ METHODS πŸ”₯

🧚 list_dirty_files

my @dirty = $plugin->list_dirty_files($git, $listAllowed);

This returns a list of the modified or deleted files in $git, filtered against the allow_dirty attribute. Main character energy for real.

  • If $listAllowed is true β†’ only the allowed files are listed. πŸ‘‘
  • If it's false β†’ only the files that are not allowed to be dirty are listed. πŸ™ˆ
ngl this one's important: in scalar context, it returns the number of dirty files. Not the list. The count. So know which context you're in, bestie, or you'll be out here confused. πŸ’…

🫢 SUPPORT 🫢

Got bugs? Same, but also: bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Git> (or, if email is more your thing, bug-Dist-Zilla-Plugin-Git@rt.cpan.org). πŸ“¬

There's also a mailing list for users of this distribution, right here: <http://dzil.org/#mailing-list>. 🌈

And if you wanna just vibe and chat, there's an irc channel for users of this distribution: #distzilla on irc.perl.org at <irc://irc.perl.org/#distzilla>. Come hang, fr fr. πŸŽ€


πŸ’œ AUTHOR πŸ’œ

Jerome Quelin β€” thank you for your service, legend. ⭐


This software is copyright (c) 2009 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay. 🧚


and that's the whole page, bestie!! this gem's docs are perl v5.40.1, dated 2025-09-29, and the manpage answers to the name Dist::...yFiles(3pm) (yes the truncation is real, no I can't fix it, it's the terminal's fault πŸ’€). go forth and commit your changes. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from