<?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; perl</title>
	<atom:link href="https://blog.brunotavares.net/?feed=rss2&#038;tag=perl" 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>Maintaining your namespace clean in Perl</title>
		<link>https://blog.brunotavares.net/?p=234</link>
		<comments>https://blog.brunotavares.net/?p=234#comments</comments>
		<pubDate>Fri, 10 Oct 2008 08:01:32 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=234</guid>
		<description><![CDATA[Some modules like XML::Simple export some functions by default into your namespace. Normally you don&#8217;t want this functions since the module has a OO interface; so, how to avoid the auto-export from taint your namespace ? You can, at include time, be careful and explicitly tell the module not to export anything by doing this: [...]]]></description>
				<content:encoded><![CDATA[<p>Some modules like <code>XML::Simple</code> export some functions by default into your namespace. Normally you don&#8217;t want this functions since the module has a OO interface; so, how to avoid the auto-export from taint your namespace ?</p>
<p>You can, at include time, be careful and explicitly tell the module not to export anything by doing this:</p>
<pre><code>
use XML::Simple qw();
</code></pre>
<p>But what if you are using a bunch of modules and you aren&#8217;t really sure of everything each one of them exports? You can either tell each one to export nothing ( <code> qw() </code>) or you can use <code>use namespace::clean</code>.</p>
<p><a href="http://search.cpan.org/~phaylon/namespace-clean-0.08/lib/namespace/clean.pm">namespace::clean</a> defines a pragma that cleans up your namespace from exported functions. When you use the pragma all the exported functions to that point are cleaned-out from your namespace.</p>
<p>So if your using a lot of modules you can use it like this:</p>
<pre><code>
use strict;

use Foo;
use Bar;

use namespace::clean; #all Foo and Bar exported functions are cleaned out from your namespace

use Carp; #croak is available on your namespace

...
</code></pre>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=234</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pikeo::API</title>
		<link>https://blog.brunotavares.net/?p=227</link>
		<comments>https://blog.brunotavares.net/?p=227#comments</comments>
		<pubDate>Sun, 05 Oct 2008 21:59:42 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[pikeo]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=227</guid>
		<description><![CDATA[At work we had the need to interact with Orange&#8216;s Pikeo service. Pikeo is a Flickr like photo management/sharing service that has a REST API. We ended up making a, object oriented, Perl wrapper for the API. The Perl API project is here, will be published to cpan as soon as we finish the documentation. [...]]]></description>
				<content:encoded><![CDATA[<p>At work we had the need to interact with <a href="http://orange.fr">Orange</a>&#8216;s <a href="http://pikeo.com">Pikeo</a> service.</p>
<p>Pikeo is a Flickr like photo management/sharing service that has a <a href="http//dev.pikeo.com">REST API</a>.</p>
<p>We ended up making a, object oriented, Perl wrapper for the API. The Perl API project is <a href="http://projects.brunotavares.net/projects/show/pikeoperlapi">here</a>, will be published to cpan as soon as we finish the documentation.</p>
<p>As always: comments , bugs and feature requests are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=227</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>
		<item>
		<title>New tv_grab_pt version</title>
		<link>https://blog.brunotavares.net/?p=164</link>
		<comments>https://blog.brunotavares.net/?p=164#comments</comments>
		<pubDate>Tue, 27 Dec 2005 22:10:16 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[tv_grab_pt]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[xmltv]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=164</guid>
		<description><![CDATA[Just solved a ugly memory leak in the grabber. It could take up to 250Mb of memory. You can find the latest version on xmltv cvs or on http://projects.brunotavares.net/projects/show/xmltvptgrabber.]]></description>
				<content:encoded><![CDATA[<p>Just solved a ugly memory leak in the grabber. It could take up to 250Mb of memory.<br />
You can find the latest version on xmltv cvs or on http://projects.brunotavares.net/projects/show/xmltvptgrabber.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl tutorials &#8230;.</title>
		<link>https://blog.brunotavares.net/?p=41</link>
		<comments>https://blog.brunotavares.net/?p=41#comments</comments>
		<pubDate>Tue, 13 Jan 2004 15:33:22 +0000</pubDate>
		<dc:creator>bat</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.brunotavares.net/?p=41</guid>
		<description><![CDATA[Andava á procura de alguma informação sobre Class::DBI quando fui aqui dar. (ainda tabelei aqui pelo caminho) Depois de ler o que me interessava reparei que este site tem uma base de dados consideravel de tutorials de perl, mas atenção que nem todos sao para newbies. Tambem dá jeito como cookbook.]]></description>
				<content:encoded><![CDATA[<p>Andava á procura de alguma informação sobre Class::DBI quando fui <a href="http://www.perlmonks.org/index.pl?node_id=279077">aqui</a> dar. (ainda tabelei <a href="http://www.perl.com/pub/a/2002/11/27/classdbi.html"> aqui </a> pelo caminho)</p>
<p>Depois de ler o que me interessava reparei que <a href="http://www.perlmonks.org/index.pl?node=Tutorials">este site</a> tem uma base de dados consideravel de tutorials de perl, mas atenção que nem todos sao para newbies. </p>
<p>Tambem dá jeito como cookbook.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.brunotavares.net/?feed=rss2&#038;p=41</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
