226
Dist::Zilla raaaaaaaaar!

Dist::Zilla - O'Reilly Mediaassets.en.oreilly.com/1/event/45/Dist__Zilla - Maximum Overkill for... · RJBS-cake and pie (and doughnuts)-cocktails and beer-shooting zombies-giving

  • Upload
    vutram

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

Dist::Zillaraaaaaaaaar!

What is Dist::Zilla?

AWESOME

Any Questions?

RJBS

RJBS- cake and pie (and doughnuts)

RJBS- cake and pie (and doughnuts)

- cocktails and beer

RJBS- cake and pie (and doughnuts)

- cocktails and beer

- shooting zombies

RJBS- cake and pie (and doughnuts)

- cocktails and beer

- shooting zombies

- giving away useful software

CPAN!

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

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

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

ExtUtils::MakeMaker

WriteMakefile( NAME => ‘YourApp’, AUTHOR => ‘You <[email protected]>’, 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, },);

WriteMakefile( NAME => ‘YourApp’, AUTHOR => ‘You <[email protected]>’, 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 => ‘...’ } }) : ()),);

Module::Install

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();

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

Module::Starter

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- updating version numbers

- updating version numbers

- uploading to CPAN

- updating version numbers

- uploading to CPAN

- committing, tagging releases in Git (VCS)

- updating version numbers

- uploading to CPAN

- committing, tagging releases in Git (VCS)

- determine prerequisites

- updating version numbers

- uploading to CPAN

- committing, tagging releases in Git (VCS)

- determine prerequisites

- other stuff that is totally boring

Dist::Zilla isAWESOME

- eating cake and pie (and donuts)

- eating cake and pie (and donuts)

- drinking cocktails and beer

- eating cake and pie (and donuts)

- drinking cocktails and beer

- shooting zombies

- eating cake and pie (and donuts)

- drinking cocktails and beer

- shooting zombies

- giving away useful software

Dist::Zilla isHUGE

106 prereqs

106 prereqs(and counting)

- Dist::Zilla only handles “make dist”

- Dist::Zilla only handles “make dist”

- it doesn’t handle “make install”

- Dist::Zilla only handles “make dist”

- it doesn’t handle “make install”

- only authors need to install the 106 prereqs

- 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

- 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

Dist::Zilla is also Stupid

It keeps its brains in plugins.

dist.ini

# How Dist::Zilla builds a dist:

prepare;gather_files;prune_files;munge_files;register_prereqs;setup_installer;write_files;finish;

name = Your-Distlicense = Perl_5copyright_holder = J. Fred Bloggs

[GatherDir]include_dotfiles = 1

[PruneCruft][MetaYAML][MakeMaker][TestRelease][ConfirmRelease]

[UploadToCPAN]user = JFBpassword = QwardRules

# How Dist::Zilla builds a dist:

prepare;gather_files;prune_files;munge_files;register_prereqs;setup_installer;write_files;finish;

name = Your-Distlicense = Perl_5copyright_holder = J. Fred Bloggs

[GatherDir]include_dotfiles = 1

[PruneCruft][MetaYAML][MakeMaker][TestRelease][ConfirmRelease]

[UploadToCPAN]user = JFBpassword = QwardRules

# How Dist::Zilla builds a dist:

prepare;gather_files;prune_files;munge_files;register_prereqs;setup_installer;write_files;finish;

name = Your-Distlicense = Perl_5copyright_holder = J. Fred Bloggs

[GatherDir]include_dotfiles = 1

[PruneCruft][MetaYAML][MakeMaker][TestRelease][ConfirmRelease]

[UploadToCPAN]user = JFBpassword = QwardRules

# How Dist::Zilla builds a dist:

prepare;gather_files;prune_files;munge_files;register_prereqs;setup_installer;write_files;finish;

name = Your-Distlicense = Perl_5copyright_holder = J. Fred Bloggs

[GatherDir]include_dotfiles = 1

[PruneCruft][MetaYAML][MakeMaker][TestRelease][ConfirmRelease]

[UploadToCPAN]user = JFBpassword = QwardRules

name = Dist-Zillaauthor = Ricardo SIGNES <[email protected]>license = Perl_5copyright_holder = Ricardo SIGNES

[@Basic][AutoPrereq][AutoVersion][PkgVersion][MetaConfig][MetaJSON][NextRelease][PodSyntaxTests][Repository][PodWeaver][@Git]

name = Dist-Zillaauthor = Ricardo SIGNES <[email protected]>license = Perl_5copyright_holder = Ricardo SIGNES

[@Basic][AutoPrereq][AutoVersion][PkgVersion][MetaConfig][MetaJSON][NextRelease][PodSyntaxTests][Repository][PodWeaver][@Git]

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

name = Dist-Zillaauthor = Ricardo SIGNES <[email protected]>license = Perl_5copyright_holder = Ricardo SIGNES

[@Basic][AutoPrereq][AutoVersion][PkgVersion][MetaConfig][MetaJSON][NextRelease][PodSyntaxTests][Repository][PodWeaver][@Git]

Too much!

dzil build

dzil build

dzil test

dzil build

dzil test

dzil install

dzil build

dzil test

dzil install

dzil release

How Dist::Zilla Builds

sub build {

How Dist::Zilla Builds

sub build { my ($self) = @_;

How Dist::Zilla Builds

sub build { my ($self) = @_;

my @files = $self->gather_files;

How Dist::Zilla Builds

sub build { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

How Dist::Zilla Builds

sub build { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

$self->collect_metadata;

How Dist::Zilla Builds

sub build { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

$self->collect_metadata;

$self->write_out( @files );

How Dist::Zilla Builds

sub build { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

$self->collect_metadata;

$self->write_out( @files );}

How Dist::Zilla Builds

How do you pick plugins?

There is no default config.

@Basic

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

The Basics

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

MANIFEST

The Basics

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

MANIFESTMakefile.PL

The Basics

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

MANIFESTMakefile.PL

LICENSE

The Basics

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

MANIFESTMakefile.PL

LICENSEREADME

The Basics

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

MANIFESTMakefile.PL

LICENSEREADME

META.yml

The Basics

Cruft Minimizers

[PkgVersion]

Cruft Minimizers

[PkgVersion][PodSyntaxTests]

Cruft Minimizers

[PkgVersion][PodSyntaxTests][PodCoverageTests]

Cruft Minimizers

[PkgVersion][PodSyntaxTests][PodCoverageTests][AutoPrereq]

Cruft Minimizers

[PkgVersion][PodSyntaxTests][PodCoverageTests][AutoPrereq][AutoVersion]

Cruft Minimizers

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

Cruft Minimizers

[@Git]

[@Subversion]

[@Mercurial]

[@SVK]

Version Control

Pod::Weaver

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 <[email protected]>

=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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 youwill be “accidentally” deathed or dismembered. You have been told.

=cut

1;

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 { ... }

=cut1;

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;

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;

[PodWeaver]

Converting Your Dist

Converting Your Dist

- create dist.ini

Converting Your Dist

- create dist.ini

- remove a bunch of files

Converting Your Dist

- create dist.ini

- remove a bunch of files

- delete a bunch of stuff from leftover files

Converting Your Dist

- create dist.ini

- remove a bunch of files

- delete a bunch of stuff from leftover files

- and Dist::Zooky, too

Questions so far?

Creating New Dists

dzil builddzil testdzil installdzil release

dzil builddzil testdzil installdzil release

dzil new

profile.ini

[GatherDir::Template]

[GatherDir::Template]root = files

[GatherDir::Template]root = files

[DistINI]

[GatherDir::Template]root = files

[DistINI]

[Git::Init]

How Dist::Zilla Mints

sub mint {

How Dist::Zilla Mints

sub mint { my ($self) = @_;

How Dist::Zilla Mints

sub mint { my ($self) = @_;

my @files = $self->gather_files;

How Dist::Zilla Mints

sub mint { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

How Dist::Zilla Mints

sub mint { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

$self->make_module( $module );

How Dist::Zilla Mints

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

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

[GatherDir::Template]

[GatherDir::Template]root = files

[GatherDir::Template]root = files

[DistINI]

[GatherDir::Template]root = files

[DistINI]

[Git::Init]

config.ini

~/.dzil/config.ini

[%User]name = Ricardo Signesemail = [email protected]

[%Rights]license_class = Perl_5copyright_holder = Ricardo Signes

[%PAUSE]username = RJBSpassword = PeasAreDelicious

dzil setup

Minting a New Dist

- create config.ini (in ~/.dzil)

- maybe configure or install a profile

- run dzil new

Questions so far?

Writing Plugins!

Writing Plugins is Easy!

Writing Plugins is Easy!(and awesome)

sub build { my ($self) = @_;

my @files = $self->gather_files;

$self->munge_files( @files );

$self->collect_metadata;

$self->write_out( @files );}

How Dist::Zilla Builds

$self->munge_files( @files );

How Dist::Zilla Builds

my @mungers = grep { $_->does(‘FileMunger’) } $self->plugins;

for my $plugin (@mungers) { $plugin->munge_files( @files );}

How Dist::Zilla Builds

package Some::Class;use Moose;with ‘Some::Role’;

$obj->does( $role )

Roles to Make Plugins Go

BeforeBuild

Roles to Make Plugins Go

BeforeBuildFileGatherer

Roles to Make Plugins Go

BeforeBuildFileGathererFilePruner

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMunger

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSource

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProvider

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProviderAfterBuild

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProviderAfterBuild

BeforeArchive

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProviderAfterBuild

BeforeArchiveBeforeRelease

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProviderAfterBuild

BeforeArchiveBeforeReleaseReleaser

Roles to Make Plugins Go

BeforeBuildFileGathererFilePrunerFileMungerPrereqSourceMetaProviderAfterBuild

BeforeArchiveBeforeReleaseReleaserAfterRelease

Roles to Make Plugins Go

Let’s write a plugin!

BuiltOn

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

BuiltOn

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

BuiltOn

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

BuiltOn

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

sub gather_files {

BuiltOn

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

sub gather_files { my ($self) = @_;

BuiltOn

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

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

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

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

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

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

[BuiltOn]

BuiltOn

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 );}

[BuiltOn]filename = build-host.txt

BuiltOn

[BuiltOn]

BuiltOn

Let’s write a another!

AddShebangs

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

AddShebangs

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

AddShebangs

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

AddShebangs

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

sub munge_file {

AddShebangs

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

sub munge_file { my ($self, $file) = @_;

AddShebangs

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

sub munge_file { my ($self, $file) = @_; next unless $file->name =~ /\.pl$/;

AddShebangs

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

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

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

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

AddBlame

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

AddBlame

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

AddBlame

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

AddBlame

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

sub munge_file {

AddBlame

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

sub munge_file { my ($self, $file) = @_;

AddBlame

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

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

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

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

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

[GatherDir][PruneCruft]

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

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

print “Hello.\n”;

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

#!/usr/bin/perlprint “Hello.\n”;

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

# built by rjbs#!/usr/bin/perlprint “Hello.\n”;

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

#!/usr/bin/perl# built by rjbsprint “Hello.\n”;

In Conclusion...

Dist::Zilla is..?

Dist::Zilla is:

- judges will accept:

- awesome

- huge

- stupid

We are Friendly

- irc.perl.org #distzilla

- http://dzil.org/

- mailing list

- http://rt.cpan.org/

Any Questions?

Thank you!raaaaaaaaar!