<?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>odyniec.net blog</title>
	<atom:link href="http://www.odyniec.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.odyniec.net/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 01 Feb 2012 05:10:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Six (Plus One) Android Apps that Make my Life Suck a bit Less</title>
		<link>http://www.odyniec.net/blog/2012/01/six-plus-one-android-apps-that-make-my-life-suck-a-bit-less/</link>
		<comments>http://www.odyniec.net/blog/2012/01/six-plus-one-android-apps-that-make-my-life-suck-a-bit-less/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 22:11:27 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=795</guid>
		<description><![CDATA[I planned to write an introductory paragrah about how everyone and their grandma now uses mobile apps, but everyone (and their grandma) already knows that. So let me jump straight to the point &#8212; here&#8217;s a list of the apps that I found essential since I got myself an Android phone about one and a [...]]]></description>
			<content:encoded><![CDATA[<p>I planned to write an introductory paragrah about how everyone and their grandma now uses mobile apps, but everyone (and their grandma) already knows that. So let me jump straight to the point &#8212; here&#8217;s a list of the apps that I found essential since I got myself an Android phone about one and a half year back.</p>
<h3>1. <a href="https://market.android.com/details?id=com.fsck.k9">K-9 Mail</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/k9mail1.png"><img class="alignleft size-full wp-image-801" title="K-9 Mail" src="http://odyniec.net/blog/wp-content/uploads/2012/01/k9mail1.png" alt="" width="62" height="62" /></a>A powerful e-mail client. Actually, it&#8217;s <em>the</em> e-mail client for your Android phone. Comes with a rich feature set that could put many desktop e-mail clients to shame. Has good support for multiple e-mail accounts, IMAP, signatures, PGP, searching &#8212; you name it. Highly recommended for everyone who wants to do some serious business with e-mail on their phone.</p>
<h3>2. <a href="https://market.android.com/details?id=mobi.beyondpod">BeyondPod</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/beyondpod.png"><img class="alignright size-full wp-image-802" title="BeyondPod" src="http://odyniec.net/blog/wp-content/uploads/2012/01/beyondpod.png" alt="" width="62" height="62" /></a>A podcatcher/player. I&#8217;ve tried quite a few, and this one is by far the best. It&#8217;s loaded with useful features, but is still maintaining a clean user interface. This app is the top reason why I&#8217;ve become a regular listener of a number of podcasts, listening every day while driving, excercising, or doing mundane house chores.</p>
<h3>3. <a href="https://market.android.com/details?id=com.headcode.ourgroceries">OurGroceries</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/ourgroceries.png"><img class="alignleft size-full wp-image-803" title="OurGroceries" src="http://odyniec.net/blog/wp-content/uploads/2012/01/ourgroceries.png" alt="" width="62" height="62" /></a>Dead simple app that aids you in putting together shopping lists. I was originally using the traditional paper and pen approach and thought that was all I&#8217;d ever need, but then I tried this app and it proved to be more effective. And, it adds that flavor of geekiness to the boring act of shopping.</p>
<h3>4. <a href="https://market.android.com/details?id=com.twitter.android">Twitter</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/twitter.png"><img class="alignright size-full wp-image-804" title="Twitter" src="http://odyniec.net/blog/wp-content/uploads/2012/01/twitter.png" alt="" width="62" height="62" /></a>The official Twitter client for Android. People used to criticize it and say that the unofficial apps are way better, but I&#8217;ve tried all of the popular ones and none of them offered anything particularly interesting to me. The official app is simple, has a clean interface, and does its job quite well.</p>
<h3>5. <a href="https://market.android.com/details?id=cgeo.geocaching">c:geo</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/cgeo.png"><img class="alignleft size-full wp-image-805" title="c:geo" src="http://odyniec.net/blog/wp-content/uploads/2012/01/cgeo.png" alt="" width="62" height="62" /></a>A great <a href="http://en.wikipedia.org/wiki/Geocaching">geocaching</a> app with lots of useful features and a nice user interface. If you want to try geocaching with your Android phone and are looking for an app, look no further and get c:geo.</p>
<h3>6. <a href="https://market.android.com/details?id=com.codecarpet.apndroid.pro">APNdroid</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/apndroid.png"><img class="alignright size-full wp-image-806" title="APNdroid" src="http://odyniec.net/blog/wp-content/uploads/2012/01/apndroid.png" alt="" width="62" height="62" /></a>A tiny app with a very specific purpose. All it does is it lets you add a button to your home screen to toggle mobile data connection on and off, making a commonly used feature accessible immediately, instead of forcing you to find it buried somewhere in the settings menu.</p>
<h3>Honorable mention: <a href="https://market.android.com/details?id=org.dodgybits.android.shuffle">Shuffle</a></h3>
<p><a href="http://odyniec.net/blog/wp-content/uploads/2012/01/shuffle.png"><img class="alignleft size-full wp-image-807" title="Shuffle" src="http://odyniec.net/blog/wp-content/uploads/2012/01/shuffle.png" alt="" width="62" height="62" /></a>A simple but effective <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a> app. I started implementing GTD a while ago when a guy I worked with told me about it, and he also recommended this app. I didn&#8217;t place it on the list, because the current version has a significant flaw &#8212; it fails to properly synchronize with Tracks, a GTD web application that I use on the desktop machine, and I can&#8217;t really use it until that bug gets fixed (hopefully, soon).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2012/01/six-plus-one-android-apps-that-make-my-life-suck-a-bit-less/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative Dancer Templating Engines</title>
		<link>http://www.odyniec.net/blog/2011/12/alternative-dancer-templating-engines/</link>
		<comments>http://www.odyniec.net/blog/2011/12/alternative-dancer-templating-engines/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 14:05:54 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=790</guid>
		<description><![CDATA[Dancer uses a simple model of interfacing with templating engines (based on Dancer::Template::Abstract) and makes it very easy to add support for new engines. Thanks to this, if you&#8217;re not happy with the default simple engine or with Template Toolkit, there is now a dozen different alternatives to choose from. Let&#8217;s take a look at [...]]]></description>
			<content:encoded><![CDATA[<p>Dancer uses a simple model of interfacing with templating engines (based on <a href="http://search.cpan.org/perldoc?Dancer::Template::Abstract">Dancer::Template::Abstract</a>) and makes it very easy to add support for new engines. Thanks to this, if you&#8217;re not happy with the default <code>simple</code> engine or with <a href="http://template-toolkit.org/index.html">Template Toolkit</a>, there is now a dozen different alternatives to choose from. Let&#8217;s take a look at some of them.</p>
<h3><a name="dancer__template__tiny" href="http://blogs.perl.org/mt/mt-static/html/editor-content.html?cs=utf-8"></a>Dancer::Template::Tiny</h3>
<p><a href="http://search.cpan.org/perldoc?Template::Tiny">Template::Tiny</a> is a lightweight engine which reimplements a subset of Template Toolkit features. As the name implies, it aims to accomplish this with as little code as possible. If you&#8217;re using just the basic functionality of Template Toolkit, you should be able to switch to Template::Tiny without any modifications to template files (and you can easily go back at any moment).</p>
<p><a href="http://search.cpan.org/perldoc?Dancer::Template::Tiny">Dancer::Template::Tiny</a> is going to replace <a href="http://search.cpan.org/perldoc?Dancer::Template::Simple">Dancer::Template::Simple</a> as the default templating engine in Dancer2.</p>
<p>Example template:</p>
<pre>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Tiny Example&lt;/title&gt;
    &lt;link rel="stylesheet" href="[% request.uri_base %]/css/style.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello, World! This is Dancer [% dancer_version %]!&lt;/h1&gt;
    &lt;p&gt;
      [% IF morning %]
        Good morning!
      [% ELSE %]
        Good afternoon!
      [% END %]
    &lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>Route handler:</p>
<pre>use DateTime;
   
get '/hello' =&gt; sub {
    template 'hello', { morning =&gt; (localtime)[2] &lt; 12, now =&gt; DateTime-&gt;now };
};</pre>
<h3><a name="dancer__template__tenjin" href="http://blogs.perl.org/mt/mt-static/html/editor-content.html?cs=utf-8"></a>Dancer::Template::Tenjin</h3>
<p><a href="http://www.kuwata-lab.com/tenjin/">Tenjin</a> is a very fast templating engine with implementations for many languages &#8212; including, of course, Perl. Its great performance comes from the fact that it uses the underlying language&#8217;s constructs to process templates, instead of defining its own templating language and having to parse it. Support for this engine in Dancer is provided by  <a href="http://search.cpan.org/perldoc?Dancer::Template::Tenjin">Dancer::Template::Tenjin</a>.</p>
<p>Example template:</p>
<pre>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Tenjin Example&lt;/title&gt;
    &lt;link rel="stylesheet" href="[== $request-&gt;uri_base =]/css/style.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Hello, World! This is Dancer [= $dancer_version =]!&lt;/h1&gt;
    &lt;p&gt;
      &lt;?pl if ((localtime)[2] &lt; 12) { ?&gt;
        Good morning!
      &lt;?pl } else { ?&gt;
        Good afternoon!
      &lt;?pl } ?&gt;
    &lt;/p&gt;
    &lt;p&gt;
      Current time is: [== DateTime-&gt;now-&gt;hms =]
    &lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre>
<p>Route handler:</p>
<pre>use DateTime;
   
get '/hello' =&gt; sub {
    template 'hello';
};</pre>
<h3><a name="dancer__template__haml" href="http://blogs.perl.org/mt/mt-static/html/editor-content.html?cs=utf-8"></a>Dancer::Template::Haml</h3>
<p><a href="http://haml-lang.com/">Haml</a>, which stands for &#8220;HTML Abstraction Markup Language&#8221;, brings a fresh, different approach to templating. It aims at making templates short, clean, and as easy to read as well-formatted source code. <a href="http://search.cpan.org/perldoc?Dancer::Template::Haml">Dancer::Template::Haml</a> is a wrapper around <a href="http://search.cpan.org/perldoc?Text::Haml">Text::Haml</a> and lets you use Haml templates in Dancer applications.</p>
<p>Example template:</p>
<pre>%html
  %head
    %title Haml Example
    %link(rel="stylesheet" href="#{$request-&gt;uri_base}/css/style.css")
  %body
    %h1 Hello, World! This is Dancer #{$dancer_version}!
    %p
      - if ((localtime)[2] &lt; 12) {
        Good morning!
      - } else {
        Good afternoon!
      - }
    %p Current time is: #{DateTime-&gt;now-&gt;hms}</pre>
<p>Route handler:</p>
<pre>use DateTime;
   
get '/hello' =&gt; sub {
    template 'hello';
};</pre>
<h3><a name="more" href="http://blogs.perl.org/mt/mt-static/html/editor-content.html?cs=utf-8"></a>More</h3>
<p>There are many more interesting templating engines ready to be used with Dancer, such as <a href="http://www.masonhq.com/">Mason</a> (provided by <a href="http://search.cpan.org/perldoc?Dancer::Template::Mason">Dancer::Template::Mason</a>) or <a href="http://xslate.org/">Xslate</a> (<a href="http://search.cpan.org/perldoc?Dancer::Template::Xslate">Dancer::Template::Xslate</a>). Do a <a href="http://search.cpan.org/">CPAN</a> or <a href="https://metacpan.org/">MetaCPAN</a> search for &#8220;dancer template&#8221; to get a list of all the available engines, and choose the one that suits you best. In the true spirit of Perl, there&#8217;s more than one way to write a template!</p>
<p><em>This post was <a href="http://advent.perldancer.org/2011/18">originally published</a> as part of the <a href="http://advent.perldancer.org/2011">2011 Dancer Advent Calendar</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/12/alternative-dancer-templating-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serving Files with Dancer::Plugin::DirectoryView and Dancer::Plugin::Auth::Htpasswd</title>
		<link>http://www.odyniec.net/blog/2011/12/serving-files-with-dancer-plugin-directoryview-and-dancer-plugin-auth-htpasswd/</link>
		<comments>http://www.odyniec.net/blog/2011/12/serving-files-with-dancer-plugin-directoryview-and-dancer-plugin-auth-htpasswd/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 22:15:22 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=779</guid>
		<description><![CDATA[A while ago I was converting a simple PHP website to Dancer, and moving it from being deployed on Apache to Starman. There wasn&#8217;t a lot of code, so rewriting went quickly &#8212; but, the site used a few specific features of Apache, namely directory indexes (courtesy of mod_autoindex) to allow user access to directories/files [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>A while ago I was converting a simple PHP website to Dancer, and moving it from being deployed on Apache to Starman. There wasn&#8217;t a lot of code, so rewriting went quickly &#8212; but, the site used a few specific features of Apache, namely directory indexes (courtesy of <a href="http://search.cpan.org/perldoc?http%3A#%2Fhttpd.apache.org%2Fdocs%2Fcurrent%2Fmod%2Fmod_autoindex.html">mod_autoindex</a>) to allow user access to directories/files on the server, and <code>htpasswd</code> files to password-protect some of those directories.</p>
<p>I could just deploy the new Dancer website on Apache and keep using those goodies, but I thought that it would be nice if Dancer itself provided similar features. So, I created two plugins that do just that: <a href="http://search.cpan.org/perldoc?Dancer%3A%3APlugin%3A%3ADirectoryView">Dancer::Plugin::DirectoryView</a> and <a href="http://search.cpan.org/perldoc?Dancer%3A%3APlugin%3A%3AAuth%3A%3AHtpasswd">Dancer::Plugin::Auth::Htpasswd</a>. Let me now show you how to use them.</p>
<h3>Directory Indexes</h3>
<p>Let&#8217;s say we have a <code>files</code> directory under <code>public</code>, and we&#8217;d like to allow users to browse it and download files. Enabling directory access is as simple as including the plugin in our Dancer application:</p>
<pre class="brush: perl; title: ; notranslate">      package MyWebApp;

      ...

      use Dancer::Plugin::DirectoryView;</pre>
<p>And updating the configuration file (<code>config.yml</code>) to tell the plugin which directory should be made available, and at which URL:</p>
<pre class="brush: jscript; title: ; notranslate">      plugins:
          DirectoryView:
              url: /pub
              root_dir: files</pre>
<p>That&#8217;s it &#8212; now, if we launch our app and point the browser at the <code>/pub</code> URL, we&#8217;ll see the contents of the directory:</p>
<p><img class="aligncenter size-full wp-image-780" title="Browsing the /pub directory" src="http://odyniec.net/blog/wp-content/uploads/2011/12/screenshot-1-590.png" alt="" width="590" height="231" /></p>
<h3>Protecting Directories with Htpasswd Files</h3>
<p>As you might have noticed on the screenshot, there&#8217;s a <code>secret</code> directory under <code>files</code>.  It contains some super secret data that should only be available to  authorized users, so now we&#8217;re going to protect it using a <code>htpasswd</code> file.</p>
<p>First, let&#8217;s create the <code>htpasswd</code> file and an user, named &#8220;alice&#8221;:</p>
<pre>      $ htpasswd -c htpasswd alice</pre>
<p>Once it is created, we need to put the <code>htpasswd</code> file in a safe location outside of the public directory, so let&#8217;s create a new directory <code>passwd</code> and store the file in there.</p>
<p>(If you&#8217;re migrating from Apache and already have the <code>htpasswd</code> file, you just need to copy it to your Dancer application.)</p>
<p>In our Dancer application, we include the Auth::Htpasswd plugin:</p>
<pre class="brush: perl; title: ; notranslate">      package MyWebApp;

      ...

      use Dancer::Plugin::Auth::Htpasswd;</pre>
<p>Now, we need to update our configuration file and add settings for the plugin. We&#8217;ll tell it to protect the <code>/pub/secret</code> path, and to use the <code>htpasswd</code> file we just created:</p>
<pre class="brush: jscript; title: ; notranslate">      plugins:
         &quot;Auth::Htpasswd&quot;:
             paths:
                 &quot;/pub/secret&quot;:
                     realm: &quot;Secret Files&quot;
                     passwd_file: passwd/htpasswd</pre>
<p>The <code>realm</code> parameter lets us set the text that will be shown to the user in the login window displayed by the browser.</p>
<p>Let&#8217;s see if our protection works. We restart the application and try to access the <code>/pub/secret/</code> URL:</p>
<p><img class="aligncenter size-full wp-image-781" title="Browser authentication dialog" src="http://odyniec.net/blog/wp-content/uploads/2011/12/screenshot-2-590.png" alt="" width="590" height="137" /></p>
<p>Great, our confidential files are safe. Only when we log in as &#8220;Alice&#8221;, we&#8217;ll be able to access them:</p>
<p><img class="aligncenter size-full wp-image-782" title="Browsing the /pub/secret directory" src="http://odyniec.net/blog/wp-content/uploads/2011/12/screenshot-3-590.png" alt="" width="590" height="231" /></p>
<p><em>This post was <a href="http://advent.perldancer.org/2011/13">originally published</a> as part of the <a href="http://advent.perldancer.org/2011">2011 Dancer Advent Calendar</a>.</em></div>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/12/serving-files-with-dancer-plugin-directoryview-and-dancer-plugin-auth-htpasswd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub-friendly README files with ExtUtils::MakeMaker and Module::Build</title>
		<link>http://www.odyniec.net/blog/2011/11/github-friendly-readme-files-with-extutils-makemaker-and-module-build/</link>
		<comments>http://www.odyniec.net/blog/2011/11/github-friendly-readme-files-with-extutils-makemaker-and-module-build/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 22:41:49 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=762</guid>
		<description><![CDATA[GitHub is a great place to host open-source projects and expose them to a wide community of developers, so it&#8217;s not surprising that more and more Perl modules are making it their home. One of the features of GitHub is that it checks if a repository has a README file in its root directory, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/">GitHub</a> is a great place to host open-source projects and expose them to a wide community of developers, so it&#8217;s not surprising that more and more Perl modules are making it their home.</p>
<p>One of the features of GitHub is that it checks if a repository has a <code>README</code> file in its root directory, and displays it on the home page of the repository. This makes the <code>README</code> file a good place to introduce your project to the public.</p>
<p>GitHub also understands a number of markup languages, such as <a href="http://daringfireball.net/projects/markdown/">Markdown</a> and <a href="http://www.textism.com/tools/textile/">Textile</a>, and if the <code>README</code> file is in one of these formats, it will be transformed into nicely formatted HTML. One of the supported formats is <a href="http://perldoc.perl.org/perlpod.html">POD</a>, which means that the standard documentation of a Perl module can be used as its <code>README</code> file and serve as the repository&#8217;s home page (much like on <a href="http://www.cpan.org/">CPAN</a>).</p>
<p><a href="http://search.cpan.org/dist/Module-Starter/">Module::Starter</a>, which is <a href="http://perldoc.perl.org/perlnewmod.html#Step-by-step:-Making-the-module">Perl&#8217;s recommended tool for building modules</a>, does not create a GitHub-friendly <code>README</code> file &#8212; instead, the README that it produces contains installation instructions (the <code>"perl Makefile.PL; make..."</code> mantra) and a couple links to module resources. This means that if you want to have a GitHub-friendly <code>README</code> file in your module, you need to either create it yourself, or tweak your build script a bit to have it generate it for you automatically.</p>
<p>This article wouldn&#8217;t be particularly interesting if I told you to now go and make the <code>README</code> file yourself, would it? So let me show you how to do this automatically with <a href="http://search.cpan.org/perldoc?ExtUtils::MakeMaker">ExtUtils::MakeMaker</a> and <a href="http://search.cpan.org/perldoc?Module::Build">Module::Build</a> based modules (generated with Module::Starter). I will demonstrate how to create two <code>README</code> files: one being the POD version (named <code>README.pod</code>), the other one plain text (named just <code>README</code>).</p>
<h3>ExtUtils::MakeMaker</h3>
<p>Since ExtUtils::MakeMaker creates a <code>Makefile</code> with shell commands, you can tell it to generate the README files using two core Perl command-line utilities: <a href="http://perldoc.perl.org/perldoc.html">perldoc</a> (to generate POD from module&#8217;s source) and <a href="http://perldoc.perl.org/pod2text.html">pod2text</a> (to convert POD into plain text). Extend <code>Makefile.PL</code> by adding the shell commands as the <code>PREOP</code> attribute of the dist target configuration:</p>
<pre class="brush: perl; title: ; notranslate">my $preop =
    'perldoc -uT $(VERSION_FROM) | tee $(DISTVNAME)/README.pod &gt; README.pod;' .
    'pod2text README.pod | tee $(DISTVNAME)/README &gt; README';

WriteMakefile(
    NAME                =&gt; 'Foo::Bar',
    AUTHOR              =&gt; q{Michal Wojciechowski &lt;odyniec@cpan.org&gt;},
    VERSION_FROM        =&gt; 'lib/Foo/Bar.pm',
    ABSTRACT_FROM       =&gt; 'lib/Foo/Bar.pm',
    ($ExtUtils::MakeMaker::VERSION &gt;= 6.3002
      ? ('LICENSE'=&gt; 'perl')
      : ()),
    PL_FILES            =&gt; {},
    PREREQ_PM =&gt; {
        'Test::More' =&gt; 0,
    },
    dist                =&gt; {
        COMPRESS =&gt; 'gzip -9f',
        SUFFIX =&gt; 'gz',
        PREOP =&gt; $preop,
    },
    clean               =&gt; { FILES =&gt; 'Foo-Bar-*' },
);</pre>
<p>Now, when you run <code>perl Makefile.PL</code> and <code>make dist</code>, the two <code>README</code> files will be created for you.</p>
<p>Don&#8217;t worry if running <code>make dist</code> produces warnings that <code>README</code> and <code>README.pod</code> are missing &#8212; it&#8217;s no big deal, as the warnings will only be seen by you when making a distribution package, and not by the user building the module.</p>
<h3>Module::Build</h3>
<p>Module::Build defines a <code>docs</code> action, and it&#8217;s the appropriate place for the code that builds the <code>README</code> files. Two modules that you can use for this purpose are <a href="http://search.cpan.org/perldoc?Pod%3A%3ASelect">Pod::Select</a> and <a href="http://search.cpan.org/perldoc?Pod%3A%3AReadme">Pod::Readme</a>. In your <code>Build.PL</code> file, create a subclass of Module::Build, and define a subroutine named <code>ACTION_docs</code>, similar to the one shown below:</p>
<pre class="brush: perl; title: ; notranslate">my $class = Module::Build-&gt;subclass(
    class =&gt; 'My::Builder',
    code =&gt; q{
        sub ACTION_docs {
            use Pod::Readme;
            use Pod::Select;

            my $self = shift;

            podselect({ -output =&gt; 'README.pod' },
                'lib/Foo/Bar.pm');

            my $parser = Pod::Readme-&gt;new();
            $parser-&gt;parse_from_file('README.pod', 'README');

            return $self-&gt;SUPER::ACTION_docs;
        }
    }
);

my $builder = $class-&gt;new(
    module_name         =&gt; 'Foo::Bar',
    license             =&gt; 'perl',
    dist_author         =&gt; q{Michal Wojciechowski &lt;odyniec@cpan.org&gt;},
    dist_version_from   =&gt; 'lib/Foo/Bar.pm',
    requires =&gt; {
        ...
    },
    configure_requires =&gt; {
        'Pod::Readme' =&gt; 0,
        'Pod::Select' =&gt; 0,
    },
    build_requires =&gt; {
        'Pod::Readme' =&gt; 0,
        'Pod::Select' =&gt; 0,
        'Test::More' =&gt; 0,
    },
    add_to_cleanup      =&gt; [ 'Foo-Bar-*' ],
    create_makefile_pl =&gt; 'traditional',
);

$builder-&gt;create_build_script();</pre>
<p>You can now run <code>perl Build.PL</code>, and then <code>./Build docs</code>, to build the <code>README</code> files.</p>
<p>Remember to add the Pod::Select and Pod::Readme modules to <code>configure_requires</code> and <code>build_requires</code>, as shown in the above example.</p>
<h3>Installation instructions</h3>
<p>Since these methods overwrite the original README file provided by Module::Starter, the installation instructions in it are also lost. It&#8217;s a good practice to always include installation instructions, so go ahead and add an INSTALL file to your module&#8217;s distribution files. It can be really simple and straight to the point:</p>
<pre class="brush: plain; title: ; notranslate">Foo-Bar

INSTALLATION

To install this module, run the following commands:

    perl Build.PL
    ./Build
    ./Build test
    ./Build install</pre>
<p>Finally, remember to add <code>README.pod</code> and <code>INSTALL</code> to your module&#8217;s <code>MANIFEST</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/11/github-friendly-readme-files-with-extutils-makemaker-and-module-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Busy Busy Me</title>
		<link>http://www.odyniec.net/blog/2011/10/busy-busy-me/</link>
		<comments>http://www.odyniec.net/blog/2011/10/busy-busy-me/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 22:49:18 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=759</guid>
		<description><![CDATA[Things have been slow with my projects in the past few weeks, and that&#8217;s because most of my time is now consumed by dayjob. I&#8217;m currently working on two part-time contracts, one being a telecommute Perl job for a client in London, the other one an enterprisey Java web project here in Warsaw. This translates [...]]]></description>
			<content:encoded><![CDATA[<p>Things have been slow with my projects in the past few weeks, and that&#8217;s because most of my time is now consumed by dayjob. I&#8217;m currently working on two part-time contracts, one being a telecommute Perl job for a client in London, the other one an enterprisey Java web project here in Warsaw. This translates to roughly 11-12 hours of work a day, and while I&#8217;m used to working this many hours, there&#8217;s obviously not much time left for other things.</p>
<p>I hope things will settle down a bit in the next couple of days (especially with the Java project, which should go out of the hot initiation phase it&#8217;s currently in), and I&#8217;ll have more time for my stuff &#8212; especially that I have a lot of updates planned for my jQuery plugins and CPAN modules. For now, I&#8217;m trying to squeeze out a few hours every week to at least do some minor updates. So yesterday, I managed to push out a new release of <a href="http://search.cpan.org/~odyniec/Dancer-Plugin-DirectoryView/">Dancer::Plugin::DirectoryView</a>.</p>
<p>Apologies to everyone who contacted me by e-mail (or other means) and didn&#8217;t get a reply, I promise in the next few days I&#8217;ll go through my mailbox and respond to any unanswered messages. As a general rule: if you don&#8217;t get a response from me in a day or two, feel free to write me again &#8212; it usually works.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/10/busy-busy-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::Auth::Htpasswd</title>
		<link>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-htpasswd/</link>
		<comments>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-htpasswd/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:50:51 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=754</guid>
		<description><![CDATA[I have developed a new Dancer plugin based on the recently-released Dancer::Plugin::Auth::Basic. The new one is called Dancer::Plugin::Auth::Htpasswd, and it serves the same purpose as Auth::Basic, which is adding basic HTTP authentication to a Dancer web app &#8212; the difference is that Auth::Htpasswd does this using Apache-style htpasswd files. The plugin might be useful if [...]]]></description>
			<content:encoded><![CDATA[<p>I have developed a new <a href="http://perldancer.org/">Dancer</a> plugin based on the <a title="Dancer::Plugin::Auth::Basic" href="http://odyniec.net/blog/2011/10/dancer-plugin-auth-basic/">recently-released Dancer::Plugin::Auth::Basic</a>. The new one is called Dancer::Plugin::Auth::Htpasswd, and it serves the same purpose as Auth::Basic, which is adding basic HTTP authentication to a Dancer web app &#8212; the difference is that Auth::Htpasswd does this using <a href="http://httpd.apache.org/docs/current/programs/htpasswd.html">Apache-style htpasswd files</a>.</p>
<p>The plugin might be useful if you&#8217;re migrating a web application from Apache to a different HTTP server and want to keep using the same htpasswd files, or if you don&#8217;t want to keep passwords written in plain text in configuration (as it is with Auth::Basic).</p>
<p>Get the plugin <a href="http://search.cpan.org/~odyniec/Dancer-Plugin-Auth-Htpasswd/">on CPAN</a> and <a href="https://github.com/odyniec/Dancer-Plugin-Auth-Htpasswd/">on Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-htpasswd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::Auth::Basic</title>
		<link>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-basic/</link>
		<comments>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-basic/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 22:34:44 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=742</guid>
		<description><![CDATA[Yesterday, I released a YADP (Yet Another Dancer Plugin). It&#8217;s called Dancer::Plugin::Auth::Basic, and it adds support for basic HTTP authentication in Dancer apps. It&#8217;s a side effect of my work on a project that needed a simple access restriction mechanism &#8212; I thought it would be nice to have a HTTP authentication solution for Dancer [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I released a YADP (Yet Another <a href="http://perldancer.org/">Dancer</a> Plugin). It&#8217;s called Dancer::Plugin::Auth::Basic, and it adds support for basic HTTP authentication in Dancer apps. It&#8217;s a side effect of my work on a project that needed a simple access restriction mechanism &#8212; I thought it would be nice to have a HTTP authentication solution for Dancer which is easy to use and universal (meaning it does not rely on <a href="http://plackperl.org/">Plack</a> or <code>.htaccess</code>/<code>htpasswd</code> files).</p>
<p>Here&#8217;s a simple usage example &#8212; a fragment of Dancer configuration which restricts access to a specific path (<code>/restricted</code>):</p>
<pre class="brush: jscript; title: ; notranslate">plugins:
  &quot;Auth::Basic&quot;:
    paths:
      &quot;/restricted&quot;:
        realm: Restricted zone
        user: fmulder
        password: trustno1</pre>
<p>And that&#8217;s it. If you&#8217;d like to try the plugin in your app, it&#8217;s up <a href="http://search.cpan.org/~odyniec/Dancer-Plugin-Auth-Basic/">on CPAN</a> and <a href="https://github.com/odyniec/Dancer-Plugin-Auth-Basic/">on Github</a>.</p>
<p>This plugin also happens to be the first CPAN module that I&#8217;ve built using <a href="http://search.cpan.org/~dagolden/Module-Build/">Module::Build</a>, instead of the rusty <a href="http://search.cpan.org/~mschwern/ExtUtils-MakeMaker/">ExtUtils::MakeMaker</a>. I&#8217;ve had no problems switching, the only thing that was a bit troublesome was creating a <code>README.pod</code> file (which is a good thing to have if you&#8217;re publishing your module on Github), but I managed to do that eventually.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/10/dancer-plugin-auth-basic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ImgZoom 0.2.2</title>
		<link>http://www.odyniec.net/blog/2011/09/imgzoom-0-2-2/</link>
		<comments>http://www.odyniec.net/blog/2011/09/imgzoom-0-2-2/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 20:08:06 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[imgZoom]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=737</guid>
		<description><![CDATA[I have finally found some time to get back to working on my jQuery plugins and implement some of the long-delayed updates. The first plugin to receive this treatment is imgZoom &#8212; I have just released a new version of it (available here and on jQuery plugins). This latest release adds two new options: remove, [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally found some time to get back to working on my jQuery plugins and implement some of the long-delayed updates. The first plugin to receive this treatment is <a href="http://odyniec.net/projects/imgzoom/">imgZoom</a> &#8212; I have just released a new version of it (available here and <a href="http://plugins.jquery.com/project/imgZoom">on jQuery plugins</a>).</p>
<p>This latest release adds two new options: <code>remove</code>, which (to no surprise) removes the plugin, and <code>group</code>, which allows you to organize images into groups with separate prev/next navigation. It also introduces a callback function, <code>onInit</code>, allowing you to execute a piece of code when plugin initialization is completed.</p>
<p>As always, big thanks to everyone who provided feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/09/imgzoom-0-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::Preprocess::Sass</title>
		<link>http://www.odyniec.net/blog/2011/09/dancer-plugin-preprocess-sass/</link>
		<comments>http://www.odyniec.net/blog/2011/09/dancer-plugin-preprocess-sass/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 18:05:18 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=732</guid>
		<description><![CDATA[Are you tired of writing boring old CSS code in your Dancer application? Do you admire the simplicity and power of Sass? Would you like to integrate Sass into your web application using Plack::Middleware::File::Sass, but you have difficulty getting it to work, or your application is not running on Plack? We&#8217;re introducing the great Dancer::Plugin::Preprocess::Sass, [...]]]></description>
			<content:encoded><![CDATA[<p>Are you tired of writing boring old CSS code in your <a href="http://perldancer.org/">Dancer</a> application?</p>
<p>Do you admire the simplicity and power of <a href="http://sass-lang.com/">Sass</a>?</p>
<p>Would you like to integrate Sass into your web application using <a href="http://search.cpan.org/~miyagawa/Plack-Middleware-File-Sass/">Plack::Middleware::File::Sass</a>, but you have difficulty getting it to work, or your application is not running on Plack?</p>
<p>We&#8217;re introducing the great <strong>Dancer::Plugin::Preprocess::Sass</strong>, which allows you to use Sass files in your Dancer application, and have them converted into CSS ON-THE-FLY! What&#8217;s more, the generated CSS files can then be AUTOMATICALLY saved and served as static files, saving you CPU cycles AND money!</p>
<p><img class="aligncenter size-full wp-image-733" title="As seen on TV" src="http://odyniec.net/blog/wp-content/uploads/2011/09/As_seen_on_TV.png" alt="As seen on TV" width="200" height="156" /></p>
<p>CALL the number on your screen and ORDER YOURS TODAY FOR JUST $29.99!</p>
<p>CALL <strong>NOW</strong> and you&#8217;ll get 10 EXAMPLE SASS FILES that you can use in your application ABSOLUTELY FREE!</p>
<p>Ok, but seriously, the plugin is available <a href="http://search.cpan.org/~odyniec/Dancer-Plugin-Preprocess-Sass/">on CPAN</a> and <a href="https://github.com/odyniec/Dancer-Plugin-Preprocess-Sass">on GitHub</a>. And it&#8217;s not $29.99, it&#8217;s free.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/09/dancer-plugin-preprocess-sass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dancer::Plugin::DebugToolbar 0.016</title>
		<link>http://www.odyniec.net/blog/2011/09/dancer-plugin-debugtoolbar-0-016/</link>
		<comments>http://www.odyniec.net/blog/2011/09/dancer-plugin-debugtoolbar-0-016/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 18:26:16 +0000</pubDate>
		<dc:creator>Michal Wojciechowski</dc:creator>
				<category><![CDATA[Dancer]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://odyniec.net/blog/?p=726</guid>
		<description><![CDATA[I have just released a new version of Dancer::Plugin::DebugToolbar, the debugging toolbar for Dancer web applications. This version introduces a new screen which displays the templates rendered by the application and lets you inspect the data passed to them. Here&#8217;s an example of this screen: This release also introduces a few performance improvements and fixes [...]]]></description>
			<content:encoded><![CDATA[<p>I have just released a new version of Dancer::Plugin::DebugToolbar, the debugging toolbar for <a href="http://perldancer.org/">Dancer</a> web applications. This version introduces a new screen which displays the templates rendered by the application and lets you inspect the data passed to them. Here&#8217;s an example of this screen:</p>
<p><img class="aligncenter size-full wp-image-727" title="Templates screen" src="http://odyniec.net/blog/wp-content/uploads/2011/09/templates.png" alt="Templates screen" width="700" height="334" /></p>
<p>This release also introduces a few performance improvements and fixes a couple minor bugs.</p>
<p>As usual, you can get the plugin on <a href="http://search.cpan.org/~odyniec/Dancer-Plugin-DebugToolbar/">CPAN</a> and on <a href="https://github.com/odyniec/Dancer-Plugin-DebugToolbar">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.odyniec.net/blog/2011/09/dancer-plugin-debugtoolbar-0-016/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching using disk

Served from: www.odyniec.net @ 2012-02-04 04:35:05 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk (enhanced)
Cache key:          blog/feed/_index.html
Caching:            enabled
Status:             not cached
Creation Time:      0.695s
Header info:
X-Pingback:         http://www.odyniec.net/blog/xmlrpc.php
ETag:               "c16dbb017d651ac7df9d43fd41f7323b"
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Sat, 04 Feb 2012 03:35:05 GMT
Vary:               Cookie
X-Powered-By:       W3 Total Cache/0.9.2.3
-->
