<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>brunotavares.net: ScrapBook &#187; cpan</title>
	<atom:link href="https://blog.brunotavares.net/?feed=rss2&#038;tag=cpan" rel="self" type="application/rss+xml" />
	<link>https://blog.brunotavares.net</link>
	<description>Notes. tech and a few thoughs</description>
	<lastBuildDate>Sun, 25 Nov 2018 17:59:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Pikeo::API 1.00</title>
		<link>https://blog.brunotavares.net/?p=239</link>
		<comments>https://blog.brunotavares.net/?p=239#comments</comments>
		<pubDate>Mon, 13 Oct 2008 12:56:01 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=239</guid>
		<description><![CDATA[It&#8217;s now on CPAN: http://search.cpan.org/~bmavt/Pikeo-API-1.00/lib/Pikeo/API.pm Project page still available: http://projects.brunotavares.net/projects/show/pikeoperlapi]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s now on CPAN: <a href="http://search.cpan.org/~bmavt/Pikeo-API-1.00/lib/Pikeo/API.pm">http://search.cpan.org/~bmavt/Pikeo-API-1.00/lib/Pikeo/API.pm</a></p>
<p>Project page still available: <a href="http://projects.brunotavares.net/projects/show/pikeoperlapi">http://projects.brunotavares.net/projects/show/pikeoperlapi</a></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=239</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl modules distributions</title>
		<link>https://blog.brunotavares.net/?p=175</link>
		<comments>https://blog.brunotavares.net/?p=175#comments</comments>
		<pubDate>Wed, 24 Sep 2008 16:34:00 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=175</guid>
		<description><![CDATA[All over the year&#8217;s i&#8217;ve made several perl module distributions. I&#8217;ve used a diversity of tools to package the modules and create a cpan ready distribution. I&#8217;ve bumped into several issues with the makefiles and the packaging itself but, for sometime now, i&#8217;ve a recipe to create a fully cpan compliant distribuition without any manual [...]]]></description>
				<content:encoded><![CDATA[<p>All over the year&#8217;s i&#8217;ve made several perl module distributions. I&#8217;ve used a diversity of tools to package the modules and create a cpan ready distribution.</p>
<p>I&#8217;ve bumped into several issues with the makefiles and the packaging itself but, for sometime now, i&#8217;ve a recipe to create a fully cpan compliant distribuition without any manual editing of the non-code distribution files.</p>
<p>First of all create the skeleton of the distro using Module::Starter</p>
<p><PRE><code>module-starter -mb -module=Foo::Bar --author="your name" --email=your@email</code></PRE></p>
<p>This will create your distro structure in the Foo-Bar directory.<br />
Your code will live in the Foo-Bar/lib dir, and the tests in the Foo-Bar/t</p>
<p>Note: the -mb option tells module-starter to use Module::Build instead of ExtUtils::MakeMaker. This materializes in you ending up with a Build.PL script instead of the traditional Makefile.PL. Just remove -mb option if you want a Makefile.PL but ExtUtils::MakeMaker has some quirks that i personaly don&#8217;t like so i use Module::Build</p>
<p>Edit Build.PL file in the Foo-Bar directory, it should be similar to this:</p>
<pre><code>
#!/usr/bin/perl

use strict;
use warnings;

use Module::Build;

Module::Build->new(
        module_name => 'Foo::Bar',
        license => 'perl',
        requires => {
                'Other::Module' => '0',
        },
        build_requires => {
                'Test::More' => 0,
        },
        create_makefile_pl => 'traditional',
        sign => 0,
)->create_build_script;
</code></pre>
<p>The important bits are the &#8216;requires&#8217; key, wich states all the depencies for you module and the &#8216;build_requires&#8217; that states extra dependencies  to build the module ( including running the tests you ship with the distro )</p>
<p>You can also sign the distro with pgp (which i recommend), just flip the &#8216;sign&#8217; value to 1.</p>
<p>Now you just have to create the buld script</p>
<p><code>
<pre>$ perl Build.PL</pre>
<p></code></p>
<p>and create the first distribution package</p>
<p><code>
<pre>$ ./Build dist </pre>
<p></code></p>
<p>You should have the Foo-Bar-0.01.tar.gz ready to drop on cpan.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=175</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
