| Dist-Zilla documentation | Contained in the Dist-Zilla distribution. |
Dist::Zilla::Plugin::ManifestSkip - decline to build files that appear in a MANIFEST.SKIP-like file
version 4.200008
This plugin reads a MANIFEST.SKIP-like file, as used by ExtUtils::MakeMaker and ExtUtils::Manifest, and prunes any files that it declares should be skipped.
This is the name of the file to read for MANIFEST.SKIP-like content. It defaults, unsurprisingly, to MANIFEST.SKIP.
Ricardo SIGNES <rjbs@cpan.org>
This software is copyright (c) 2011 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.
| Dist-Zilla documentation | Contained in the Dist-Zilla distribution. |
package Dist::Zilla::Plugin::ManifestSkip; BEGIN { $Dist::Zilla::Plugin::ManifestSkip::VERSION = '4.200008'; } # ABSTRACT: decline to build files that appear in a MANIFEST.SKIP-like file use Moose; with 'Dist::Zilla::Role::FilePruner'; use ExtUtils::Manifest 1.54; # public maniskip routine use Moose::Autobox; has skipfile => (is => 'ro', required => 1, default => 'MANIFEST.SKIP'); sub prune_files { my ($self) = @_; my $skipfile = $self->zilla->root->file( $self->skipfile ); return unless -f $skipfile; my $skip = ExtUtils::Manifest::maniskip($skipfile); for my $file ($self->zilla->files->flatten) { next unless $skip->($file->name); $self->log_debug([ 'pruning %s', $file->name ]); $self->zilla->prune_file($file); } return; } __PACKAGE__->meta->make_immutable; no Moose; 1; __END__