wiki:Features/ProjectSkeletonGeneration

Version 11 (modified by bowtie, 3 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

  • 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.


image of File -> New -> Perl Distribution

  • 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

image of new Perl Distribution setup

  • 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

list of builder options

  • License: select n Option
    • note you can change the default Option, Tools => Preferences => Advanced => license

list of license options

  • 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
SkeletonAction
Module::Buildperl Build.PL
Module::Installperl Makfile.PL
ExtUtils::MakeMakerperl Makefile.PL

Tickets

Ticket Resolution Summary Owner Reporter
#1324 fixed One of our features is missing... Skelton Build or Module::Starter adamk bowtie

Attachments (5)

Download all attachments as: .zip