{"id":484,"date":"2010-06-24T20:27:22","date_gmt":"2010-06-24T19:27:22","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/"},"modified":"2010-06-24T20:27:22","modified_gmt":"2010-06-24T19:27:22","slug":"distzilla-cpanhacker-do-you-use-it","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/","title":{"rendered":"Dist::Zilla, cpanhacker, do you use it??!"},"content":{"rendered":"<p><a href=\"http:\/\/www.youtube.com\/watch?v=j7jhb8_UPfw\" rel=\"nofollow\">Dist::Zilla, cpan hacker, do you use it?<\/a><\/p>\n<p>If not, you should. Full stop.<\/p>\n<p>So I&#39;ve been reading about <a href=\"http:\/\/dzil.org\" rel=\"nofollow\">Dist::Zilla (dzil)<\/a> for a while now. The first articles didn&#39;t really convince me too much. Yes, it&#39;s a nice tool, but why would I want to use it? Ok, to save time. Right. But how do I use it the first time? I need a config file. Ok where do I get (a sane) one?<\/p>\n<p>Then I read <a href=\"http:\/\/blog.urth.org\/2010\/06\/walking-through-a-real-distini.html\" rel=\"nofollow\">a clear walk-through example of a Dist::Zilla config<\/a> by Dave Rolsky. So, the quick start route was clear. Copy\/paste the <code>dist.ini<\/code> file and try it.<\/p>\n<p>Except, the file in that blog post contains so much stuff (read: additional plugins required) that is not practical to use as a first <code>dist.ini<\/code> config.<\/p>\n<h3>Basic premise<\/h3>\n<p>It&#39;s that you have to have a module\/class that you want to upload to the CPAN, and you want to save yourself all the &quot;package-wrapping&quot; activities that a CPAN distribution needs. That is were dzil shines.<\/p>\n<h3>Start-using-Dist::Zilla-in-2-minutes guide<\/h3>\n<p>Good, you&#39;re on your way to spend countless hours less on maintaining your CPAN stuff.<\/p>\n<ul>\n<li>First things first: write the thing that you want to package and upload to CPAN. <a href=\"http:\/\/www.youtube.com\/watch?v=ydbqstSMCCM\" rel=\"nofollow\">Fatto? Bene.<\/a><\/li>\n<li>So you probably have a <code>lib<\/code> folder with your class and a <code>t<\/code> folder with the test scripts for your class. Good.<\/li>\n<li>Then, usually if you want to package everything for CPAN, you need to add a MANIFEST, a README, INSTALL, Changes, possibly a LICENSE, etc&#8230; Forget about those!<\/li>\n<li>Copy paste the following into a <code>dist.ini<\/code> file:\n<pre>\r\n; Everything starting with &#39;;&#39; is a comment\r\n\r\nname    = Your-Awesome-Module\r\nauthor  = Joe J. Hacker &lt;jjhacker@example.org&gt;\r\nlicense = Perl_5\r\ncopyright_holder = Joe J. Hacker\r\ncopyright_year   = 2010\r\n\r\nversion = 0.01\r\n\r\n[@Basic]\r\n[InstallGuide]\r\n[MetaJSON]\r\n\r\n[MetaResources]\r\nbugtracker.web    = http:\/\/rt.cpan.org\/NoAuth\/Bugs.html?Dist=Your-Awesome-Module\r\nbugtracker.mailto = bug-your-awesome-module@rt.cpan.org\r\n\r\n; If you have a repository...\r\n;repository.url    = git:\/\/github.com\/jjhacker\/your-awesome-module.git\r\n;repository.web    = http:\/\/github.com\/jjhacker\/your-awesome-module\r\n;repository.type   = git\r\n\r\n; You have to have Dist::Zilla::Plugin::&lt;Name&gt; for these to work\r\n;[PodWeaver]\r\n;[NoTabsTests]\r\n;[EOLTests]\r\n;[Signature]\r\n;[CheckChangeLog]\r\n\r\n[Prereq]\r\n;DBI = 1.600\r\n;SomeOtherModule = 0\r\n\r\n[Prereq \/ TestRequires]\r\nTest::More = 0\r\n\r\n; If you&#39;re using git, this is interesting\r\n; You need to install Dist::Zilla::PluginBundle::Git\r\n;[@Git]\r\n\r\n<\/pre>\n<\/li>\n<li>Add the following line at the top of your main class (.pm) file:\n<pre>\r\n# ABSTRACT: Supercool generator of twisty little passages, all alike\r\n<\/pre>\n<\/li>\n<li>Run <code>dzil build<\/code>\n<\/li>\n<\/ul>\n<p>That&#39;s it! The <b>build<\/b> command will do everything for you. When <b>I realized how quick this tool makes my CPAN activities<\/b>, I decided I had to try to convince some more people out there. Until I didn&#39;t really try it, I wasn&#39;t convinced 100%. Now I definitely am. <b>Life&#39;s just too short. Use DZIL.<\/b><\/p>\n<p>There&#39;s also a <b>release<\/b> command, that will also send your generated distribution archive to the CPAN directly. I couldn&#39;t get that to work. I remember there was some kind of dot file I had to write my credentials to before I could release, but I couldn&#39;t find the details today. If anyone knows, please comment here&#8230; :-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dist::Zilla, cpan hacker, do you use it? If not, you should. Full stop. So I&#39;ve been reading about Dist::Zilla (dzil) for a while now. The first articles didn&#39;t really convince me too much. Yes, it&#39;s a nice tool, but why would I want to use it? Ok, to save time. Right. But how do I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[49,91,222,415,50],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Dist::Zilla, cpanhacker, do you use it??! - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dist::Zilla, cpanhacker, do you use it??! - Random hacking\" \/>\n<meta property=\"og:description\" content=\"Dist::Zilla, cpan hacker, do you use it? If not, you should. Full stop. So I&#039;ve been reading about Dist::Zilla (dzil) for a while now. The first articles didn&#039;t really convince me too much. Yes, it&#039;s a nice tool, but why would I want to use it? Ok, to save time. Right. But how do I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2010-06-24T19:27:22+00:00\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"Dist::Zilla, cpanhacker, do you use it??!\",\"datePublished\":\"2010-06-24T19:27:22+00:00\",\"dateModified\":\"2010-06-24T19:27:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\"},\"wordCount\":403,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"keywords\":[\"cpan\",\"development\",\"Dist::Zilla\",\"dzil\",\"perl\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\",\"name\":\"Dist::Zilla, cpanhacker, do you use it??! - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"datePublished\":\"2010-06-24T19:27:22+00:00\",\"dateModified\":\"2010-06-24T19:27:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dist::Zilla, cpanhacker, do you use it??!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dist::Zilla, cpanhacker, do you use it??! - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/","og_locale":"en_US","og_type":"article","og_title":"Dist::Zilla, cpanhacker, do you use it??! - Random hacking","og_description":"Dist::Zilla, cpan hacker, do you use it? If not, you should. Full stop. So I&#39;ve been reading about Dist::Zilla (dzil) for a while now. The first articles didn&#39;t really convince me too much. Yes, it&#39;s a nice tool, but why would I want to use it? Ok, to save time. Right. But how do I [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/","og_site_name":"Random hacking","article_published_time":"2010-06-24T19:27:22+00:00","author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"Dist::Zilla, cpanhacker, do you use it??!","datePublished":"2010-06-24T19:27:22+00:00","dateModified":"2010-06-24T19:27:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/"},"wordCount":403,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"keywords":["cpan","development","Dist::Zilla","dzil","perl"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/","name":"Dist::Zilla, cpanhacker, do you use it??! - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"datePublished":"2010-06-24T19:27:22+00:00","dateModified":"2010-06-24T19:27:22+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/distzilla-cpanhacker-do-you-use-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"Dist::Zilla, cpanhacker, do you use it??!"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/484"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=484"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/484\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}