NAME

Dist::Zilla::Plugin::ShareDir::Clean - Delete current per-dist share dir before install

VERSION

This document describes version 0.05 of Dist::Zilla::Plugin::ShareDir::Clean (from Perl distribution Dist-Zilla-Plugin-ShareDir-Clean), released on 2016-06-08.

SYNOPSIS

In your dist.ini:

[ShareDir]

[ShareDir::Clean]
;dir=share

DESCRIPTION

WARNING: This plugin will add a code in Makefile.PL to *DELETE* (rm -rf) a directory in the installation target, which might have severe consequences. Don't use this plugin unless you know exactly what you're doing.

This plugin is an alternative to using Dist::Zilla::Plugin::ShareDir::Tarball (please read the documentation of that module first for the rationale). With this plugin, you can keep using Dist::Zilla::Plugin::ShareDir, but eliminate the problem of lingering old files.

What this plugin does is delete the current per-dist share directory in the installation target before installation.

Some caveats/current limitations:

  • Only Makefile.PL is currently supported.

  • Windows (or other non-POSIX) installation target system is not yet tested.

All in all, I think Yanick's ShareDir::Tarball plugin is a slightly more elegant hack and I use it. But when it's more appropriate, I use this plugin too.

CONFIGURATION

dir => str (default: share)

Name of shared directory.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Dist-Zilla-Plugin-ShareDir-Clean.

SOURCE

Source repository is at https://github.com/perlancar/perl-Dist-Zilla-Plugin-ShareDir-Clean.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-ShareDir-Clean

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Dist::Zilla::Plugin::ShareDir

Dist::Zilla::Plugin::ShareDir::Tarball

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.