Dist::...::Repo(3pm)
π Dist::Zilla::Role::Git::Repo β the 3pm girlies' cut π
okay bestie, so this is a Perl manual page, filed under User Contributed Perl Documentation, and it's literally just called Dist::...::Repo in the header because man headers are dramatic like that. It's the 3pm section, meaning it's a module doc. Let's go β¨
β¨ NAME β¨
Dist::Zilla::Role::Git::Repo β the role that hands out repository info for your Git plugins π
πΈ VERSION πΈ
version 2.052 β yeah, it's giving established, it's giving stable π«Ά
π¦ DESCRIPTION π¦
So the way this works: this role gets consumed by the Git plugins, and its whole job is two things:
- it goes and finds out how your repo is structured (where's the root, etc.)
- it builds you a
Git::Wrapperobject so you can actually talk to git
That's it. That's the whole vibe. No cap π
π ATTRIBUTES π
repo_root
This is the repository root, bestie. You can give it as a full path, or you can give it relative to the distribution root β both are valid, queen.
The default? It's just the distribution root, which in code is written like:
$zilla->root
so if you don't say anything, it assumes the repo lives right at the top of your dist. Simple. Clean. Iconic. β¨
π₯ METHODS π₯
current_git_branch
$branch = $plugin->current_git_branch;
This one returns the current branch in the repository. But β and hear me out β if your repo has a detached HEAD (iykyk, we've all been there, floating in the void with no branch π), it returns undef instead.
β οΈ warning bestie: this value is cached. Like, it gets remembered and it does not update if the branch gets changed during the run. So if something switches branches mid-run, this method is still out here telling you about the old one. It's committed to that memory, fr fr π
git
$git = $plugin->git;
This method returns a Git::Wrapper object for the repo_root directory. If one doesn't exist yet, it constructs one on the spot β no hesitation, no prep, just builds it π§
And here's the cute part: the object is shared between all the plugins that consume this role β as long as they've all got the same repo_root. So everybody's holding hands and using the same wrapper. Community. Collaboration. Slay π
π«Ά SUPPORT π«Ά
Got beef with the code? Found a bug? You can submit it through the RT bug tracker here:
or if you're an email girlie, straight to:
bug-Dist-Zilla-Plugin-Git@rt.cpan.org
There's also a mailing list for users of this distribution, right here:
and there's an IRC channel if you wanna hang with the distribution users β it's #distzilla on irc.perl.org:
- <irc://irc.perl.org/#distzilla>
Come through, the people are nice π
β AUTHOR β
Jerome Quelin β the icon, the legend, the moment π
π COPYRIGHT AND LICENCE π
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. Free as in, like, actually free bestie π
that's the whole page!! every flag-free, method-laden, license-covered inch of it, no details left behind, periodt π β¨
source/version: perl v5.40.1, dated 2025-09-29, straight out of the Dist::...::Repo(3pm) file β mwah, love that for us π¦π
π¦ where this page comes from
- ubuntu resolute: libdist-zilla-plugin-git-perl 2.052-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdist-zilla-plugin-git-perl 2.052-1 Β· 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