Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DistZilla from one newb to another

Jade Allen
February 09, 2012

DistZilla from one newb to another

DistZilla is a powerful Perl tool to automate a lot of the drudgery that goes into getting a library of code ready to share on CPAN. Although DistZilla is very powerful, it has a steep learning curve and some sharp corners.

This talk is aimed at helping new DistZilla users get up to speed quickly.

Jade Allen

February 09, 2012
Tweet

More Decks by Jade Allen

Other Decks in Programming

Transcript

  1. DistZilla! From one newb to another! ! ! Mark Allen!

    [email protected]! @bytemeorg! http://byte-me.org! https://github.com/mrallen1! https://metacpan.org/author/MALLEN!
  2. Step 1: Setup! # ~/.dzil/config.ini [%User] name = Mark Allen

    email = [email protected] [%Rights] license_class = Perl_5 copyright_holder = Mark Allen
  3. Step 2: "Minting"! $ dzil new My-Thingy [DZ] making target

    dir /private/tmp/My-Thingy [DZ] writing files to /private/tmp/My-Thingy [DZ] dist minted in ./My-Thingy
  4. Step 2: "Minting"! # My-Thingy/dist.ini name = My-Thingy author =

    Mark Allen <[email protected]> license = Perl_5 copyright_holder = Mark Allen copyright_year = 2012 version = 0.001 [@Basic]
  5. Step 2: "Minting"! # My-Thingy/dist.ini name = My-Thingy author =

    Mark Allen <[email protected]> license = Perl_5 copyright_holder = Mark Allen copyright_year = 2012 version = 0.001 [@Basic] # <- What is that?!
  6. Step 2: "Minting"! Other options:! •  Run git init • 

    Make a Github repo! •  "Better" initial module file(s)! •  sudo make-me-a-sandwich
  7. Step 3: Pod munging! =over =item * frobulate This attribute

    indicates whether anything should be frobulated =back =cut
  8. Step 3: Pod munging! =over =item frobulate() If C<frobulate> is

    true, this method will perturb various internal states for maximum Brownian motion. =back =cut
  9. Step 4: dist.ini! # My-Thingy/dist.ini name = My-Thingy author =

    Mark Allen <[email protected]> license = Perl_5 copyright_holder = Mark Allen copyright_year = 2012 version = 0.001 [@Basic] # <- What is that?!
  10. Step 4: dist.ini! # My-Thingy/dist.ini name = My-Thingy author =

    Mark Allen <[email protected]> license = Perl_5 copyright_holder = Mark Allen copyright_year = 2012 version = 0.001 [@Basic] # <- What is that?! •  GatherDir   •  PruneCru;   •  ManifestSkip   •  MetaYAML   •  License   •  Readme   •  ExtraTests   •  ExecDir   •  ShareDir   •  MakeMaker   •  Manifest   •  TestRelease   •  ConfirmRelease   •  UploadToCPAN  
  11. Step 4: dist.ini! Useful plugins:! •  NextRelease (Changelog)! •  PkgVersion

    (Sets $VERSION)! •  ReadmeAnyFromPod! •  AutoPrereqs!
  12. Step 4: dist.ini! Some guidelines:! •  Plugin order matters (sometimes)!

    •  Source code is your friend! •  Often web search is your best friend! •  Might have to play around to get it perfect!
  13. dist.ini Walkthrough! [NextRelease] format = %-9v %{yyyy-MM-dd}d [@Git] allow_dirty =

    README.md allow_dirty = dist.ini allow_dirty = Changes [@Filter] bundle = @Basic remove = Readme
  14. dist.ini Walkthrough! [MetaJSON] [AutoMetaResources] bugtracker.rt = 1 repository.github = user:mrallen1;lcdist:Net-CronIO

    homepage = https://metacpan.org/dist/%{dist} [ReadmeFromPod] [ReadmeAnyFromPod] type = markdown filename = README.md location = root [PkgVersion] [PodWeaver] [AutoPrereqs]