<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>*n*x &#187; Perl</title>
	<atom:link href="http://nxadm.wordpress.com/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://nxadm.wordpress.com</link>
	<description>Some things about UNIX</description>
	<lastBuildDate>Tue, 03 Nov 2009 18:06:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='nxadm.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/86350f6d56118f9214baaa85601f11a0?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>*n*x &#187; Perl</title>
		<link>http://nxadm.wordpress.com</link>
	</image>
			<item>
		<title>Sometimes asking nicely works&#8230;</title>
		<link>http://nxadm.wordpress.com/2009/08/24/sometimes-asking-nicely-works/</link>
		<comments>http://nxadm.wordpress.com/2009/08/24/sometimes-asking-nicely-works/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 07:52:15 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=447</guid>
		<description><![CDATA[Andy Lester was the first to point out that the we will have Perl support on the next release of Android! I guess asking nicely, does help. 
I am not saying they listen to me, but I asked as well. 

Posted in Perl, Programming Tagged: android, google, Perl      <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=447&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span><a href="http://perlbuzz.com/2009/08/perl-coming-to-android-phones.html" target="_blank"><a href="http://nxadm.files.wordpress.com/2008/05/perl.jpg"><img class="alignleft size-thumbnail wp-image-39" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=135&#038;h=150" alt="perl" width="135" height="150" /></a>Andy Lester</a> was the first to point out that the we will have <a href="http://code.google.com/p/android-scripting/source/browse/#hg/perl" target="_blank">Perl support</a> on the next release of <a href="http://www.android.com" target="_blank">Android</a>! I guess asking nicely, does help. </span></p>
<p><span>I am not saying they listen to <strong>me</strong>, but I asked as <a href="http://code.google.com/p/android-scripting/issues/detail?id=32" target="_blank">well</a>. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</span></p>
Posted in Perl, Programming Tagged: android, google, Perl <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=447&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2009/08/24/sometimes-asking-nicely-works/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=135" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>
	</item>
		<item>
		<title>Install DBD::mysql for Solaris 10 system perl</title>
		<link>http://nxadm.wordpress.com/2009/08/13/install-dbdmysql-for-solaris-10-system-perl/</link>
		<comments>http://nxadm.wordpress.com/2009/08/13/install-dbdmysql-for-solaris-10-system-perl/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 06:04:03 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[DBD::mysql]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Solaris 10]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=434</guid>
		<description><![CDATA[Installing DBD::mysql on Solaris 10 seems to be less trivial than &#8220;cpan DBD::mysql&#8221; when you want to use the system-supplied perl (5.8.4) and mysql (4.0.31) installation. Google shows a lot of people asking how to proceed, but surprisingly no answers. Typically, one gets this error at make time:
[...]
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=434&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-thumbnail wp-image-39" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=135&#038;h=150" alt="perl" width="135" height="150" />Installing DBD::mysql on Solaris 10 seems to be less trivial than &#8220;cpan DBD::mysql&#8221; when you want to use the system-supplied perl (5.8.4) and mysql (4.0.31) installation. Google shows a <strong>lot </strong>of people asking how to proceed, but surprisingly no answers. Typically, one gets this error at make time:</p>
<p><code>[...]<br />
"dbdimp.c", line 4468: improper member use: com<br />
"dbdimp.c", line 4468: improper member use: com<br />
"dbdimp.c", line 4468: improper member use: com<br />
"dbdimp.c", line 4630: undefined struct/union member: pmysql<br />
"dbdimp.c", line 4653: undefined struct/union member: pmysql<br />
cc: acomp failed for dbdimp.c<br />
make: *** [dbdimp.o] Error 1</code></p>
<p>To install the module do this:</p>
<ol>
<li>Install the following Solaris mysql packages (if not already installed): SUNWmysqlr, SUNWmysqlu, SUNWmysqlS, SUNWmysqlt.</li>
<li>Type the following as root:<br />
<code>cd /usr/sfw/share/src/mysql<br />
./configure</code></li>
<li>Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-&lt;VERSION&gt; (already there if you previously tried to install the module with cpan).</li>
<li>Run the makefile with the following arguments (adapt to your own needs if necessary):<br />
<code>cd ~/.cpan/build/DBD-mysql-&lt;VERSION&gt;<br />
perl Makefile.PL --libs '-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm' --cflags '-I/usr/sfw/include -I/usr/include -I/usr/sfw/share/src/mysql/include'Installing /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/mysql/mysql</code></li>
<li>Complete the normal installation (make, make test (if you have a test db running), make install).</li>
</ol>
<p>That&#8217;s it.</p>
Posted in Perl, Solaris, UNIX Tagged: DBD::mysql, Mysql, Perl, Solaris, Solaris 10, UNIX <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/434/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=434&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2009/08/13/install-dbdmysql-for-solaris-10-system-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=135" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>
	</item>
		<item>
		<title>Some ideas on method auto-completion in Padre</title>
		<link>http://nxadm.wordpress.com/2009/06/09/some-ideas-on-method-auto-completion-in-padre/</link>
		<comments>http://nxadm.wordpress.com/2009/06/09/some-ideas-on-method-auto-completion-in-padre/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 12:51:45 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[epic]]></category>
		<category><![CDATA[komode edit]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[Padre]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=392</guid>
		<description><![CDATA[Auto-completion is a nice feature for an IDE. While Padre supports some auto-completion functions, method auto-completion is an important missing feature. This post is a short round-up of features present in other IDEs.
What auto-completion features does Padre support today?
Beside automatic bracket completion, Padre has a nice auto-completion implementation for variables (first character -including sigil- then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=392&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-thumbnail wp-image-39" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=89&#038;h=99" alt="perl" width="89" height="99" />Auto-completion is a nice feature for an IDE. While <a href="http://padre.perlide.org" target="_blank">Padre</a> supports some auto-completion functions, method auto-completion is an important missing feature. This post is a short round-up of features present in other IDEs.</p>
<h2>What auto-completion features does Padre support today?</h2>
<p>Beside automatic bracket completion, Padre has a nice auto-completion implementation for variables (first character -including sigil- then ctrl + p):</p>
<p style="text-align:center;"><img class="size-full wp-image-393 aligncenter" title="padreautocomplete" src="http://nxadm.files.wordpress.com/2009/06/padreautocomplete.png?w=287&#038;h=267" alt="padreautocomplete" width="287" height="267" /></p>
<p style="text-align:center;">
<h2>Eclipse + Epic</h2>
<p><a href="http://e-p-i-c.sf.net" target="_blank">Epic</a> (an add-on to <a href="http://wwww.eclipse.org" target="_blank">Eclipse</a>) has a nice working auto-completion feature activated by the method invocator (-&gt;).</p>
<p><img class="aligncenter size-full wp-image-397" title="epicac" src="http://nxadm.files.wordpress.com/2009/06/epicac.png?w=460&#038;h=257" alt="epicac" width="460" height="257" /></p>
<p>As a reference, the java auto-completion in Eclipse:</p>
<p><img class="aligncenter size-full wp-image-398" title="eclipseac" src="http://nxadm.files.wordpress.com/2009/06/eclipseac.png?w=419&#038;h=342" alt="eclipseac" width="419" height="342" /></p>
<h2>Komodo Edit</h2>
<p><a href="http://www.activestate.com/komodo_edit/" target="_blank">Komodo Edit</a> also has auto-completion for methods, but does not show those inherited from parent classes making the feature rather useless for OO development.</p>
<p><img class="aligncenter size-full wp-image-396" title="komodeac" src="http://nxadm.files.wordpress.com/2009/06/komodeac.png?w=299&#038;h=121" alt="komodeac" width="299" height="121" /></p>
<h2>Netbeans</h2>
<p><a href="http://www.netbeans.org" target="_blank">Netbeans</a> has no Perl support, nevertheless the java auto-completion feature is a good example:</p>
<p><img class="aligncenter size-full wp-image-394" title="nbaujava" src="http://nxadm.files.wordpress.com/2009/06/nbaujava.png?w=460&#038;h=437" alt="nbaujava" width="460" height="437" /></p>
<p>The method auto-completion feature is activated by the &#8220;.&#8221; (&#8220;-&gt;&#8221; in Perl). Not only you get a list of <strong>accessible</strong> methods (with expected parameter type and return value), but also the javadoc documentation for the selected method.</p>
<h2>How should Padre support method auto-completion? Some ideas</h2>
<ol>
<li>Method autocomplete should be activated by &#8220;-&gt;&#8221; and &#8220;::&#8221;. This way class hierarchies can be autocompleted as well. With &#8220;::&#8221; support for functions can be added.</li>
<li>Private methods should be hidden. By convention, private methods start with &#8220;_&#8221;.</li>
<li>Linking method autocomplete to perldoc is a winner combination when programming to not yet familiar APIs and certainly friendly to new Perl developers. While Perl is not strictly typed, a well formatted perldoc entry for a method should make clear what kind of parameters are expected and what the return value could be. However, documentation is rather freely formatted, so it would be difficult to implement in a generic way (without adding formatting restriction to classes).</li>
</ol>
Posted in Perl, Programming Tagged: eclipse, epic, komode edit, netbeans, Padre, Perl, Programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=392&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2009/06/09/some-ideas-on-method-auto-completion-in-padre/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=135" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2009/06/padreautocomplete.png" medium="image">
			<media:title type="html">padreautocomplete</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2009/06/epicac.png" medium="image">
			<media:title type="html">epicac</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2009/06/eclipseac.png" medium="image">
			<media:title type="html">eclipseac</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2009/06/komodeac.png" medium="image">
			<media:title type="html">komodeac</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2009/06/nbaujava.png" medium="image">
			<media:title type="html">nbaujava</media:title>
		</media:content>
	</item>
		<item>
		<title>Perl&#8217;s new wave</title>
		<link>http://nxadm.wordpress.com/2009/02/16/perls-new-wave/</link>
		<comments>http://nxadm.wordpress.com/2009/02/16/perls-new-wave/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:29:23 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA["Modern Perl"]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Padre]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=279</guid>
		<description><![CDATA[We all remember the &#8220;Perl is dead&#8221; hype from not so long ago. In short: Perl 6 wasn&#8217;t there yet and perl ironically wasn&#8217;t a copy of the language of the day (python, ruby, c#, &#8230;).
I was positively surprised by the response of the perl community. It wasn&#8217;t the typical &#8220;our programs run fast&#8221; (to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=279&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-thumbnail wp-image-39" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="perl" width="86" height="96" />We all remember the &#8220;Perl is dead&#8221; hype from not so long ago. In short: Perl 6 wasn&#8217;t there yet and perl ironically wasn&#8217;t a copy of the language of the day (python, ruby, c#, &#8230;).</p>
<p>I was positively surprised by the response of the perl community. It wasn&#8217;t the typical &#8220;our programs run fast&#8221; (to ruby <a title="Fanboy != user" href="http://en.wikipedia.org/wiki/Fanboy" target="_blank"><strong>fanboys</strong></a>*) or &#8220;space as syntax wtf?&#8221; (to python <strong>fanboys</strong>). Instead it seemed that community took notice of the criticisms and made pretty clear that waiting for Perl 6 was not an option. Today, Perl 6 is doing fine (you can write code in Perl 6) and <a href="http://timbunce.files.wordpress.com/2008/03/perl-myths-200802-with-notes.pdf" target="_blank">so is Perl 5</a>.</p>
<p>So what did the community do? Well,<a href="http://oreilly.com/catalog/9780596001735/" target="_blank"> Perl Best Practices</a> -and corresponding module <a href="http://search.cpan.org/dist/Perl-Critic/" target="_blank">Perl::Critic</a>- was a milestone telling people to stop writing perl 4 scripts and respect sane best practices to achieve clean and elegant code. Next to the many great modules already at CPAN (DBI::*, POE::*, DateTime, <span style="text-decoration:line-through;">DBIx::Class</span> (after PBP), WWW::*, etc), the community decided to address some clear shortcomings.</p>
<p><a href="http://search.cpan.org/~drolsky/Moose-0.70/lib/Moose/Manual.pod" target="_blank">Moose</a> (inspired by Perl 6) was an answer to one of the -in my opnion- greatest shortcoming of Perl 5: the basic OO framework. Perl-based <a href="http://www.catalystframework.org/" target="_blank">Catalyst</a> jumped on the Ruby-On-Rail wagon. chromatic, a core developer and important community member, started to <a href="http://www.modernperlbooks.com" target="_self">think out loud</a> what actually &#8220;modern perl&#8221; means and how we can improve perl by getting rid of obsolete features and bad practices.</p>
<p>An other missing piece, was a beginners-friendly and perl-centric IDE. Padre is aiming to fill this need. <a href="http://szabgab.com" target="_blank">Gabor Szabo</a> was able to quickly form a community developing padre (including <a href="http://ali.as/" target="_blank">Alias</a> of Strawberry Perl and PPI fame). I guess this was the kind of project I was waiting for.</p>
<p>I hope that by being part of this project I can contribute to this <strong>positive</strong> perl new wave.</p>
<p>* fanboy != user</p>
Posted in Perl, Programming Tagged: "Modern Perl", community, Padre, Perl <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=279&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2009/02/16/perls-new-wave/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>
	</item>
		<item>
		<title>High-Order Perl now legally available online</title>
		<link>http://nxadm.wordpress.com/2008/12/10/high-order-perl-now-legally-available-online/</link>
		<comments>http://nxadm.wordpress.com/2008/12/10/high-order-perl-now-legally-available-online/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 15:22:31 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA["High Order Perl"]]></category>
		<category><![CDATA[ebook]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=261</guid>
		<description><![CDATA[In case you haven&#8217;t read it elsewhere, High-Order Perl written by Mark Jason Dominus is now legally available on-line without cost. Get it here.
Of course, if you find the book useful and/or interesting you should buy it. You will not only acknowledge Mark&#8217;s work, but you will keep the Perl book micro-cosmos alive. Books that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=261&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="size-thumbnail wp-image-39 alignleft" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="perl" width="86" height="96" />In case you haven&#8217;t read it elsewhere, <a href="http://hop.perl.plover.com/" target="_blank"><em>High-Order Perl</em></a> written by Mark Jason Dominus is now legally available on-line without cost. Get it <a href="http://hop.perl.plover.com/book/" target="_blank">here</a>.</p>
<p>Of course, if you find the book useful and/or interesting you should buy it. You will not only acknowledge Mark&#8217;s work, but you will keep the Perl book micro-cosmos alive. Books that help you learn and widen your knowledge are a must for a language to flourish (not only for languages, by the way).</p>
<p>Having the real thing before buying gives you the power as a programmer to decide if it&#8217;s worth your money (no one can buy 1000 books). This beats reading reviews, table of contents or even a quick look in the bookstore.</p>
<p>Thanks for the trust, Mark.</p>
Posted in Perl, Programming Tagged: "High Order Perl", ebook, Perl, Programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=261&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/12/10/high-order-perl-now-legally-available-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>
	</item>
		<item>
		<title>An old answer to a common Perl question: name of a variable as a variable?</title>
		<link>http://nxadm.wordpress.com/2008/11/08/name-of-a-variable-as-a-variable/</link>
		<comments>http://nxadm.wordpress.com/2008/11/08/name-of-a-variable-as-a-variable/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 20:37:53 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=214</guid>
		<description><![CDATA[While randomly &#8220;googling&#8221; I found an interesting news post from 1998:
People show up in comp.lang.perl.misc all the time asking how to use the contents of a variable as the name of another variable. For example, they have $foo = &#8217;snonk&#8217;, and then they want to operate on the value of $snonk.
That&#8217;s very easy to do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=214&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="size-thumbnail wp-image-39 alignleft" title="perl" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="perl" width="86" height="96" />While randomly &#8220;googling&#8221; I found an interesting <a href="http://groups.google.com/group/comp.programming/browse_thread/thread/ca0093c7a00deddb/b5111adb8b442fdd?lnk=gst&amp;q=+Why+it's+stupid+to+`use+a+variable+as+a+variable+name'++Why+it's+stupid+to+`use+a+variable+as+a+variable+name'#b5111adb8b442fdd" target="_blank">news post</a> from 1998:</p>
<blockquote><p>People show up in comp.lang.perl.misc all the time asking how to use the contents of a variable as the name of another variable. For example, they have $foo = &#8217;snonk&#8217;, and then they want to operate on the value of $snonk.</p>
<p>That&#8217;s very easy to do in Perl, so they usually get some people to tell them to do it.  And they usually get some people asking them why they didn&#8217;t use a hash instead.</p></blockquote>
<p>As a Perl programmer it&#8217;s probably one of the most common questions you will hear from people learning Perl. I remember posing the same question back then (before I got to the chapters of references and hashes <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). Anyway, it&#8217;s a nice read and it may be an useful link for the next time (soon) someone asks you this question&#8230;</p>
Posted in Perl, Programming Tagged: Perl <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=214&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/11/08/name-of-a-variable-as-a-variable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image">
			<media:title type="html">perl</media:title>
		</media:content>
	</item>
		<item>
		<title>Object Oriented Perl?</title>
		<link>http://nxadm.wordpress.com/2008/07/12/object-oriented-perl/</link>
		<comments>http://nxadm.wordpress.com/2008/07/12/object-oriented-perl/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 19:46:05 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OO]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=132</guid>
		<description><![CDATA[I love perl. Really. This is not a post inspired by &#8220;5 things I hate about Perl&#8220;, but rather a question for the wider perl community out there (hi perlshere!). How do you write your OO perl code?
I have some code out there that follows the inside-out objects methodology of Perl Best Practices. Lately I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=132&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span class="alignleft"><img class="alignnone size-thumbnail wp-image-39" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="" width="86" height="96" /></span>I love perl. Really. This is not a post inspired by &#8220;<a href="http://use.perl.org/~brian_d_foy/journal/32556" target="_blank">5 things I hate about Perl</a>&#8220;, but rather a question for the wider perl community out there (hi <a href="http://perlsphere.net/" target="_blank">perlshere</a>!). How do you write your OO perl code?</p>
<p>I have some code out there that follows the inside-out objects methodology of <a href="http://oreilly.com/catalog/9780596001735/" target="_blank">Perl Best Practices</a>. Lately I have been writing java code, and inside-out objects feel like a lot of extra &#8211; not very intuitive &#8211; work to create your classes. I have been looking at <a href="http://www.iinteractive.com/moose/" target="_blank">Moose</a>, but again it looks pretty cumbersome to create classes (constructors, named parameters for methods, returns, etc.). I am just probably missing a good howto (besides the cookbooks on cpan) or even a printed book on Moose. Any tips out there to get into Moose fast or a nice complete and intuitive alternative (extra points if it&#8217;s similar to java&#8217;s OO framework)? Thanks.</p>
<p><span style="color:#ff0000;">EDIT (Feb. 16th 2009): it seems I have a direct line with The Perl Foundation: a <a href="http://www.perlfoundation.org/dave_rolsky_moose_docs" target="_blank">grant</a> was approved for <a href="http://blog.urth.org/" target="_blank">Dave Rolsky</a> to work on the Moose documentation. <a href="http://babyl.dyndns.org/techblog/" target="_blank">Yannick </a>greated a nice <a href="http://babyl.dyndns.org/techblog/manuals/" target="_blank">pdf output</a> of the <a href="http://search.cpan.org/~drolsky/Moose-0.70/lib/Moose/Manual.pod" target="_blank">manual</a> (see <a href="http://blog.urth.org/2009/02/moose-book-well-sort-of.html" target="_blank">this</a> as well).</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nxadm.wordpress.com/132/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nxadm.wordpress.com/132/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=132&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/07/12/object-oriented-perl/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image" />
	</item>
		<item>
		<title>CPAN on Ubuntu fails on bug IO/Uncompress/RawInflate.pm: solution</title>
		<link>http://nxadm.wordpress.com/2008/05/30/cpan-on-ubuntu-fails-on-bug-iouncompressrawinflatepm-solution/</link>
		<comments>http://nxadm.wordpress.com/2008/05/30/cpan-on-ubuntu-fails-on-bug-iouncompressrawinflatepm-solution/#comments</comments>
		<pubDate>Fri, 30 May 2008 11:49:02 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=51</guid>
		<description><![CDATA[
apt-gettable perl modules on Ubuntu are great. A nice packager at Debian Gnu/Linux compiled the modules and included all dependencies specially for you   .
This is extremely handy when you are looking for a solution for a programming problem that you know someone else solved before. You apt-get the modules you need and have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=51&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft alignnone size-thumbnail wp-image-39" style="float:left;" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="" width="86" height="96" /></p>
<p>apt-gettable perl modules on Ubuntu are great. A nice packager at <a href="http://www.debian.org" target="_blank">Debian Gnu/Linux</a> compiled the modules and included all dependencies specially for you <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>This is extremely handy when you are looking for a solution for a programming problem that you know someone else solved before. You apt-get the modules you need and have a quick try.</p>
<p>While doing exactly this (tryng to install HTML::TextToHTML) , I discover CPAN on Ubuntu was broken:<span style="color:#ff0000;">&#8221; Can&#8217;t call method &#8220;value&#8221; on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm line 64.&#8221;</span>.</p>
<p>I don&#8217;t think it&#8217;s a Debian/Ubuntu problem, but rather a upstream bug. Some people have the same problem on Windows. How nice the apt-gettable modules are, there are always cases when you need to build modules not yet in the Ubuntu repositories or you need a newer version (both cases here). A non-working CPAN is not acceptable. This is what I did.<span id="more-51"></span><br />
<code><br />
$ sudo apt-get remove libcompress-raw-zlib-perl</code></p>
<p>This will remove some perl modules dependent on this package.</p>
<p><code>$ sudo apt-get remove autoremove</code></p>
<p>This removed the following packages on my system: libio-compress-base-perl libgetopt-argvfile-perl libfile-temp-perl libpar-dist-perl libextutils-parsexs-perl libextutils-cbuilder-perl libyaml-perl.<br />
<code><br />
$ apt-get install gcc libc6-dev</code></p>
<p>Install a compiler and include files.</p>
<p><code>$ sudo cpan</code></p>
<p>Configure cpan answering the questions; type &#8220;exit&#8221; to exit CPAN.</p>
<p><code>$ sudo cpan Bundle::CPAN</code></p>
<p>This will install most basic CPAN dependencies.</p>
<p><code>$ sudo cpan &lt;module-name&gt;</code></p>
<p>To install modules you need.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nxadm.wordpress.com/51/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nxadm.wordpress.com/51/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=51&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/05/30/cpan-on-ubuntu-fails-on-bug-iouncompressrawinflatepm-solution/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image" />
	</item>
		<item>
		<title>Perl tip: get fancy parameters on a command line script</title>
		<link>http://nxadm.wordpress.com/2008/05/23/perl-tip-get-fancy-parameters-on-a-command-line-script/</link>
		<comments>http://nxadm.wordpress.com/2008/05/23/perl-tip-get-fancy-parameters-on-a-command-line-script/#comments</comments>
		<pubDate>Fri, 23 May 2008 10:17:20 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=45</guid>
		<description><![CDATA[
It is nice when your command line script has clear switches and parameters that have a long and short variant to please a different public. Have a look at this fictional example:
$ myscript.pl "config settings preferences" /var/tmp admin clean
or
$ myscript.pl --file config,settings,preferences --dir /var/tmp --user admin  --clean
It&#8217;s undeniable that the last one looks more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=45&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:left;"><img class="alignleft size-thumbnail wp-image-39" style="float:left;" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=81&#038;h=91" alt="" width="81" height="91" /></p>
<p style="text-align:left;">It is nice when your command line script has clear switches and parameters that have a long and short variant to please a different public. Have a look at this fictional example:</p>
<p style="text-align:left;"><code>$ myscript.pl "config settings preferences" /var/tmp admin clean</code></p>
<p style="text-align:left;">or</p>
<p style="text-align:left;"><code>$ myscript.pl --file config,settings,preferences --dir /var/tmp --user admin  --clean</code></p>
<p style="text-align:left;">It&#8217;s undeniable that the last one looks more professional and less error prone. The user knows what kind of input is expected and he can type them in whatever order he/she wishes. When he/she is comfortable with your program he/she can even use a shorter notation. The program can be started like this with the same results:</p>
<p style="text-align:left;"><span id="more-45"></span></p>
<p style="text-align:left;"><code>$ myscript.pl --dir /var/tmp --user admin --clean --file config,settings,preferences</code></p>
<p style="text-align:left;"><code>$ myscript.pl -f config,settings,preferences -d /var/tmp -u admin -c</code></p>
<p style="text-align:left;">
<p style="text-align:left;">How do we achieve this without writing a huge amount of code to treat the command line parameters (@ARGV)? Getopt::Long to the rescue, a real timesaver.</p>
<p style="text-align:left;">Here is an script template for the use of Getopt::Long:</p>
<p><code><br />
</code></p>
<p style="text-align:left;"><span style="color:#3366ff;">#!/opt/csw/bin/perl</span></p>
<p><span style="color:#3366ff;">###################<br />
# A program to do stuff              #<br />
#                                                   #<br />
# Bugs to xxx@xxx                      #<br />
###################</span></p>
<p><span style="color:#3366ff;">### Modules ###<br />
use strict;</span><br />
<span style="color:#3366ff;"> use warnings;<br />
use File::Basename;<br />
use Getopt::Long;</span></p>
<p><span style="color:#3366ff;">### Parameters ###</span></p>
<p><span style="color:#3366ff;">if ( !@ARGV ) {<br />
print &#8220;\nPlease read the help page: &#8221; . basename $0 . &#8221; -?\n\n&#8221;;<br />
exit 0;<br />
}<br />
my ($help, $version, @files, @files_tmp, $dir, $user, $clean);<br />
GetOptions(<br />
&#8216;help|h|?&#8217;              =&gt; \$help,<br />
&#8216;version|v&#8217;             =&gt; \$version,<br />
&#8216;file|f=s&#8217;                =&gt; \@files_tmp,<br />
&#8216;dir|d=s&#8217;                =&gt; \$dir,<br />
&#8216;user|u=s&#8217;             =&gt; \$user,<br />
&#8216;clean|c&#8217;                =&gt; \$clean,<br />
)<br />
or die &#8220;\nInvalid switch. Please read the help page: &#8220;<br />
. basename $0<br />
. &#8221; -?\n\n&#8221;;</span></p>
<p><span style="color:#3366ff;">@files = split( /,/, join( &#8216;,&#8217;, @files_tmp ) );</span></p>
<p><span style="color:#3366ff;">sub help {<br />
print &#8220;Some help information here&#8230;\n&#8221;;<br />
}</span></p>
<p>Let&#8217;s review the code.</p>
<p>First, you probably need to change you shebang (#!) to something like &#8220;#!/usr/bin/perl or #!perl&#8221; depending or you system. I use the perl from <a href="http://www.blastwave.org" target="_blank">blastwave</a> on Solaris, that&#8217;s why the shebang points to their binary.</p>
<p>&#8220;use File::Basename;&#8221; and &#8220;use Getopt::Long;&#8221; tells perl to use the modules (File::Basename is used to get the name of the script without the path), something you probably already know. Then we check if the program has been started without parameters (!@ARGV). If that&#8217;s the case, we exit the program after showing the help page.</p>
<p>The Getoption() function is the interesting bit. Here we define with long and short parameters the program should accept on the left. This is connected to a variable reference on the right (you can ignore the reference part in your code later). You use a pipe (|) to define alternatives like long and short parameter name (&#8220;help|h|?&#8217;) and &#8220;=s&#8221; to specify that you need to supply a string as parameter. When you expect multiple parameters for a switch (like the file example), you store these in an array instead of in a scalar. You retrieve the input but reading the variables (no need to dereference).</p>
<p>The &#8220;or die&#8221; bit is also interesting. Getopt::Long recognizes wrong inputs (&#8220;Unknown option:&#8221;), nevertheless it continues with the execution of the program ignoring the wrong input. I however, prefer to exit the program when this is the case. The program will exit (with a nice error message) if you invent or mistype switches. As a finishing touch, we create a proper array splitting the input on commas.</p>
<p>That&#8217;s it. Fast and easy.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nxadm.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nxadm.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=45&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/05/23/perl-tip-get-fancy-parameters-on-a-command-line-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image" />
	</item>
		<item>
		<title>An IDE for perl?</title>
		<link>http://nxadm.wordpress.com/2008/05/23/an-ide-for-perl/</link>
		<comments>http://nxadm.wordpress.com/2008/05/23/an-ide-for-perl/#comments</comments>
		<pubDate>Thu, 22 May 2008 22:37:20 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://nxadm.wordpress.com/?p=43</guid>
		<description><![CDATA[szabgab writes (aggregated on planet.perl.org) about the absence of a decent IDE for perl. To be correct, he rather acknowledges the existence of some IDEs like Eclipse + Epic or Komodo but he prefers to work with the old trusted vi + command line.
That&#8217;s fine, but like he writes in his post, some people expect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=43&subd=nxadm&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:left;"><img class="alignleft size-thumbnail wp-image-39" style="float:left;" src="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86&#038;h=96" alt="" width="86" height="96" />szabgab <a title="Open Source IDE for Perl" href="http://www.szabgab.com/blog/2008/05/1211438612.html" target="_blank">writes</a> (aggregated on <a href="http://planet.perl.org" target="_blank">planet.perl.org</a>) about the absence of a decent IDE for perl. To be correct, he rather acknowledges the existence of some IDEs like <a href="http://e-p-i-c.sf.net" target="_blank">Eclipse + Epic</a> or <a href="http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml" target="_blank">Komodo</a> but he prefers to work with the old trusted vi + command line.</p>
<p style="text-align:left;">That&#8217;s fine, but like he writes in his post, some people expect an IDE as they are used to using one while developing in other languages, specially in the Windows world. In my case, I know my way pretty well in Unix (I use it professionally and at my desktop) and vi and still, I prefer to use an IDE. Why?<span id="more-43"></span></p>
<p style="text-align:left;">Well, I&#8217;ll answer this question by giving an answer to the &#8220;survey&#8221; that szabgab proposes. I use <a href="http://e-p-i-c.sf.net" target="_blank">Eclipse + Epic</a> for perl. The following text is copy-pasted from szabgab&#8217;s post with my answer beneath each line.</p>
<p style="text-align:left;">Beginners (especially in classes) need these:</p>
<ul style="text-align:left;">
<li>Good Syntax highlighting<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Automatic syntax checking<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Bracket highlighting and bracket matching<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Code suggestion and auto-completion for perl keywords<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Showing the available parameters of keywords<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Context sensitive help on perl built-ins (including variables and constructs) and on modules<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Pod viewer<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Integrated Debugger (expression evaluation, breakpoints, watches etc.)<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Mouse over tool tips for variable contents<br />
<span style="color:#ff0000;"> → not that I know off.</span></li>
<li>Debugging: Edit and Continue support<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Jump directly to locations (editor-wise) Perl has warned or died at<br />
<span style="color:#ff0000;"> → check.</span></li>
</ul>
<p style="text-align:left;">When writing applications (the first few years) people also need these:</p>
<ul style="text-align:left;">
<li>Display subroutines in a sidebar<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Auto-completion for methods in OOP development<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Remote editing (via ftp, ssh, etc.)<br />
<span style="color:#ff0000;"> → I don&#8217;t use this, but I suppose it&#8217;s built into Eclipse. I use my own scripts executed from the IDE.</span></li>
<li>Remote debugging (when the code is actually running on another machine<br />
<span style="color:#ff0000;"> → no idea.</span></li>
<li>Integration with version control<span style="color:#ff0000;"><br />
→ great integration with subversion (the version control I use).</span></li>
<li>For web application emulation of a real Web server<br />
<span style="color:#ff0000;"> → check (however, I haven&#8217;t use this much).</span></li>
</ul>
<p style="text-align:left;">And the more advanced stuff is here:</p>
<ul style="text-align:left;">
<li>Refactoring support<br />
<span style="color:#ff0000;"> → check.</span></li>
<li>Tool to build GUI<br />
<span style="color:#ff0000;"> → None. However, I use this IDE with great results in combination with <a href="http://glade.gnome.org/">Glade</a> and <a href="http://gtk2-perl.sourceforge.net/" target="_blank">gtk2-perl</a>.<a href="http://gtk2-perl.sourceforge.net/" target="_blank"><br />
</a></span></li>
<li>Integration with unit testing<br />
<span style="color:#ff0000;"> → Not built in, but it can be added using the &#8220;External Tools&#8221; (this is how I executed scripts remotely, however when I need to edit something in place on a Unix server I use vim).</span></li>
</ul>
<p>In short, I have found a professional and complete toolset for my perl needs. It has most of the features needed for a serious IDE and even more (like RegEx engine, export to html, etc). Now that I use <a href="http://www.netbeans.org">netbeans</a> for java, the epic perl plugin is the only reason I keep eclipse installed.</p>
<p>A perl IDE <a href="http://www.perl.com/pub/a/2005/08/25/tools.html" target="_blank">dreamed</a> in the past is a reality.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nxadm.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nxadm.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nxadm.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nxadm.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nxadm.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nxadm.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nxadm.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nxadm.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nxadm.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nxadm.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nxadm.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nxadm.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nxadm.wordpress.com&blog=1467330&post=43&subd=nxadm&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nxadm.wordpress.com/2008/05/23/an-ide-for-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">claudio</media:title>
		</media:content>

		<media:content url="http://nxadm.files.wordpress.com/2008/05/perl.jpg?w=86" medium="image" />
	</item>
	</channel>
</rss>