Plugin Packaging: Makefile.PL and Plugin Manifests
Once your plugin is ready for distribution, you will need to package it up into a single file, a zip file or a “tarball” (a .tar.gz file common among unix users) so that your users can easily download it.
Even though you have a choice between
.zip files we recommend only producing .zip files as in this day and age, zip is supported almost everywhere.
To create a zip file, you first need to produce two simple files: a Makefile.PL file and a MANIFEST.SKIP file. These files produce an automated way for you to reliably create a zip file. Here are some examples:
use ExtUtils::MakeMaker; WriteMakefile( NAME => "My Plugin's Display Name", VERSION => '1.1', DISTNAME => 'MyPlugin', );
# version control \bCVS (^|/)\. # CPAN chain files ^MANIFEST ^Makefile ^META.yml$ ^blib/ ~$ # packages \.zip$ \.tar\.gz$
Creating a zip file for your plugin
Provided you have created a
MANIFEST.SKIP file, the following sequence of commands will quickly and easily produce a zip file of your plugin. The zip produces will be clean - there will be no
.~ files, or
.svn files, or any other artifacts of development. The zip file will automatically have the version number of the plugin embedded within it to make it easy for your users to differentiate between older and newer builds.
> cd src/PluginName > perl Makefile.PL > make manifest > make zipdist