NAME

Dist::Zilla::Plugin::Manifest::Write - Have annotated MANIFEST in your distribution

VERSION

Version 0.004, released on 2015-07-09 14:23 UTC.

WHAT?

Dist-Zilla-Plugin-Manifest-Write is a plugin for Dist-Zilla, a replacement for standard plugin Manifest. Dist-Zilla-Plugin-Manifest-Write writes annotated MANIFEST: each filename is followed by a comment, explaining origin of the file, whether it is part of software, meta information, or 3rd party file.

This is Dist::Zilla::Plugin::Manifest::Write module documentation. Read this if you are going to hack or extend Dist-Zilla-Plugin-Manifest-Write.

If you want to have annotated MANIFEST in your distribution, read the Manual. General topics like getting source, building, installing, bug reporting and some others are covered in the ReadMe.

SYNOPSIS

package Dist::Zilla::Plugin::Manifest::Write::FileSize;

use Moose;
use namespace::autoclean;
use parent 'Dist::Zilla::Plugin::Manifest::Write';
our $VERSION = '0.007';

#   Overload any method or modify it with all the Moose power, e. g.:
around _comment => sub {
    my ( $orig, $self, $file ) = @_;
    my $comment = $self->$orig( $file );
    if ( $file->name ne $self->manifest ) {
        $comment .= sprintf( ' (%d bytes)', length( $file->encoded_content ) );
    };
    return $comment;
};

__PACKAGE__->meta->make_immutable;
1;

DESCRIPTION

Dist::Zilla::Plugin::Manifest::Write class plays Dist::Zilla::Role::FileGatherer role. To perform the role, the class implements gather_files method. Other methods are supporting helpers for this one.

This documentation is far from be complete, but the module is rather simple.

CLASS METHODS

BUILDARGS

Split `source_providers` and `metainfo_providers` options. It allows user to specify multiple plugin names in one line in dist.ini file, e. g.:

[Manifest::Write]
    source_providers = GatherDir GatherDir::Template

INSTANCE ATTRIBUTES

manifest

String. Name of manifest file to write. Default value is MANIFEST.

INSTANCE METHODS

_filename

TODO

_comment

TODO

gather_files

This is the main method of the class. It adds a file with name $self-manifest> to the distribution. File content is specified with CodeRef to postpone actual file creation. Being evaluated, the code iterates through all the files in distribution in alphabetical order, and fulfills the manifest with filenames and comments.

mvp_multivalue_args

TODO

SEE ALSO

Dist::Zilla
Dist::Zilla::Role
Dist::Zilla::Role::Plugin
Dist::Zilla::Role::FileGatherer
Dist::Zilla::Plugin::Manifest
Dist::Zilla::Plugin::Manifest::Write::Manual
Dist::Zilla::Plugin::Manifest::Write::ReadMe

AUTHOR

Van de Bugger <van.de.bugger@gmail.com>

COPYRIGHT AND LICENSE

Copyright © 2015 Van de Bugger

This file is part of perl-Dist-Zilla-Plugin-Manifest-Write.

perl-Dist-Zilla-Plugin-Manifest-Write is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

perl-Dist-Zilla-Plugin-Manifest-Write is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with perl-Dist-Zilla-Plugin-Manifest-Write. If not, see <http://www.gnu.org/licenses/>.