Dist::Zilla::Plugin::License - output a LICENSE file


Dist-Zilla documentation Contained in the Dist-Zilla distribution.

Index


Code Index:

NAME

Top

Dist::Zilla::Plugin::License - output a LICENSE file

VERSION

Top

version 4.200008

DESCRIPTION

Top

This plugin adds a LICENSE file containing the full text of the distribution's license, as produced by the fulltext method of the dist's Software::License object.

AUTHOR

Top

Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


Dist-Zilla documentation Contained in the Dist-Zilla distribution.

package Dist::Zilla::Plugin::License;
BEGIN {
  $Dist::Zilla::Plugin::License::VERSION = '4.200008';
}
# ABSTRACT: output a LICENSE file
use Moose;
with 'Dist::Zilla::Role::FileGatherer';


use Dist::Zilla::File::InMemory;

sub gather_files {
  my ($self, $arg) = @_;

  my $file = Dist::Zilla::File::InMemory->new({
    name    => 'LICENSE',
    content => $self->zilla->license->fulltext,
  });

  $self->add_file($file);
  return;
}

__PACKAGE__->meta->make_immutable;
no Moose;
1;

__END__