| Version 12 (modified by szabgab, 2 years ago) (diff) |
|---|
Description
As a first step in the direction of supporting CPAN-style Perl projects we integrated into Padre the use of Module::Starter, The intent is to make it as easy as possible for CPAN authors (and especially for first-time CPAN authors) to have installers that follow all the best practices for distribution installation, but involve as much DWIM (Do What I Mean) as possible when writing them.
The "bones" of every new module are basically the same: even if it's not your intention to distribute, you should still Build, new module frameworks automatically. PBP
- File -> New -> Perl Distribution will bring up a dialog box where you can select some of the parameters your new project has such
as Name of the Project (e.g. My::Widgets), Author - that is probably your name, e-mail (your e-mail).
Builder is the tool that you project is going to use to package itself and then your user will use to install the project. Currently Module::Build and ExtUtils::MakeMaker? are supported. (TO DO add Module::Install as well).
License is one of the keywords currently listed in the META.yml spec of Module::Build. (TO DO: update the list or make it dynamic)
Once you click OK, Module::Starter will create a new directory called My-Widgets in the parent directory you selected in the last field.
- The original, oldest module for installing modules is ExtUtils::MakeMaker.
- the daddy, old, use one of the other's
- Module::Build is pure-perl. This means it does not require a make program to be installed for you to build/install modules. In fact, you don't even need a shell, so even platforms like MacOS (traditional) can use it fairly easily. This is not a problem with recent versions of perl because Module::Build is a core module.
- pure-perl :)
- Module::Install is a package for writing installers for CPAN (or CPAN-like) distributions that are clean, simple, minimalist, act in a strictly correct manner with ExtUtils::MakeMaker, Another very unique feature is auto-install. When the module author enables auto-install for his distribution, Module::Install will search for and install any pre-requisite modules that are not installed when Makefile.PL is executed.
- used by Catalyst
module-starter will look for a configuration file before reading its command line parameters. The default location is $HOME/.module-starter/config but if the MODULE_STARTER_DIR environment variable is set, module-starter will look for config in that directory.
- Perl 5 Script: generates a *.pl file
- Perl 5 Module: generates a *.pm file
- Perl 5 Test: generates a *.t file
- Perl 6 Script: genertes a *.pl file
NB. from Padre/share/templates/
Perl Distribution
- Module Name: <your module name>
- note first letter should be Capitalised and :: (package identifiers) supported.
- Author: <your name>
- note this will ignore author: in ~/.moule-starter/config
- Email Address: <your e-mail address>
- note this will ignore email: in ~/.moule-starter/config
- Builder: select an Option
- note you can change the default Option, Tools => Preferences => Advanced => builder
- License: select n Option
- note you can change the default Option, Tools => Preferences => Advanced => license
- Parent Directory: <the dir you wish to build your skeleton in>
Tree view of Skeleton (Vanilla) Build
Mail-Check/
├── Changes
├── ignore.txt
├── lib
│ └── Mail
│ └── Check.pm
├── Makefile.PL
├── MANIFEST
├── README
└── t
├── 00.load.t
├── perlcritic.t
├── pod-coverage.t
└── pod.t
To Do Next
- Load appropriate *.Pl and Run => Run Script
| Skeleton | Action |
|---|---|
| Module::Build | perl Build.PL |
| Module::Install | perl Makfile.PL |
| ExtUtils::MakeMaker | perl Makefile.PL |
Tickets
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1324 | fixed | One of our features is missing... Skelton Build or Module::Starter | adamk | bowtie |
Attachments
-
fnnd.png
(40.8 KB) -
added by bowtie 2 years ago.
image of File -> New -> Perl Distribution
-
builder.png
(10.6 KB) -
added by bowtie 2 years ago.
list of builder options
-
modstart.png
(26.7 KB) -
added by bowtie 2 years ago.
image of new Perl Distribution setup
-
license.png
(37.9 KB) -
added by bowtie 2 years ago.
list of license options
-
modstart2.png
(26.2 KB) -
added by bowtie 6 months ago.
image of new Perl Distribution setup




