<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Mark Allen</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/mark_allen/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/mark_allen//1135</id>
    <updated>2013-05-23T04:55:18Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Steal this for Perl hackathons</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2013/05/steal-this-for-perl-hackathons.html" />
    <id>tag:blogs.perl.org,2013:/users/mark_allen//1135.4709</id>

    <published>2013-05-23T04:41:22Z</published>
    <updated>2013-05-23T04:55:18Z</updated>

    <summary>I&apos;m at a conference in Portland this week to learn about a web framework called Symfony2 for my $DAYJOB. The Symfony2 stuff is all co-located with DrupalCon 2013 and one of the rooms across the hall from our workshop was...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p><a href="http://blogs.perl.org/users/mark_allen/assets_c/2013/05/drupal_sprint1-1277.html" onclick="window.open('http://blogs.perl.org/users/mark_allen/assets_c/2013/05/drupal_sprint1-1277.html','popup','width=600,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://blogs.perl.org/users/mark_allen/assets_c/2013/05/drupal_sprint1-thumb-300x400-1277.jpg" width="300" height="400" alt="drupal_sprint1.JPG" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></a>I'm at a conference in Portland this week to learn about a web framework called Symfony2 for my $DAYJOB.  The Symfony2 stuff is all co-located with DrupalCon 2013 and one of the rooms across the hall from our workshop was for Drupal sprints.  The sign in the picture was posted outside - and it makes it super clear that newbies are <strong>welcome</strong>, and who they should try to find to get going on a task quickly.</p>

<p>This is an idea we need to steal for Perl hackathons.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Introducing Net::EC2::Tiny</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2013/02/introducing-netec2tiny.html" />
    <id>tag:blogs.perl.org,2013:/users/mark_allen//1135.4320</id>

    <published>2013-02-13T05:23:23Z</published>
    <updated>2013-02-13T05:32:04Z</updated>

    <summary>One of the fun / cool things about Perl is that it can easily inhabit that space between &quot;too complex for bash&quot; and &quot;too insignificant to invest in a C implementation.&quot; In my opinion a lot of the command line...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>One of the fun / cool things about Perl is that it can easily inhabit that space between "too complex for bash" and "too insignificant to invest in a C implementation."  In my opinion a lot of the command line tools for EC2 are pretty terrible - they have a large learning curve, a high amount of dependencies and they just aren't that easy to get up and going.</p>

<p>So I started by thinking what was the "minimum viable product" for an EC2 client?  Something that slaps a valid v2 AWS signature on any arbitrary API request and translates the XML returned into a Perl data structure.  And that's exactly what <a href="https://metacpan.org/module/MALLEN/Net-EC2-Tiny-0.01/lib/Net/EC2/Tiny.pm">Net::EC2::Tiny</a> is.</p>

<p>In the spirit of *::Tiny modules, I tried to restrict the number of dependencies, but when I decided firmly to require HTTPS support, that locked me into IO::Socket::SSL and Net::SSLeay, so I opted to give myself a little bit of sugar and used Moo.  So there's 5 non-core dependencies.</p>

<p>Anyway, when you're in the mood for a quick (and possibly dirty) EC2 client, whip up a simple(ish) script using Net::EC2::Tiny.  It's the low learning curve glue between the raw EC2 API and Perl - perfect for those jobs which interact with EC2 in a relatively minor way.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Pod::Perldoc at 3.19_01</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2013/01/podperldoc-at-319-01.html" />
    <id>tag:blogs.perl.org,2013:/users/mark_allen//1135.4240</id>

    <published>2013-01-29T03:53:35Z</published>
    <updated>2013-01-29T04:17:22Z</updated>

    <summary>One of the things that brian d foy worked pretty hard on for Perldoc inside of 5.16 was better UTF-8 support. We found that there are a huge number of variables for getting good Unicode support out of the &quot;man&quot;...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>One of the things that brian d foy worked pretty hard on for Perldoc inside of 5.16 was better UTF-8 support.  We found that there are a huge number of variables  for getting good Unicode support out of the "man" formatting pipeline.  perldoc internally uses the "podulators" distribution to turn POD markup into man pages, HTML, XML, etc.  But with the "man" formatting, the pipeline of operations looks something like this:</p>

<p>perldoc (a tiny little wrapper around the Pod::Perldoc module) finds the appropriate pod markup (either embedded in a .pm or a .pod), passes it to Pod::Man, takes the output from Pod::Man and then invokes the "nroff" implementation (which is usually groff) and sends it to your pager (less, more, etc) where it's displayed on your screen.</p>

<p>That's a lot of places where UTF-8 can go sideways. And it usually does.</p>

<p>So it seems like one solution is to simply avoid this pipeline, using Pod::Text::Term, so I've uploaded a developer distribution of perldoc (3.19_01) to CPAN where the default formatter for POD is "Term" instead of "Man".  In my admittedly limited testing this seems to provide <strong>much better</strong> cross-platform UTF8 support when displaying documentation.</p>

<p>This is where you can help: please install the 3.19_01 distribution in a perlbrew environment and display some of your UTF8 documentation.  If there are problems, you can report them on the <a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Perldoc">RT queue</a> for the distribution.  </p>

<p>Thanks!</p>]]>
        
    </content>
</entry>

<entry>
    <title>Net::Amazon::EC2 0.22 released; supports AWS v2 signatures</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2012/10/netamazonec2-022-released-supports-aws-v2-signatures.html" />
    <id>tag:blogs.perl.org,2012:/users/mark_allen//1135.3993</id>

    <published>2012-10-26T17:12:22Z</published>
    <updated>2012-10-26T17:24:27Z</updated>

    <summary>I just released 0.22 of Net::Amazon::EC2 to CPAN which resolves RT #80407 about EC2 requiring version 2 signatures. Until today, this module had been using v1 signatures. If you use this module and start getting &quot;version mismatch errors&quot; from EC2...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>I just released 0.22 of <a href="https://metacpan.org/release/MALLEN/Net-Amazon-EC2-0.22">Net::Amazon::EC2</a> to CPAN which resolves <a href="https://rt.cpan.org/Ticket/Display.html?id=80407">RT #80407</a> about EC2 requiring version 2 signatures. </p>

<p>Until today, this module had been using v1 signatures. If you use this module and start getting "version mismatch errors" from EC2 calls, you will need to update to this version.</p>

<p>Please be aware that URI::Escape and Digest::SHA were added to the module dependencies to implement AWS v2 signatures.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Please help improve Pod::Perldoc 3.17</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2012/03/please-help-improve-podperldoc-317.html" />
    <id>tag:blogs.perl.org,2012:/users/mark_allen//1135.2957</id>

    <published>2012-03-19T15:46:37Z</published>
    <updated>2012-03-19T16:29:24Z</updated>

    <summary>Pod::Perldoc is a &quot;dual-life module&quot; that ships with Perl core, but also sits outside of it. Over the weekend, I released Pod::Perldoc 3.17 which incorporates several bug fixes and adds several new features. In the latest release we&apos;ve: Added better...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>Pod::Perldoc is a "dual-life module" that ships with Perl core, but also sits outside of it.  Over the weekend, I released <a href="https://metacpan.org/module/Pod::Perldoc">Pod::Perldoc 3.17</a> which <a href="https://github.com/mrallen1/Pod-Perldoc/blob/master/Changes">incorporates several bug fixes</a> and adds several new features.</p>

<p>In the latest release we've:</p>

<ul>
<li><p>Added better support for UTF8 in the pod -> *roff -> *roff-formatter -> pager pipeline - unfortunately a lot of UTF8 support for pod remains at the mercy of *roff-formatters. People running perl on Mac OS X, for example, will get old crufty versions of groff that do not process UTF8 input, even though Pod::Man supports UTF8 output.</p></li>
<li><p>Improved support for <code>$PAGER</code> and <code>$PERLDOCPAGER</code> definitions that expect pipelines or input redirection</p></li>
<li><p>Improved behavior of <code>-l -q</code> </p></li>
<li><p>Added two new formatter classes (ToANSI and ToTerm) which bypass many of the UTF8 problems with *roff-formatters.</p></li>
<li><p>Made it easier for downstream utilities to define their own command line arguments</p></li>
<li><p>Closed over <a href="https://rt.cpan.org/Dist/Display.html?Status=Resolved&amp;Queue=Pod-Perldoc">20 bug tickets</a> on the RT queue. Some of these bug reports were years old unfortunately.</p></li>
</ul>

<p>One area where Pod::Perldoc needs definite improvement is in a test suite. It has almost no tests, and the tests it does have are very basic.   This is an area I intend to address on an on-going basis, but in order to make the Pod::Perldoc which ships with Perl 5.16 the best it can be, I would appreciate more testing from a wider audience of installations and operating systems.</p>

<p>An easy way to do this without risk to your other perl installations is to set up a "perldoc-testing" instance of perl inside of perlbrew where you can install Pod::Perldoc 3.17 from CPAN after the fact. (<strong>Note</strong>: Pod::Perldoc now requires at least perl 5.6 due to heavy use of "3-argument" <code>open</code> in several refactorings.)</p>

<p>Bug reports, comments or questions are best directed to the <a href="http://rt.cpan.org/NoAuth/Bugs.html?Dist=Pod-Perldoc">RT queue</a>, but I will cheerfully review pull requests or <a href="https://github.com/mrallen1/Pod-Perldoc/issues">Issues</a> on the Pod::Perldoc <a href="https://github.com/mrallen1/Pod-Perldoc">github repository</a>.</p>

<p>Thanks!</p>
]]>
        

    </content>
</entry>

<entry>
    <title>DistZilla from one newb to another</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2012/02/distzilla-from-one-newb-to-another.html" />
    <id>tag:blogs.perl.org,2012:/users/mark_allen//1135.2797</id>

    <published>2012-02-10T00:16:51Z</published>
    <updated>2012-02-10T00:23:46Z</updated>

    <summary>I&apos;m giving a talk tonight at Houston.pm about Dist::Zilla. The slides from the presentation are after the cut. Also, there&apos;s a set of links about DistZilla here. The guinea pig CPAN release for this talk is a Perl binding for...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[I'm giving a talk tonight at <a href="http://houston.pm.org">Houston.pm</a> about <a href="https://metacpan.org/module/Dist::Zilla">Dist::Zilla</a>.  The slides from the presentation are after the cut.  Also, there's a set of links about DistZilla <a href="http://tinyurl.com/dziltalk">here</a>. <P><P>The guinea pig CPAN release for this talk is a Perl binding for the <a href="http://cron.io">Cron.IO</a> service.  It uses Franck Cuny's cool <a href="https://metacpan.org/module/Net::HTTP::API">Net::HTTP::API</a> library.  A complete binding in like 60 lines of code. Very cool.<P><P>]]>
        <![CDATA[<script src="http://speakerdeck.com/embed/4f336fc8574350001f00b000.js"></script>]]>
    </content>
</entry>

<entry>
    <title>Exploit Git Hub tags!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2012/01/exploit-git-hub-tags.html" />
    <id>tag:blogs.perl.org,2012:/users/mark_allen//1135.2663</id>

    <published>2012-01-10T16:41:19Z</published>
    <updated>2012-01-10T17:19:53Z</updated>

    <summary>If you put your Perl code on Git Hub, I&apos;d like to encourage you to use a a feature that isn&apos;t (at all) intuitive: tags. Basic tags in git are a human friendly label that point to a certain commit....</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tags" label="tags" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>If you put your Perl code on Git Hub, I'd like to encourage you to use a a feature that isn't (at all) intuitive: tags.</p>

<p>Basic tags in git are a human friendly label that point to a certain commit. Basic tags don't have a git object associated with them so they're mostly for use on your local repository. </p>

<p>It is also possible to create "annotated tags" which are first class git objects and point to a specific commit (as the top of a tree of commits.) Because annotated git tags are first class objects, it is possible to share them across repositories. It is these tags that I would encourage you to make if you use Git Hub.   </p>

<p>What do you get for your trouble?  When you push your tags to Git Hub, it automatically creates a ZIP and tarball download link of that tagged release.  That can be handy for a bunch of different reasons - uploading to CPAN or sharing code with people and systems without a git client to name two.  (They can also be handy if you don't want to go through <a href="http://backpan.perl.org">BackPAN</a> to find historical releases of modules.)</p>

<p>How do you make (annotated) tags?</p>

<p><code>git tag -a 'VersionString' &lt;Commit&gt;</code></p>

<p>Example (where 88df47a represents my HEAD):</p>

<p><code>git tag -a 'v1.03' 88df47a</code></p>

<p>Your $EDITOR will fire up and git will prompt you to add a tag commit message. I usually make it the same as the version string on the command line, but it could be whatever makes the most sense to you.  And because in some ways git is like perl - there's more than one right way to do this. (This is what works best for me.)</p>

<p>You can tag historical commits too. Just replace the tag string and commit reference at the end of the command line with the appropriate values. You can find historical code commits using <code>git log</code> of course.</p>

<p>To check tags, or explore someone else's tags, you can see all of the tags in a repo by typing:</p>

<p><code>git tag</code></p>

<p>Another advantage is that you can substitute a tag pretty much anywhere you need to use a commit reference.  Instead of typing <code>88df47a</code>, I can substitute <code>v1.03</code> which I think we can agree is a lot easier to remember.  (But maybe not - perl hackers' minds work in strange ways sometimes.)</p>

<p>Once you have made the tags you want, you need to push them (just like your regular code commits) using the <code>--tag</code> flag on <code>git push</code>.</p>

<p>Example:</p>

<p><code>git push origin master --tag</code></p>

<p>Assuming your origin points to Git Hub, they will take it from there. </p>

<p>P.S. If you're looking for an easy introduction to git covering 80%+ of basic source control workflow, I saw this last night on Hacker News and really liked it.  <a href="http://rogerdudler.github.com/git-guide/">So, have a look</a>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Looking for Jeff Kim</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2011/12/looking-for-jeff-kim.html" />
    <id>tag:blogs.perl.org,2011:/users/mark_allen//1135.2591</id>

    <published>2011-12-20T17:19:22Z</published>
    <updated>2011-12-20T17:24:54Z</updated>

    <summary>I&apos;m trying to contact Jeff Kim about his Net::Amazon::EC2 module. I have a repo on github that closes most of the open tickets on RT for this module. I&apos;d very much like to prepare and upload a new distribution to...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    <category term="amazonec2" label="amazon ec2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="comaintainer" label="comaintainer" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>I'm trying to contact <a href="https://metacpan.org/author/JKIM">Jeff Kim</a> about his <a href="https://metacpan.org/module/Net::Amazon::EC2">Net::Amazon::EC2</a> module.  I have a repo on <a href="https://github.com/mrallen1/net-amazon-ec2">github</a> that closes most of the open tickets on <a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Net-Amazon-EC2">RT</a> for this module. I'd very much like to prepare and upload a new distribution to CPAN and close those RT tickets.  </p>

<p>Jeff, if you see this please email me: mallen at cpan dot org.</p>

<p>Thanks.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Writing API clients in Perl and Python</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_allen/2011/12/writing-api-clients-in-perl-and-python.html" />
    <id>tag:blogs.perl.org,2011:/users/mark_allen//1135.2574</id>

    <published>2011-12-13T22:54:05Z</published>
    <updated>2011-12-13T23:14:03Z</updated>

    <summary>I recently released a couple of API clients for the Ge.tt file sharing service, one in Perl and one in Python. (I am just a fan of the service, not an employee or contractor.) I would judge myself an &quot;intermediate&quot;...</summary>
    <author>
        <name>Mark Allen</name>
        <uri>http://www.byte-me.org</uri>
    </author>
    
    <category term="apiclients" label="api clients" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pypi" label="pypi" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="python" label="python" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_allen/">
        <![CDATA[<p>I recently released a couple of API clients for the <a href="http://ge.tt">Ge.tt</a> file sharing service, one in <a href="https://metacpan.org/module/Net::API::Gett">Perl</a> and one in <a href="http://http://pypi.python.org/pypi/pygett/1.0.2">Python</a>. (I am just a fan of the service, not an employee or contractor.) I would judge myself an "intermediate" pythonista mostly due to inexperience. </p>

<p>It's a culture shock coming from a background of CPAN.  The old joke is that Perl is just a life support system for CPAN and that is arguably true, but I am here to tell you: you may not appreciate how good Perl hackers have it with respect to CPAN and the culture around documenting, packaging and testing distros once they're on CPAN.</p>

<p>It's hard for me to be neutral vis a vis Perl and Python because I am much more comfortable writing Perl, but I felt like the release process for python was really not very straightforward.  Learning how python projects write, package and release documentation took as long as writing major portions of code. And I'd take the simplicity of writing TAP vs. the inflexibility and opaqueness of the Python unittest library any day.  Finally, there's the mess of installing a python distribution with all of its dependencies.   I've heard plenty of complaining about how CPAN client X does this badly or client Y does this other thing poorly, but I felt like I was in cargo cult territory with respect to the various ways that python tools are distributed and installed.</p>

<p>But aside from being generally unfamiliar with the cultural mores of the Python world, working with Python was good for my Perl code in the sense that it really focused me on how objects within the client should interact with each other.  This isn't a knock on Perl's OO (or perceived lack of OO) capabilities, but rather a realization that I used my Perl library as a "first draft" client with the API service itself - prioritizing "it just works" over "it's elegantly constructed."</p>

<p>Now that I'm feeling pretty good about how the python library works and is written, I can go back and refactor my Perl code that much more quickly.<br />
</p>]]>
        
    </content>
</entry>

</feed>
