Dist::Zilla::Plugin::ShareDir::Tarball - Bundle your shared dir into a tarball
# in dist.ini [ShareDir::Tarball]
Using File::ShareDir to deploy non-Perl files alongside a distribution is great, but it has a problem. Just like for modules, upon installation CPAN clients don't remove any of the files that were already present in the /lib directories beforehand. So if version 1.0 of the distribution was sharing
and version 1.1 changed that to
then a user installing first version 1.0 then 1.1 will end up with
share/foo share/bar share/baz
which might be a problem (or not).
Fortunately, there is a sneaky workaround in the case where you don't want the files of past distributions to linger around. The trick is simple: bundle all the files to be shared into a tarball called shared-files.tar.gz. As there is only that one file, any new install is conveniently clobbering the old version.
But archiving the content of the share directory is no fun. Hence Dist::Zilla::Plugin::ShareDir::Tarball which, upon the file munging stage, gathers all files in the share directory and build the shared-files.tar.gz archive with them. If there is no such files, the process is simply skipped.
The source directory to be bundled into the shared tarball. Defaults to
Dist::Zilla::Plugin::ShareDir, which is similar to this module, but without the conversion of the shared directory into a tarball.
Yanick Champoux <email@example.com>
This software is copyright (c) 2012 by Yanick Champoux.