Dist::Zilla::Role::Git::DirtyFiles - provide the allow_dirty & changelog attributes
version 2.010
This role is used within the git plugin to work with files that are dirty in the local git checkout.
A list of files that are allowed to be dirty in the git checkout. Defaults to dist.ini and the changelog (as defined per the changelog attribute.
dist.ini
changelog
If your repo_root is not the default (.), then these filenames are relative to Dist::Zilla's root directory, not the Git root directory.
repo_root
.
The name of the changelog. Defaults to Changes.
Changes
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. If $listAllowed is true, only allowed files are listed. If it's false, only files that are not allowed to be dirty are listed.
$git
allow_dirty
$listAllowed
In scalar context, returns the number of dirty files.
Jerome Quelin
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.
To install Dist::Zilla::Plugin::Git, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::Git
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::Git
For more information on module installation, please visit the detailed CPAN module installation guide.