SlideShare a Scribd company logo
1 of 20
Download to read offline
Dist::Zilla 
A very brief introduction 
Dean Hamstead 
dean@bytefoundry.com.au
Or
How I Learned to Stop Worrying 
and Love CPAN Authoring
Whats coming up... 
(High level stuff only) 
What Dist::Zilla is 
What Dist::Zilla does 
Some links 
Play about on the CLI 
Questions I probably won’t be able to answer 
End
So what is it?
"Dist::Zilla is a tool for packaging code to 
release to the CPAN. 
The central notion of Dzil is that 
no programmer should ever have to waste 
his or her precious time on boring things 
like README files, prerequisite accounting, 
duplicated license statements, or anything 
else other than solving real problems." 
-Ricardo Signes aka rjbs
It’s a framework for releasing perl code. 
Because functionality is via plugins - people can easily add new features, 
making it more increasingly useful. 
We know that it scratched an itch well, 
because numerous clones have appeared taking 
different approaches. 
YMMV, but authoring is fun again!
For users of your Perl modules, nothing changes. 
They still use Build.PL or Makefile.PL etc. 
Dist::Zilla generates all these bits and pieces, 
but isn’t actually used at the consumer end.
It does stuff like... 
Generates Makefile.PL and/or Build.PL 
Generates all manner of boring meta files 
Generates all sorts of boring test suites 
Inserts version numbers and contact details 
Prunes away cruft 
Runs the aforementioned tests 
Tar’s things up 
Uploads to PAUSE 
Plays around with git 
Can even Tweet out the release 
Whatever options you select
PAUSE is sufficiently annoying to justify 
a tool that hide’s it. 
So is keeping up with all the meta files 
(META.{yml,json}, cpanfile etc). 
Now I barely notice. Thanks rjbs!
Used with git (Github in particular) its very quick to 
include then publish contributions that kind people might send 
you. 
Tying in perltidy and perlcritic makes it easier still. 
Contributors feel welcome and get a 
sense of satisfaction when a new release includes their work. 
You get free bugfix’s and features you 
never thought of!
Heres one I prepared earlier... 
NetAddr::MAC on CPAN
# cat dist.ini 
name = NetAddr-MAC 
version = 0.84 
author = Dean Hamstead <dean@bytefoundry.com.au> 
license = Perl_5 
copyright_holder = Dean Hamstad 
copyright_year = 2013 
[GatherDir] 
[MetaYAML] 
[MetaJSON] 
[MetaTests] 
[Manifest] 
[ManifestSkip] 
[PruneCruft] 
[License] 
[MakeMaker] 
(cont...)
[ExtraTests] 
[CPANFile] 
[Test::Perl::Critic] 
critic_config = t/.perlcriticrc 
[Test::Kwalitee] 
[Test::EOL] 
[PodCoverageTests] 
[PodSyntaxTests] 
[TestRelease] 
[ConfirmRelease] 
[UploadToCPAN] 
[ExecDir] 
[Prereqs] 
Carp = 0 
List::Util = 0 
strict = 0 
warnings = 0 
constant = 0 
vars = 0 
base = 0 
Exporter = 0 
perl = 5.004 
[Prereqs / BuildRequires] 
Test::Trap = 0
As promised, here are some links: 
http://dzil.org/ 
Tutorial http://dzil.org/tutorial/start.html 
Fork it on GitHub https://github.com/rjbs/Dist-Zilla 
Step by Step conversion 
http://www.perl.com/pub/2010/03/more-code-less-cruft-managing-distributions-"Why I am using Dist::Zilla" 
http://www.dagolden.com/index.php/752/why-im-using-distzilla/ 
Fair and Balanced, "Why I Hate Dist::Zilla" 
http://www.perlmonks.org/?node_id=903657
I’m sold! 
How do install Dist::Zilla?
Debian and friends: 
# apt-get install libdist-zilla-perl 
(Debian is a little thin on plugins, use dh-make-perl to package more up) 
Fedora, RedHat and CentOS: 
# install debian 
(Thats my little joke) 
Using perlbrew: 
# cpanm Dist::Zilla
dean@cliffjumper:~/git/github/NetAddr-MAC$ dzil 
Available commands: 
commands: list the application’s commands 
help: display a command’s help screen 
add: add modules to an existing dist 
authordeps: list your distribution’s author dependencies 
build: build your dist 
clean: clean up after build, test, or install 
install: install your dist 
listdeps: print your distribution’s prerequisites 
new: mint a new dist 
nop: do nothing: initialize dzil, then exit 
release: release your dist 
run: run stuff in a dir where your dist is built 
setup: set up a basic global config file 
smoke: smoke your dist 
test: test your dist
Questions?
Ende

More Related Content

What's hot

Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last time
Andreas Jung
 

What's hot (20)

Asynchronous I/O in Python 3
Asynchronous I/O in Python 3Asynchronous I/O in Python 3
Asynchronous I/O in Python 3
 
Taming the resource tiger
Taming the resource tigerTaming the resource tiger
Taming the resource tiger
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020
 
Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last time
 
Auto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleAuto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag Style
 
Using Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled WorldUsing Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled World
 
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
 
CPAN Training
CPAN TrainingCPAN Training
CPAN Training
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
Perl in Teh Cloud
Perl in Teh CloudPerl in Teh Cloud
Perl in Teh Cloud
 
Building a Network IP Camera using Erlang
Building a Network IP Camera using ErlangBuilding a Network IP Camera using Erlang
Building a Network IP Camera using Erlang
 
Php extensions
Php extensionsPhp extensions
Php extensions
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBots
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
 
Perl-Critic
Perl-CriticPerl-Critic
Perl-Critic
 

Viewers also liked (7)

Have more fun with Perl via Questhub
Have more fun with Perl via QuesthubHave more fun with Perl via Questhub
Have more fun with Perl via Questhub
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
 
Hank Torbert Avondale Ventures
Hank Torbert Avondale VenturesHank Torbert Avondale Ventures
Hank Torbert Avondale Ventures
 
Getting started with Pod::Weaver
Getting started with Pod::WeaverGetting started with Pod::Weaver
Getting started with Pod::Weaver
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Co-teaching can be wonderful !
Co-teaching can be wonderful !Co-teaching can be wonderful !
Co-teaching can be wonderful !
 
Hank torbert
Hank torbertHank torbert
Hank torbert
 

Similar to Dist::Zilla - A very brief introduction

Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)
Cameron Eagans
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howto
Ding Zhou
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 

Similar to Dist::Zilla - A very brief introduction (20)

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howto
 
Cfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymoreCfgmgmt Challenges aren't technical anymore
Cfgmgmt Challenges aren't technical anymore
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
 
Automated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and CapistranoAutomated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and Capistrano
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Authoring CPAN modules
Authoring CPAN modulesAuthoring CPAN modules
Authoring CPAN modules
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon Otto
 
Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshop
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
Collaboration With Git and GitHub
Collaboration With Git and GitHubCollaboration With Git and GitHub
Collaboration With Git and GitHub
 
Ganeti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made SimpleGaneti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made Simple
 
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
 
Drupalhagen 2014 kiss omg ftw
Drupalhagen 2014   kiss omg ftwDrupalhagen 2014   kiss omg ftw
Drupalhagen 2014 kiss omg ftw
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
Infrastructure as code might be literally impossible / Joe Domato (packageclo...Infrastructure as code might be literally impossible / Joe Domato (packageclo...
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Dist::Zilla - A very brief introduction

  • 1. Dist::Zilla A very brief introduction Dean Hamstead dean@bytefoundry.com.au
  • 2. Or
  • 3. How I Learned to Stop Worrying and Love CPAN Authoring
  • 4. Whats coming up... (High level stuff only) What Dist::Zilla is What Dist::Zilla does Some links Play about on the CLI Questions I probably won’t be able to answer End
  • 6. "Dist::Zilla is a tool for packaging code to release to the CPAN. The central notion of Dzil is that no programmer should ever have to waste his or her precious time on boring things like README files, prerequisite accounting, duplicated license statements, or anything else other than solving real problems." -Ricardo Signes aka rjbs
  • 7. It’s a framework for releasing perl code. Because functionality is via plugins - people can easily add new features, making it more increasingly useful. We know that it scratched an itch well, because numerous clones have appeared taking different approaches. YMMV, but authoring is fun again!
  • 8. For users of your Perl modules, nothing changes. They still use Build.PL or Makefile.PL etc. Dist::Zilla generates all these bits and pieces, but isn’t actually used at the consumer end.
  • 9. It does stuff like... Generates Makefile.PL and/or Build.PL Generates all manner of boring meta files Generates all sorts of boring test suites Inserts version numbers and contact details Prunes away cruft Runs the aforementioned tests Tar’s things up Uploads to PAUSE Plays around with git Can even Tweet out the release Whatever options you select
  • 10. PAUSE is sufficiently annoying to justify a tool that hide’s it. So is keeping up with all the meta files (META.{yml,json}, cpanfile etc). Now I barely notice. Thanks rjbs!
  • 11. Used with git (Github in particular) its very quick to include then publish contributions that kind people might send you. Tying in perltidy and perlcritic makes it easier still. Contributors feel welcome and get a sense of satisfaction when a new release includes their work. You get free bugfix’s and features you never thought of!
  • 12. Heres one I prepared earlier... NetAddr::MAC on CPAN
  • 13. # cat dist.ini name = NetAddr-MAC version = 0.84 author = Dean Hamstead <dean@bytefoundry.com.au> license = Perl_5 copyright_holder = Dean Hamstad copyright_year = 2013 [GatherDir] [MetaYAML] [MetaJSON] [MetaTests] [Manifest] [ManifestSkip] [PruneCruft] [License] [MakeMaker] (cont...)
  • 14. [ExtraTests] [CPANFile] [Test::Perl::Critic] critic_config = t/.perlcriticrc [Test::Kwalitee] [Test::EOL] [PodCoverageTests] [PodSyntaxTests] [TestRelease] [ConfirmRelease] [UploadToCPAN] [ExecDir] [Prereqs] Carp = 0 List::Util = 0 strict = 0 warnings = 0 constant = 0 vars = 0 base = 0 Exporter = 0 perl = 5.004 [Prereqs / BuildRequires] Test::Trap = 0
  • 15. As promised, here are some links: http://dzil.org/ Tutorial http://dzil.org/tutorial/start.html Fork it on GitHub https://github.com/rjbs/Dist-Zilla Step by Step conversion http://www.perl.com/pub/2010/03/more-code-less-cruft-managing-distributions-"Why I am using Dist::Zilla" http://www.dagolden.com/index.php/752/why-im-using-distzilla/ Fair and Balanced, "Why I Hate Dist::Zilla" http://www.perlmonks.org/?node_id=903657
  • 16. I’m sold! How do install Dist::Zilla?
  • 17. Debian and friends: # apt-get install libdist-zilla-perl (Debian is a little thin on plugins, use dh-make-perl to package more up) Fedora, RedHat and CentOS: # install debian (Thats my little joke) Using perlbrew: # cpanm Dist::Zilla
  • 18. dean@cliffjumper:~/git/github/NetAddr-MAC$ dzil Available commands: commands: list the application’s commands help: display a command’s help screen add: add modules to an existing dist authordeps: list your distribution’s author dependencies build: build your dist clean: clean up after build, test, or install install: install your dist listdeps: print your distribution’s prerequisites new: mint a new dist nop: do nothing: initialize dzil, then exit release: release your dist run: run stuff in a dir where your dist is built setup: set up a basic global config file smoke: smoke your dist test: test your dist
  • 20. Ende