| Dist-Zilla documentation | Contained in the Dist-Zilla distribution. |
Dist::Zilla::Plugin::InlineFiles - files in a data section
version 4.200008
This plugin exists only to be extended, and gathers all files contained in its data section and those of its ancestors. For more information, see Data::Section.
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::InlineFiles; BEGIN { $Dist::Zilla::Plugin::InlineFiles::VERSION = '4.200008'; } # ABSTRACT: files in a data section use Moose; use Moose::Autobox; with 'Dist::Zilla::Role::FileGatherer'; use Data::Section 0.004 -setup; # fixed header_re use Dist::Zilla::File::InMemory; sub gather_files { my ($self) = @_; my $data = $self->merged_section_data; return unless $data and %$data; for my $name (keys %$data) { $self->add_file( Dist::Zilla::File::InMemory->new({ name => $name, content => ${ $data->{$name} }, }), ); } return; } __PACKAGE__->meta->make_immutable; no Moose; 1; __END__