SlideShare a Scribd company logo
1 of 15
Creating Perl modules
with Dist::Zilla
Mark Gardner
mjgardner@cpan.org
What is this about?
• Perl modules are a set of related functions in a file.
• They’re designed to be reusable by other modules or programs.
• Therefore useful to you:
• Collect useful functions in one place, stop copying and pasting code
• And useful to others:
• You too can be a CPAN author!
• There are many many ways to create modules; this is how I do it.
• Dist::Zilla makes it really easy.
• If you want to do it a different way go ahead – TIMTOWTDI
How easy is this?
• One-time setup:
cpan -i Dist::Zilla or ppm install Dist-Zilla
installs many (160) prerequisites
dzil setup
• Make a new module:
dzil new My::Module
cd My-Module
dzil build
What does Dist::Zilla do?
• Builds scaffolding and boilerplate for a CPAN-ready Perl module
distribution
• README, LICENSE, MANIFEST, META.yml and/or META.json,
Makefile.PL or Build.PL, lib/, bin/, t/ …
• Manages the building, testing, installation and release of distributions
during development
• Extensible through plugins and plugin bundles to handle other repetitive
tasks
• Prerequsites
• Version numbers
• Documentation
• Testing
• Saves you (the developer) time and stress
What doesn’t Dist::Zilla do?
• It’s not a system for users to install released or published code.
• It doesn’t make you write object (or any other kind of) oriented code.
• It doesn’t make you change existing code if you don’t want to.
Put your modules in lib/
• In lib/My/Module.pm:
use strict;
use warnings;
package My::Module;
# your code goes here
1;
• Scripts go in bin/ if you have them.
The dist.ini file
name = My-Module
author = Mark Gardner <mjgardner@cpan.org>
license = Perl_5
copyright_holder = Aria Systems, Inc.
copyright_year = 2013
version = 0.001
[@Basic]
The Basic plugin bundle
• Does not change your code
• Generates MANIFEST, Makefile.PL, META.yml, README
• Allows easy release to CPAN
• If you want to do more, add/change plugins in dist.ini
• perldoc Dist::Zilla::PluginBundle::Basic for more
Handling prerequisites in dist.ini
• Manually:
[Prereqs]
Sub::Exporter = 0.979
Acme::ProgressBar = 0
• Automatically:
[AutoPrereqs]
• Use both if AutoPrereqs doesn’t do what you want.
Handling documentation with
Pod::Weaver
• In dist.ini:
[PodWeaver]
• Makes Pod sections for
NAME, VERSION, AUTHOR, COPYRIGHT
AND LICENSE
• Gathers things like methods into a
METHODS section
• In your code:
use strict;
use warnings;
package My::Module;
# ABSTRACT: my cool module
=head1 SYNOPSIS
use My::Module;
=method foo
=cut
# your code goes here
1;
Managing version numbers (several
plugins)
• Putting them in the right places
• [PkgVersion] and [OurPkgVersion]
• [NextRelease]
• [Git::Tag]
• Automatically manage numbering
• [AutoVersion]
• [VersionFromModule]
• [Git::NextVersion]
Testing
• prove -lr t
• Runs all tests in t/ using libraries in lib/
• Does not take advantage of Dist::Zilla changes to your code
• But it’s fast!
• dzil test
• Builds a temporary copy and runs its tests
• Should do exactly what end-user testing will do
• Can be slower since it’s building the distribution first
Releasing to CPAN
[TestRelease]
[ConfirmRelease]
[UploadToCPAN]
• PAUSE credentials in either ~/.pause or ~/.dzil/config.ini
dzil release
• For trial (not for automatic update) releases:
dzil release --trial
Many many more techniques and plugins
• Custom profiles for multiple dist.ini and directory layouts
• Pod::Weaver plugins for custom sections, encodings, etc.
• Integration with Git, GitHub, Twitter, TravisCI, etc.
• Automatic generation of web services clients
• Building for other package managers like RPM amd Dpkg
• Commands and tests for Perl::Tidy, Devel::Cover, Perl::Critic, etc.
• Dist::Zilla users often become Dist::Zilla extenders
Thank you!
http://dzil.org/
https://metacpan.org/module/Dist::Zilla
https://github.com/rjbs/dist-zilla/
irc://irc.perl.org/distzilla

More Related Content

What's hot

Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...Simplilearn
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22Võ Duy Tuấn
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPressAlan Lok
 
Network Automation: Ansible 101
Network Automation: Ansible 101Network Automation: Ansible 101
Network Automation: Ansible 101APNIC
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introductionSimon Funk
 
CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5neilbowers
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction PresentationNerd Tzanetopoulos
 
Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7Ryan Szrama
 
[WSO2Con EU 2017] An Overview of Ballerina Composer
[WSO2Con EU 2017] An Overview of Ballerina Composer[WSO2Con EU 2017] An Overview of Ballerina Composer
[WSO2Con EU 2017] An Overview of Ballerina ComposerWSO2
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiJérémy Derussé
 
Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Alan Lok
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 

What's hot (20)

Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22
 
Extending ansible
Extending ansibleExtending ansible
Extending ansible
 
Composer
ComposerComposer
Composer
 
Os Bubna
Os BubnaOs Bubna
Os Bubna
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPress
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Network Automation: Ansible 101
Network Automation: Ansible 101Network Automation: Ansible 101
Network Automation: Ansible 101
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Creating custom themes in AtoM
Creating custom themes in AtoMCreating custom themes in AtoM
Creating custom themes in AtoM
 
CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7Making the Most of Modern PHP in Drupal 7
Making the Most of Modern PHP in Drupal 7
 
[WSO2Con EU 2017] An Overview of Ballerina Composer
[WSO2Con EU 2017] An Overview of Ballerina Composer[WSO2Con EU 2017] An Overview of Ballerina Composer
[WSO2Con EU 2017] An Overview of Ballerina Composer
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 

Viewers also liked

Embedding customer insight into the corporate culture Cheryl Coppell, London ...
Embedding customer insight into the corporate culture Cheryl Coppell, London ...Embedding customer insight into the corporate culture Cheryl Coppell, London ...
Embedding customer insight into the corporate culture Cheryl Coppell, London ...localinsight
 
5 secrets of dominating google search
5 secrets of dominating google search5 secrets of dominating google search
5 secrets of dominating google searchMegan Hargroder
 
Grafico diario del dax perfomance index para el 09 08-2013
Grafico diario del dax perfomance index para el 09 08-2013Grafico diario del dax perfomance index para el 09 08-2013
Grafico diario del dax perfomance index para el 09 08-2013Experiencia Trading
 
Regalate una escapada a la naturaleza
Regalate una escapada a la naturalezaRegalate una escapada a la naturaleza
Regalate una escapada a la naturalezaPaloma Cambero Varela
 
JS-resume final
JS-resume finalJS-resume final
JS-resume finalJuan Silva
 
Inovatyon microfranquia v3
Inovatyon microfranquia v3 Inovatyon microfranquia v3
Inovatyon microfranquia v3 Wellisson Araujo
 
Understanding Open Licensing: Day Three - Progressing Towards Opennes
Understanding Open Licensing: Day Three - Progressing Towards OpennesUnderstanding Open Licensing: Day Three - Progressing Towards Opennes
Understanding Open Licensing: Day Three - Progressing Towards OpennesIDS Knowledge Services
 
Quelles qualifications et certifications RGE pour quels travaux ?
Quelles qualifications et certifications RGE pour quels travaux ?Quelles qualifications et certifications RGE pour quels travaux ?
Quelles qualifications et certifications RGE pour quels travaux ?Isocell France
 
Leica disto bluetooth and apps getting started on i os
Leica disto bluetooth and apps getting started on i osLeica disto bluetooth and apps getting started on i os
Leica disto bluetooth and apps getting started on i osCurtis Woodward
 
Apresentatçao total one 07 08-2015
Apresentatçao total one 07 08-2015Apresentatçao total one 07 08-2015
Apresentatçao total one 07 08-2015Wellisson Araujo
 
Resolución pliegos nutrición adulto mayor
Resolución pliegos nutrición adulto mayorResolución pliegos nutrición adulto mayor
Resolución pliegos nutrición adulto mayorAlcaldiacocorna
 
Peshawar to Pittsburgh
Peshawar to PittsburghPeshawar to Pittsburgh
Peshawar to PittsburghAmy Armstrong
 
Verruga Peruana: An Infectious Endemic Angiomatosis
Verruga Peruana: An Infectious Endemic AngiomatosisVerruga Peruana: An Infectious Endemic Angiomatosis
Verruga Peruana: An Infectious Endemic AngiomatosisDr. Juan Rodriguez-Tafur
 
The history of the happy ballroom
The history of the happy ballroomThe history of the happy ballroom
The history of the happy ballroom1066heritage
 

Viewers also liked (20)

てすと4
てすと4てすと4
てすと4
 
My Architecture Portfolio 2015
My Architecture Portfolio 2015My Architecture Portfolio 2015
My Architecture Portfolio 2015
 
Embedding customer insight into the corporate culture Cheryl Coppell, London ...
Embedding customer insight into the corporate culture Cheryl Coppell, London ...Embedding customer insight into the corporate culture Cheryl Coppell, London ...
Embedding customer insight into the corporate culture Cheryl Coppell, London ...
 
Mba análisis del proceso de la gestion ambiental en colombia a partir del t...
Mba  análisis del proceso de la gestion ambiental en colombia a partir del t...Mba  análisis del proceso de la gestion ambiental en colombia a partir del t...
Mba análisis del proceso de la gestion ambiental en colombia a partir del t...
 
5 secrets of dominating google search
5 secrets of dominating google search5 secrets of dominating google search
5 secrets of dominating google search
 
Grafico diario del dax perfomance index para el 09 08-2013
Grafico diario del dax perfomance index para el 09 08-2013Grafico diario del dax perfomance index para el 09 08-2013
Grafico diario del dax perfomance index para el 09 08-2013
 
Regalate una escapada a la naturaleza
Regalate una escapada a la naturalezaRegalate una escapada a la naturaleza
Regalate una escapada a la naturaleza
 
Mba estrategia clase3a
Mba estrategia clase3aMba estrategia clase3a
Mba estrategia clase3a
 
WorkBC Employment Services Center
WorkBC Employment Services CenterWorkBC Employment Services Center
WorkBC Employment Services Center
 
JS-resume final
JS-resume finalJS-resume final
JS-resume final
 
Inovatyon microfranquia v3
Inovatyon microfranquia v3 Inovatyon microfranquia v3
Inovatyon microfranquia v3
 
Understanding Open Licensing: Day Three - Progressing Towards Opennes
Understanding Open Licensing: Day Three - Progressing Towards OpennesUnderstanding Open Licensing: Day Three - Progressing Towards Opennes
Understanding Open Licensing: Day Three - Progressing Towards Opennes
 
Quelles qualifications et certifications RGE pour quels travaux ?
Quelles qualifications et certifications RGE pour quels travaux ?Quelles qualifications et certifications RGE pour quels travaux ?
Quelles qualifications et certifications RGE pour quels travaux ?
 
Leica disto bluetooth and apps getting started on i os
Leica disto bluetooth and apps getting started on i osLeica disto bluetooth and apps getting started on i os
Leica disto bluetooth and apps getting started on i os
 
Apresentatçao total one 07 08-2015
Apresentatçao total one 07 08-2015Apresentatçao total one 07 08-2015
Apresentatçao total one 07 08-2015
 
Sue-Helen FFC App 16Jan2014
Sue-Helen FFC App 16Jan2014Sue-Helen FFC App 16Jan2014
Sue-Helen FFC App 16Jan2014
 
Resolución pliegos nutrición adulto mayor
Resolución pliegos nutrición adulto mayorResolución pliegos nutrición adulto mayor
Resolución pliegos nutrición adulto mayor
 
Peshawar to Pittsburgh
Peshawar to PittsburghPeshawar to Pittsburgh
Peshawar to Pittsburgh
 
Verruga Peruana: An Infectious Endemic Angiomatosis
Verruga Peruana: An Infectious Endemic AngiomatosisVerruga Peruana: An Infectious Endemic Angiomatosis
Verruga Peruana: An Infectious Endemic Angiomatosis
 
The history of the happy ballroom
The history of the happy ballroomThe history of the happy ballroom
The history of the happy ballroom
 

Similar to Creating Perl modules with Dist::Zilla

Dist::Zilla - A very brief introduction
Dist::Zilla - A very brief introductionDist::Zilla - A very brief introduction
Dist::Zilla - A very brief introductionDean Hamstead
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Proxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::StaticperlProxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::Staticperlnohuhu
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Ben Shell
 
Make your CPAN module static installable
Make your CPAN module static installableMake your CPAN module static installable
Make your CPAN module static installableShoichi Kaji
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010Kang-min Liu
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupalarithmetric
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 moduletedbow
 
DrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewDrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewlittleMAS
 
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Steve Kessler
 
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDavid Lanier
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Dev traning 2016 symfony
Dev traning 2016   symfonyDev traning 2016   symfony
Dev traning 2016 symfonySacheen Dhanjie
 

Similar to Creating Perl modules with Dist::Zilla (20)

Dist::Zilla - A very brief introduction
Dist::Zilla - A very brief introductionDist::Zilla - A very brief introduction
Dist::Zilla - A very brief introduction
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Proxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::StaticperlProxying DBI with DBD::Gofer and App::Staticperl
Proxying DBI with DBD::Gofer and App::Staticperl
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
 
Make your CPAN module static installable
Make your CPAN module static installableMake your CPAN module static installable
Make your CPAN module static installable
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
DrupalCon LA 2015 Review
DrupalCon LA 2015 ReviewDrupalCon LA 2015 Review
DrupalCon LA 2015 Review
 
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
 
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With Puppet
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Dev traning 2016 symfony
Dev traning 2016   symfonyDev traning 2016   symfony
Dev traning 2016 symfony
 

Recently uploaded

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Creating Perl modules with Dist::Zilla

  • 1. Creating Perl modules with Dist::Zilla Mark Gardner mjgardner@cpan.org
  • 2. What is this about? • Perl modules are a set of related functions in a file. • They’re designed to be reusable by other modules or programs. • Therefore useful to you: • Collect useful functions in one place, stop copying and pasting code • And useful to others: • You too can be a CPAN author! • There are many many ways to create modules; this is how I do it. • Dist::Zilla makes it really easy. • If you want to do it a different way go ahead – TIMTOWTDI
  • 3. How easy is this? • One-time setup: cpan -i Dist::Zilla or ppm install Dist-Zilla installs many (160) prerequisites dzil setup • Make a new module: dzil new My::Module cd My-Module dzil build
  • 4. What does Dist::Zilla do? • Builds scaffolding and boilerplate for a CPAN-ready Perl module distribution • README, LICENSE, MANIFEST, META.yml and/or META.json, Makefile.PL or Build.PL, lib/, bin/, t/ … • Manages the building, testing, installation and release of distributions during development • Extensible through plugins and plugin bundles to handle other repetitive tasks • Prerequsites • Version numbers • Documentation • Testing • Saves you (the developer) time and stress
  • 5. What doesn’t Dist::Zilla do? • It’s not a system for users to install released or published code. • It doesn’t make you write object (or any other kind of) oriented code. • It doesn’t make you change existing code if you don’t want to.
  • 6. Put your modules in lib/ • In lib/My/Module.pm: use strict; use warnings; package My::Module; # your code goes here 1; • Scripts go in bin/ if you have them.
  • 7. The dist.ini file name = My-Module author = Mark Gardner <mjgardner@cpan.org> license = Perl_5 copyright_holder = Aria Systems, Inc. copyright_year = 2013 version = 0.001 [@Basic]
  • 8. The Basic plugin bundle • Does not change your code • Generates MANIFEST, Makefile.PL, META.yml, README • Allows easy release to CPAN • If you want to do more, add/change plugins in dist.ini • perldoc Dist::Zilla::PluginBundle::Basic for more
  • 9. Handling prerequisites in dist.ini • Manually: [Prereqs] Sub::Exporter = 0.979 Acme::ProgressBar = 0 • Automatically: [AutoPrereqs] • Use both if AutoPrereqs doesn’t do what you want.
  • 10. Handling documentation with Pod::Weaver • In dist.ini: [PodWeaver] • Makes Pod sections for NAME, VERSION, AUTHOR, COPYRIGHT AND LICENSE • Gathers things like methods into a METHODS section • In your code: use strict; use warnings; package My::Module; # ABSTRACT: my cool module =head1 SYNOPSIS use My::Module; =method foo =cut # your code goes here 1;
  • 11. Managing version numbers (several plugins) • Putting them in the right places • [PkgVersion] and [OurPkgVersion] • [NextRelease] • [Git::Tag] • Automatically manage numbering • [AutoVersion] • [VersionFromModule] • [Git::NextVersion]
  • 12. Testing • prove -lr t • Runs all tests in t/ using libraries in lib/ • Does not take advantage of Dist::Zilla changes to your code • But it’s fast! • dzil test • Builds a temporary copy and runs its tests • Should do exactly what end-user testing will do • Can be slower since it’s building the distribution first
  • 13. Releasing to CPAN [TestRelease] [ConfirmRelease] [UploadToCPAN] • PAUSE credentials in either ~/.pause or ~/.dzil/config.ini dzil release • For trial (not for automatic update) releases: dzil release --trial
  • 14. Many many more techniques and plugins • Custom profiles for multiple dist.ini and directory layouts • Pod::Weaver plugins for custom sections, encodings, etc. • Integration with Git, GitHub, Twitter, TravisCI, etc. • Automatic generation of web services clients • Building for other package managers like RPM amd Dpkg • Commands and tests for Perl::Tidy, Devel::Cover, Perl::Critic, etc. • Dist::Zilla users often become Dist::Zilla extenders