| Dist-Zilla documentation | Contained in the Dist-Zilla distribution. |
Dist::Zilla::Plugin::ShareDir - install a directory's contents as "ShareDir" content
version 4.200008
In your dist.ini:
[ShareDir]
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::ShareDir; BEGIN { $Dist::Zilla::Plugin::ShareDir::VERSION = '4.200008'; } # ABSTRACT: install a directory's contents as "ShareDir" content use Moose; use Moose::Autobox; has dir => ( is => 'ro', isa => 'Str', default => 'share', ); sub find_files { my ($self) = @_; my $dir = $self->dir; my $files = $self->zilla->files->grep(sub { index($_->name, "$dir/") == 0 }); } sub share_dir_map { my ($self) = @_; my $files = $self->find_files; return unless @$files; return { dist => $self->dir }; } with 'Dist::Zilla::Role::ShareDir'; __PACKAGE__->meta->make_immutable; no Moose; 1; __END__