Slide 1

Slide 1 text

Dist::Zilla raaaaaaaaar!

Slide 2

Slide 2 text

What is Dist::Zilla?

Slide 3

Slide 3 text

AWESOME

Slide 4

Slide 4 text

Any Questions?

Slide 5

Slide 5 text

RJBS

Slide 6

Slide 6 text

RJBS - cake and pie (and doughnuts)

Slide 7

Slide 7 text

RJBS - cake and pie (and doughnuts) - cocktails and beer

Slide 8

Slide 8 text

RJBS - cake and pie (and doughnuts) - cocktails and beer - shooting zombies

Slide 9

Slide 9 text

RJBS - cake and pie (and doughnuts) - cocktails and beer - shooting zombies - giving away useful software

Slide 10

Slide 10 text

CPAN!

Slide 11

Slide 11 text

being a CPAN author is hard! let’s go gemming!

Slide 12

Slide 12 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 13

Slide 13 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 14

Slide 14 text

ExtUtils::MakeMaker

Slide 15

Slide 15 text

WriteMakefile( NAME => ‘YourApp’, AUTHOR => ‘You ’, VERSION_FROM => ‘lib/YourApp.pm’, ABSTRACT_FROM => ‘lib/YourApp.pm’, LICENSE => ‘perl’, PREREQ_PM => { ‘Lingua::EN::Inflect’ => 1.86, ‘Sub::Override’ => 0.07, ‘Test::More’ => 0, }, );

Slide 16

Slide 16 text

WriteMakefile( NAME => ‘YourApp’, AUTHOR => ‘You ’, VERSION_FROM => ‘lib/YourApp.pm’, ABSTRACT_FROM => ‘lib/YourApp.pm’, LICENSE => ‘perl’, PREREQ_PM => { ‘Lingua::EN::Inflect’ => 1.86, ‘Sub::Override’ => 0.07, ‘Test::More’ => 0, }, (eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (META_MERGE => { resources => { Repository => ‘...’ } }) : ()), );

Slide 17

Slide 17 text

Module::Install

Slide 18

Slide 18 text

use inc::Module::Install; all_from(‘lib/YourApp.pm’); requires(‘Lingua::EN::Inflect’ => 1.86); requires(‘Sub::Override’ => 0.07); requires(‘Test::More’ => 0); repository(...); WriteAll();

Slide 19

Slide 19 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 20

Slide 20 text

Module::Starter

Slide 21

Slide 21 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/boilerplate.t ./t/pod-coverage.t ./t/pod.t

Slide 22

Slide 22 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/boilerplate.t ./t/pod-coverage.t ./t/pod.t

Slide 23

Slide 23 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 24

Slide 24 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 25

Slide 25 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE

Slide 26

Slide 26 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP

Slide 27

Slide 27 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL

Slide 28

Slide 28 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README

Slide 29

Slide 29 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm

Slide 30

Slide 30 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm

Slide 31

Slide 31 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm

Slide 32

Slide 32 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm

Slide 33

Slide 33 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t

Slide 34

Slide 34 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t

Slide 35

Slide 35 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 36

Slide 36 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t

Slide 37

Slide 37 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./Changes

Slide 38

Slide 38 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./Changes ./lib/YourApp.pm

Slide 39

Slide 39 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./Changes ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm

Slide 40

Slide 40 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./Changes ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm

Slide 41

Slide 41 text

./Changes ./LICENSE ./MANIFEST.SKIP ./Makefile.PL ./README ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm ./t/unit-tests.t ./t/pod-coverage.t ./t/pod.t ./Changes ./lib/YourApp.pm ./lib/YourApp/Reticulator.pm ./lib/YourApp/Util/mtfnpy.pm ./lib/YourApp/Xyzzy.pm

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

- updating version numbers

Slide 44

Slide 44 text

- updating version numbers - uploading to CPAN

Slide 45

Slide 45 text

- updating version numbers - uploading to CPAN - committing, tagging releases in Git (VCS)

Slide 46

Slide 46 text

- updating version numbers - uploading to CPAN - committing, tagging releases in Git (VCS) - determine prerequisites

Slide 47

Slide 47 text

- updating version numbers - uploading to CPAN - committing, tagging releases in Git (VCS) - determine prerequisites - other stuff that is totally boring

Slide 48

Slide 48 text

Dist::Zilla is AWESOME

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

- eating cake and pie (and donuts)

Slide 51

Slide 51 text

- eating cake and pie (and donuts) - drinking cocktails and beer

Slide 52

Slide 52 text

- eating cake and pie (and donuts) - drinking cocktails and beer - shooting zombies

Slide 53

Slide 53 text

- eating cake and pie (and donuts) - drinking cocktails and beer - shooting zombies - giving away useful software

Slide 54

Slide 54 text

Dist::Zilla is HUGE

Slide 55

Slide 55 text

106 prereqs

Slide 56

Slide 56 text

106 prereqs (and counting)

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

- Dist::Zilla only handles “make dist”

Slide 59

Slide 59 text

- Dist::Zilla only handles “make dist” - it doesn’t handle “make install”

Slide 60

Slide 60 text

- Dist::Zilla only handles “make dist” - it doesn’t handle “make install” - only authors need to install the 106 prereqs

Slide 61

Slide 61 text

- Dist::Zilla only handles “make dist” - it doesn’t handle “make install” - only authors need to install the 106 prereqs - your users don’t see Dist::Zilla

Slide 62

Slide 62 text

- Dist::Zilla only handles “make dist” - it doesn’t handle “make install” - only authors need to install the 106 prereqs - your users don’t see Dist::Zilla - they just see MakeMaker or Module::Build

Slide 63

Slide 63 text

Dist::Zilla is also Stupid

Slide 64

Slide 64 text

It keeps its brains in plugins.

Slide 65

Slide 65 text

dist.ini

Slide 66

Slide 66 text

# How Dist::Zilla builds a dist: prepare; gather_files; prune_files; munge_files; register_prereqs; setup_installer; write_files; finish; name = Your-Dist license = Perl_5 copyright_holder = J. Fred Bloggs [GatherDir] include_dotfiles = 1 [PruneCruft] [MetaYAML] [MakeMaker] [TestRelease] [ConfirmRelease] [UploadToCPAN] user = JFB password = QwardRules

Slide 67

Slide 67 text

# How Dist::Zilla builds a dist: prepare; gather_files; prune_files; munge_files; register_prereqs; setup_installer; write_files; finish; name = Your-Dist license = Perl_5 copyright_holder = J. Fred Bloggs [GatherDir] include_dotfiles = 1 [PruneCruft] [MetaYAML] [MakeMaker] [TestRelease] [ConfirmRelease] [UploadToCPAN] user = JFB password = QwardRules

Slide 68

Slide 68 text

# How Dist::Zilla builds a dist: prepare; gather_files; prune_files; munge_files; register_prereqs; setup_installer; write_files; finish; name = Your-Dist license = Perl_5 copyright_holder = J. Fred Bloggs [GatherDir] include_dotfiles = 1 [PruneCruft] [MetaYAML] [MakeMaker] [TestRelease] [ConfirmRelease] [UploadToCPAN] user = JFB password = QwardRules

Slide 69

Slide 69 text

# How Dist::Zilla builds a dist: prepare; gather_files; prune_files; munge_files; register_prereqs; setup_installer; write_files; finish; name = Your-Dist license = Perl_5 copyright_holder = J. Fred Bloggs [GatherDir] include_dotfiles = 1 [PruneCruft] [MetaYAML] [MakeMaker] [TestRelease] [ConfirmRelease] [UploadToCPAN] user = JFB password = QwardRules

Slide 70

Slide 70 text

name = Dist-Zilla author = Ricardo SIGNES license = Perl_5 copyright_holder = Ricardo SIGNES [@Basic] [AutoPrereq] [AutoVersion] [PkgVersion] [MetaConfig] [MetaJSON] [NextRelease] [PodSyntaxTests] [Repository] [PodWeaver] [@Git]

Slide 71

Slide 71 text

name = Dist-Zilla author = Ricardo SIGNES license = Perl_5 copyright_holder = Ricardo SIGNES [@Basic] [AutoPrereq] [AutoVersion] [PkgVersion] [MetaConfig] [MetaJSON] [NextRelease] [PodSyntaxTests] [Repository] [PodWeaver] [@Git]

Slide 72

Slide 72 text

[GatherDir] [PruneCruft] [ManifestSkip] [MetaYAML] [License] [Readme] [ExtraTests] [ExecDir] [ShareDir] [MakeMaker] [Manifest] [TestRelease] [ConfirmRelease] [UploadToCPAN]

Slide 73

Slide 73 text

name = Dist-Zilla author = Ricardo SIGNES license = Perl_5 copyright_holder = Ricardo SIGNES [@Basic] [AutoPrereq] [AutoVersion] [PkgVersion] [MetaConfig] [MetaJSON] [NextRelease] [PodSyntaxTests] [Repository] [PodWeaver] [@Git]

Slide 74

Slide 74 text

Too much!

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

dzil build

Slide 77

Slide 77 text

dzil build dzil test

Slide 78

Slide 78 text

dzil build dzil test dzil install

Slide 79

Slide 79 text

dzil build dzil test dzil install dzil release

Slide 80

Slide 80 text

How Dist::Zilla Builds

Slide 81

Slide 81 text

sub build { How Dist::Zilla Builds

Slide 82

Slide 82 text

sub build { my ($self) = @_; How Dist::Zilla Builds

Slide 83

Slide 83 text

sub build { my ($self) = @_; my @files = $self->gather_files; How Dist::Zilla Builds

Slide 84

Slide 84 text

sub build { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); How Dist::Zilla Builds

Slide 85

Slide 85 text

sub build { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->collect_metadata; How Dist::Zilla Builds

Slide 86

Slide 86 text

sub build { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->collect_metadata; $self->write_out( @files ); How Dist::Zilla Builds

Slide 87

Slide 87 text

sub build { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->collect_metadata; $self->write_out( @files ); } How Dist::Zilla Builds

Slide 88

Slide 88 text

How do you pick plugins?

Slide 89

Slide 89 text

There is no default config.

Slide 90

Slide 90 text

@Basic

Slide 91

Slide 91 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] The Basics

Slide 92

Slide 92 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] MANIFEST The Basics

Slide 93

Slide 93 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] MANIFEST Makefile.PL The Basics

Slide 94

Slide 94 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] MANIFEST Makefile.PL LICENSE The Basics

Slide 95

Slide 95 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] MANIFEST Makefile.PL LICENSE README The Basics

Slide 96

Slide 96 text

[GatherDir] [PruneCruft] [Manifest] [ManifestSkip] [MakeMaker] [License] [Readme] [MetaYAML] [ExtraTests] [ExecDir] [ShareDir] [TestRelease] [ConfirmRelease] [UploadToCPAN] MANIFEST Makefile.PL LICENSE README META.yml The Basics

Slide 97

Slide 97 text

Cruft Minimizers

Slide 98

Slide 98 text

[PkgVersion] Cruft Minimizers

Slide 99

Slide 99 text

[PkgVersion] [PodSyntaxTests] Cruft Minimizers

Slide 100

Slide 100 text

[PkgVersion] [PodSyntaxTests] [PodCoverageTests] Cruft Minimizers

Slide 101

Slide 101 text

[PkgVersion] [PodSyntaxTests] [PodCoverageTests] [AutoPrereq] Cruft Minimizers

Slide 102

Slide 102 text

[PkgVersion] [PodSyntaxTests] [PodCoverageTests] [AutoPrereq] [AutoVersion] Cruft Minimizers

Slide 103

Slide 103 text

[PkgVersion] [PodSyntaxTests] [PodCoverageTests] [AutoPrereq] [AutoVersion] [NextRelease] Cruft Minimizers

Slide 104

Slide 104 text

[@Git] [@Subversion] [@Mercurial] [@SVK] Version Control

Slide 105

Slide 105 text

Pod::Weaver

Slide 106

Slide 106 text

package YourApp; =head1 NAME YourApp - my awesome app =head1 VERSION version 1.001 =cut our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 107

Slide 107 text

package YourApp; =head1 NAME YourApp - my awesome app =head1 VERSION version 1.001 =cut our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 108

Slide 108 text

package YourApp; =head1 NAME YourApp - my awesome app =head1 VERSION version 1.001 =cut our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 109

Slide 109 text

package YourApp; # ABSTRACT: my awesome app =head1 VERSION version 1.001 =cut our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 110

Slide 110 text

package YourApp; # ABSTRACT: my awesome app =head1 VERSION version 1.001 =cut our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 111

Slide 111 text

package YourApp; # ABSTRACT: my awesome app our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 112

Slide 112 text

package YourApp; # ABSTRACT: my awesome app our $VERSION = 0.001; =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 113

Slide 113 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =head1 METHODS =head2 this_method This method does stuff. =cut method this_method { ... } =head2 that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 114

Slide 114 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 115

Slide 115 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } =head1 AUTHOR Margo Yapp =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 116

Slide 116 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 117

Slide 117 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. method that_method { ... } =head1 LICENSE Copyright (C) 2008, Margo Yapp. This is distributed under the terms of the accidental death and dismemberment license and if you redistribuet this document you will be “accidentally” deathed or dismembered. You have been told. =cut 1;

Slide 118

Slide 118 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } =cut 1;

Slide 119

Slide 119 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } 1;

Slide 120

Slide 120 text

package YourApp; # ABSTRACT: my awesome app =head1 DESCRIPTION This app is awesome. =method this_method This method does stuff. =cut method this_method { ... } =method that_method Also stuff. =cut method that_method { ... } 1;

Slide 121

Slide 121 text

[PodWeaver]

Slide 122

Slide 122 text

Converting Your Dist

Slide 123

Slide 123 text

Converting Your Dist - create dist.ini

Slide 124

Slide 124 text

Converting Your Dist - create dist.ini - remove a bunch of files

Slide 125

Slide 125 text

Converting Your Dist - create dist.ini - remove a bunch of files - delete a bunch of stuff from leftover files

Slide 126

Slide 126 text

Converting Your Dist - create dist.ini - remove a bunch of files - delete a bunch of stuff from leftover files - and Dist::Zooky, too

Slide 127

Slide 127 text

Questions so far?

Slide 128

Slide 128 text

Creating New Dists

Slide 129

Slide 129 text

dzil build dzil test dzil install dzil release

Slide 130

Slide 130 text

dzil build dzil test dzil install dzil release dzil new

Slide 131

Slide 131 text

profile.ini

Slide 132

Slide 132 text

No content

Slide 133

Slide 133 text

[GatherDir::Template]

Slide 134

Slide 134 text

[GatherDir::Template] root = files

Slide 135

Slide 135 text

[GatherDir::Template] root = files [DistINI]

Slide 136

Slide 136 text

[GatherDir::Template] root = files [DistINI] [Git::Init]

Slide 137

Slide 137 text

How Dist::Zilla Mints

Slide 138

Slide 138 text

sub mint { How Dist::Zilla Mints

Slide 139

Slide 139 text

sub mint { my ($self) = @_; How Dist::Zilla Mints

Slide 140

Slide 140 text

sub mint { my ($self) = @_; my @files = $self->gather_files; How Dist::Zilla Mints

Slide 141

Slide 141 text

sub mint { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); How Dist::Zilla Mints

Slide 142

Slide 142 text

sub mint { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->make_module( $module ); How Dist::Zilla Mints

Slide 143

Slide 143 text

sub mint { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->make_module( $module ); $self->write_out( @files ); How Dist::Zilla Mints

Slide 144

Slide 144 text

sub mint { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->make_module( $module ); $self->write_out( @files ); } How Dist::Zilla Mints

Slide 145

Slide 145 text

No content

Slide 146

Slide 146 text

[GatherDir::Template]

Slide 147

Slide 147 text

[GatherDir::Template] root = files

Slide 148

Slide 148 text

[GatherDir::Template] root = files [DistINI]

Slide 149

Slide 149 text

[GatherDir::Template] root = files [DistINI] [Git::Init]

Slide 150

Slide 150 text

config.ini

Slide 151

Slide 151 text

~/.dzil/config.ini

Slide 152

Slide 152 text

[%User] name = Ricardo Signes email = [email protected] [%Rights] license_class = Perl_5 copyright_holder = Ricardo Signes [%PAUSE] username = RJBS password = PeasAreDelicious

Slide 153

Slide 153 text

dzil setup

Slide 154

Slide 154 text

Minting a New Dist - create config.ini (in ~/.dzil) - maybe configure or install a profile - run dzil new

Slide 155

Slide 155 text

Questions so far?

Slide 156

Slide 156 text

Writing Plugins!

Slide 157

Slide 157 text

Writing Plugins is Easy!

Slide 158

Slide 158 text

Writing Plugins is Easy! (and awesome)

Slide 159

Slide 159 text

sub build { my ($self) = @_; my @files = $self->gather_files; $self->munge_files( @files ); $self->collect_metadata; $self->write_out( @files ); } How Dist::Zilla Builds

Slide 160

Slide 160 text

$self->munge_files( @files ); How Dist::Zilla Builds

Slide 161

Slide 161 text

my @mungers = grep { $_->does(‘FileMunger’) } $self->plugins; for my $plugin (@mungers) { $plugin->munge_files( @files ); } How Dist::Zilla Builds

Slide 162

Slide 162 text

package Some::Class; use Moose; with ‘Some::Role’; $obj->does( $role )

Slide 163

Slide 163 text

Roles to Make Plugins Go

Slide 164

Slide 164 text

BeforeBuild Roles to Make Plugins Go

Slide 165

Slide 165 text

BeforeBuild FileGatherer Roles to Make Plugins Go

Slide 166

Slide 166 text

BeforeBuild FileGatherer FilePruner Roles to Make Plugins Go

Slide 167

Slide 167 text

BeforeBuild FileGatherer FilePruner FileMunger Roles to Make Plugins Go

Slide 168

Slide 168 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource Roles to Make Plugins Go

Slide 169

Slide 169 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider Roles to Make Plugins Go

Slide 170

Slide 170 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider AfterBuild Roles to Make Plugins Go

Slide 171

Slide 171 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider AfterBuild BeforeArchive Roles to Make Plugins Go

Slide 172

Slide 172 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider AfterBuild BeforeArchive BeforeRelease Roles to Make Plugins Go

Slide 173

Slide 173 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider AfterBuild BeforeArchive BeforeRelease Releaser Roles to Make Plugins Go

Slide 174

Slide 174 text

BeforeBuild FileGatherer FilePruner FileMunger PrereqSource MetaProvider AfterBuild BeforeArchive BeforeRelease Releaser AfterRelease Roles to Make Plugins Go

Slide 175

Slide 175 text

Let’s write a plugin!

Slide 176

Slide 176 text

BuiltOn

Slide 177

Slide 177 text

package Dist::Zilla::Plugin::BuiltOn; BuiltOn

Slide 178

Slide 178 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; BuiltOn

Slide 179

Slide 179 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; BuiltOn

Slide 180

Slide 180 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { BuiltOn

Slide 181

Slide 181 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; BuiltOn

Slide 182

Slide 182 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ BuiltOn

Slide 183

Slide 183 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => ‘built-on.txt’, BuiltOn

Slide 184

Slide 184 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => ‘built-on.txt’, content => scalar `uname -a`, BuiltOn

Slide 185

Slide 185 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => ‘built-on.txt’, content => scalar `uname -a`, }); BuiltOn

Slide 186

Slide 186 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => ‘built-on.txt’, content => scalar `uname -a`, }); $self->add_file( $file ); BuiltOn

Slide 187

Slide 187 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => ‘built-on.txt’, content => scalar `uname -a`, }); $self->add_file( $file ); } BuiltOn

Slide 188

Slide 188 text

[BuiltOn] BuiltOn

Slide 189

Slide 189 text

package Dist::Zilla::Plugin::BuiltOn; use Moose; with ‘Dist::Zilla::Role::FileGatherer’; has filename => ( is => ‘ro’, default => ‘built-on.txt’, ); sub gather_files { my ($self) = @_; my $file = Dist::Zilla::File::InMemory->new({ name => $self->filename, content => scalar `uname -a`, }); $self->add_file( $file ); }

Slide 190

Slide 190 text

[BuiltOn] filename = build-host.txt BuiltOn

Slide 191

Slide 191 text

[BuiltOn] BuiltOn

Slide 192

Slide 192 text

Let’s write a another!

Slide 193

Slide 193 text

AddShebangs

Slide 194

Slide 194 text

package Dist::Zilla::Plugin::AddShebangs; AddShebangs

Slide 195

Slide 195 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; AddShebangs

Slide 196

Slide 196 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; AddShebangs

Slide 197

Slide 197 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { AddShebangs

Slide 198

Slide 198 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; AddShebangs

Slide 199

Slide 199 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/; AddShebangs

Slide 200

Slide 200 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/; my $content = “#!$^X\n” AddShebangs

Slide 201

Slide 201 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/; my $content = “#!$^X\n” . $file->content; AddShebangs

Slide 202

Slide 202 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/; my $content = “#!$^X\n” . $file->content; $file->content( $content ); AddShebangs

Slide 203

Slide 203 text

package Dist::Zilla::Plugin::AddShebangs; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/; my $content = “#!$^X\n” . $file->content; $file->content( $content ); } AddShebangs

Slide 204

Slide 204 text

AddBlame

Slide 205

Slide 205 text

package Dist::Zilla::Plugin::AddBlame; AddBlame

Slide 206

Slide 206 text

package Dist::Zilla::Plugin::AddBlame; use Moose; AddBlame

Slide 207

Slide 207 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; AddBlame

Slide 208

Slide 208 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { AddBlame

Slide 209

Slide 209 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; AddBlame

Slide 210

Slide 210 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.p[lm]$/; AddBlame

Slide 211

Slide 211 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.p[lm]$/; my $content = “# BUILD BY $ENV{USER}\n” AddBlame

Slide 212

Slide 212 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.p[lm]$/; my $content = “# BUILD BY $ENV{USER}\n” . $file->content; AddBlame

Slide 213

Slide 213 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.p[lm]$/; my $content = “# BUILD BY $ENV{USER}\n” . $file->content; $file->content( $content ); AddBlame

Slide 214

Slide 214 text

package Dist::Zilla::Plugin::AddBlame; use Moose; with ‘Dist::Zilla::Role::FileMunger’; sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.p[lm]$/; my $content = “# BUILD BY $ENV{USER}\n” . $file->content; $file->content( $content ); } AddBlame

Slide 215

Slide 215 text

[GatherDir] [PruneCruft]

Slide 216

Slide 216 text

[GatherDir] [PruneCruft] [AddShebangs] [AddBlame]

Slide 217

Slide 217 text

[GatherDir] [PruneCruft] [AddShebangs] [AddBlame] print “Hello.\n”;

Slide 218

Slide 218 text

[GatherDir] [PruneCruft] [AddShebangs] [AddBlame] #!/usr/bin/perl print “Hello.\n”;

Slide 219

Slide 219 text

[GatherDir] [PruneCruft] [AddShebangs] [AddBlame] # built by rjbs #!/usr/bin/perl print “Hello.\n”;

Slide 220

Slide 220 text

[GatherDir] [PruneCruft] [AddBlame] [AddShebangs] #!/usr/bin/perl # built by rjbs print “Hello.\n”;

Slide 221

Slide 221 text

In Conclusion...

Slide 222

Slide 222 text

Dist::Zilla is..?

Slide 223

Slide 223 text

Dist::Zilla is: - judges will accept: - awesome - huge - stupid

Slide 224

Slide 224 text

We are Friendly - irc.perl.org #distzilla - http://dzil.org/ - mailing list - http://rt.cpan.org/

Slide 225

Slide 225 text

Any Questions?

Slide 226

Slide 226 text

Thank you! raaaaaaaaar!