<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Oliver Gorwits</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/oliver_gorwits/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/oliver_gorwits//140</id>
    <updated>2013-03-07T21:44:14Z</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>Thames Valley Perl Mongers are Meeting!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2013/03/thames-valley-perl-mongers-are-meeting.html" />
    <id>tag:blogs.perl.org,2013:/users/oliver_gorwits//140.4399</id>

    <published>2013-03-07T21:29:10Z</published>
    <updated>2013-03-07T21:44:14Z</updated>

    <summary>A couple of weeks ago I asked for a show of hands to gather interest in restarting the Thames Valley Perl Mongers. The positive response we received is an encouraging sign that TVPMs are still out there (at least 30 of you) and interested in meeting up! The meeting will be held on Wednesday 20th March at 7pm, and for this first occasion we hope to have two talks with a short break. The venue is Reading Enterprise Centre on the University of Reading main campus. Refreshments and light snacks will kindly be provided on the evening by our hosts, Opsview: http://www.readingenterprisecentre.com/#/location http://www.opsview.com/ Please confirm your interest in attending by dropping a note to peter.finnan@opsview.com, including your full name (required for access to the building). If you wish to volunteer a talk of up to 25 minutes, please also provide a summary and the title. I also urge you to join our mailing list to keep up to date with this and future plans: http://mail.pm.org/mailman/listinfo/thamesvalley-pm Looking forward to seeing you on the 20th!...</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>A couple of weeks ago I asked for a show of hands to gather interest in restarting the Thames Valley Perl Mongers. The positive response we received is an encouraging sign that TVPMs are still out there (at least 30 of you) and interested in meeting up!</p>

<p>The meeting will be held on <strong>Wednesday 20th March</strong> at <strong>7pm</strong>, and for this first occasion we hope to have two talks with a short break.</p>

<p>The venue is Reading Enterprise Centre on the University of Reading main campus. Refreshments and light snacks will kindly be provided on the evening by our hosts, Opsview:</p>

<p><a href="http://www.readingenterprisecentre.com/#/location">http://www.readingenterprisecentre.com/#/location</a><br />
<a href="http://www.opsview.com/">http://www.opsview.com/</a></p>

<p>Please confirm your interest in attending by dropping a note to <a href="mailto:peter.finnan@opsview.com">peter.finnan@opsview.com</a>, including your <strong>full name</strong> (required for access to the building). <em>If you wish to volunteer a talk of up to 25 minutes, please also provide a summary and the title</em>.</p>

<p>I also urge you to join our mailing list to keep up to date with this and future plans:</p>

<p><a href="http://mail.pm.org/mailman/listinfo/thamesvalley-pm">http://mail.pm.org/mailman/listinfo/thamesvalley-pm</a></p>

<p>Looking forward to seeing you on the 20th!</p>]]>
        
    </content>
</entry>

<entry>
    <title>Thames Valley Perl Mongers</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2013/02/thames-valley-perl-mongers.html" />
    <id>tag:blogs.perl.org,2013:/users/oliver_gorwits//140.4355</id>

    <published>2013-02-19T21:08:02Z</published>
    <updated>2013-02-19T21:31:00Z</updated>

    <summary>After being dormant for longer than I can remember, the Thames Valley Perl Mongers mail list woke up recently when someone[1] offered to host a meeting. I&apos;ve put together a very short survey to work out how many might be interested. If you live in this corner of the UK and/or fancy coming along, please let us know: http://www.surveymonkey.com/s/QNPF2V8 [1] the offer comes from Opsview, a company based at the University of Reading campus who use Perl in their main product (and might be scouting for employees). Drop a note to oliver at cpan dot org if you have any questions. Many thanks!...</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>After being dormant for longer than I can remember, the <a href="http://mail.pm.org/mailman/listinfo/thamesvalley-pm" target="_blank">Thames Valley Perl Mongers mail list</a> woke up recently when someone[1] offered to host a meeting.</p>

<p>I've put together a very short survey to work out how many might be interested. If you live in this corner of the UK and/or fancy coming along, please let us know:</p>

<p><a href="http://www.surveymonkey.com/s/QNPF2V8" target="_blank">http://www.surveymonkey.com/s/QNPF2V8</a></p>

<p>[1] the offer comes from <a href="http://www.opsview.com/" target="_blank">Opsview</a>, a company based at the University of Reading campus who use Perl in their main product (and might be scouting for employees).</p>

<p>Drop a note to oliver at cpan dot org if you have any questions. Many thanks!</p>]]>
        
    </content>
</entry>

<entry>
    <title>A (very) short list of Dist::Zilla tips</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/11/a-very-short-list-of-distzilla-tips.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.2488</id>

    <published>2011-11-24T21:43:41Z</published>
    <updated>2011-11-24T22:02:16Z</updated>

    <summary>For App::fooapp type distributions then you might want the README etc generated from a specific file. Add this to dist.ini: main_module = bin/fooapp ; btw, semicolon leads a comment, in case you forgot how to do that Any Module::Install converts reading this should note the bin directory, not script. In bin/fooapp itself you also provide an additional metadata hint (next to ABSTRACT): # PODNAME: fooapp Which results in nifty Metacpan links such as: https://metacpan.org/module/nfflowd Finally this hint to the POD munger will allow a section to be pinned in place above the SYNOPSIS: =begin :prelude # POD here... =end :prelude I hope these tips are helpful to some&#8230;...</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>For App::fooapp type distributions then you might want the README etc generated from a specific file. Add this to <code>dist.ini</code>:</p>

<pre><code>main_module = bin/fooapp
; btw, semicolon leads a comment, in case you forgot how to do that
</code></pre>

<p>Any Module::Install converts reading this should note the <code>bin</code> directory, not <code>script</code>.</p>

<p>In <code>bin/fooapp</code> itself you also provide an additional metadata hint (next to ABSTRACT):</p>

<pre><code># PODNAME: fooapp
</code></pre>

<p>Which results in nifty Metacpan links such as:</p>

<ul>
<li><a href="https://metacpan.org/module/nfflowd">https://metacpan.org/module/nfflowd</a></li>
</ul>

<p>Finally this hint to the POD munger will allow a section to be pinned in place <em>above</em> the SYNOPSIS:</p>

<pre><code>=begin :prelude

# POD here...

=end :prelude
</code></pre>

<p>I hope these tips are helpful to some&#8230;</p>
]]>
        

    </content>
</entry>

<entry>
    <title>AutoCRUD revamped</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/10/autocrud-revamped.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.2305</id>

    <published>2011-10-17T20:47:54Z</published>
    <updated>2011-10-17T21:32:05Z</updated>

    <summary>For a couple of years I&#8217;ve been planning to rip apart and put back together the guts of Catalyst::Plugin::AutoCRUD, to address limitations in the initial implementation. After changing job and moving house I&#8217;m pleased this finally came to the top of my hacking stack. Nothing was going to happen however before I could work out how to do one thing: achieve independence from DBIx::Class as a &#8220;storage engine&#8221;. I love DBIx::Class, but it would be much more cool to support any data storage system able to represent a table+column paradigm (even things like CSV, as a test case). So SQL::Translator hit me like a thunderbolt. Of course, that&#8217;s exactly what it does - introspect some data storage and provide a neutral, class-based representation of the tables and columns (fields). It&#8217;s a little rough around the edges, but certainly good enough. The Translator provides a metadata structure which AutoCRUD&#8217;s web front-end can use, independent of any particular storage engine such as DBIx::Class. This also paves the way for development of display engines other than the bundled ExtJS and simple HTML offerings. Right now there&#8217;s a developer release of AutoCRUD on CPAN, and I hope shortly to have a production release. Whilst the web side might not look much different, the fact is that it can now support significant features such as tables with composite/compound primary keys, or no primary keys for that matter, database views, relations to self, multiple relations to the same table, and so on. Alongside that, I&#8217;ve taken the opportunity to fix a few quirks of the web interface, and chomp my way through the outstanding wishlist. The updated code is now running on a DotCloud instance, so please go and have a play! http://demo.autocrud.pl p.s. a cron job will restore the demo&#8217;s databases at the top of every hour...</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>For a couple of years I&#8217;ve been planning to rip apart and put back together the guts of <a href="https://metacpan.org/module/Catalyst::Plugin::AutoCRUD">Catalyst::Plugin::AutoCRUD</a>, to address limitations in the initial implementation. After changing job and moving house I&#8217;m pleased this finally came to the top of my hacking stack.</p>

<p>Nothing was going to happen however before I could work out how to do one thing: achieve independence from <a href="https://metacpan.org/module/DBIx::Class">DBIx::Class</a> as a &#8220;storage engine&#8221;. I love DBIx::Class, but it would be much more cool to support any data storage system able to represent a table+column paradigm (even things like CSV, as a test case).</p>

<p>So <a href="https://metacpan.org/module/SQL::Translator">SQL::Translator</a> hit me like a thunderbolt. Of course, that&#8217;s <em>exactly</em> what it does - introspect some data storage and provide a neutral, class-based representation of the tables and columns (fields). It&#8217;s a little rough around the edges, but certainly good enough. The Translator provides a metadata structure which AutoCRUD&#8217;s web front-end can use, independent of any particular storage engine such as DBIx::Class. This also paves the way for development of display engines other than the bundled ExtJS and simple HTML offerings.</p>

<p>Right now there&#8217;s a developer release of AutoCRUD on CPAN, and I hope shortly to have a production release. Whilst the web side might not look much different, the fact is that it can now support significant features such as tables with composite/compound primary keys, or no primary keys for that matter, database views, relations to self, multiple relations to the same table, and so on.</p>

<p>Alongside that, I&#8217;ve taken the opportunity to fix a few quirks of the web interface, and chomp my way through the outstanding wishlist. The updated code is now running on a DotCloud instance, so please go and have a play!</p>

<ul>
<li><a href="http://demo.autocrud.pl">http://demo.autocrud.pl</a></li>
</ul>

<p><em>p.s. a cron job will restore the demo&#8217;s databases at the top of every hour</em></p>
]]>
        

    </content>
</entry>

<entry>
    <title>Releasing trial/dev/beta versions with Dist::Zilla</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/10/releasing-trialdevbeta-versions-with-distzilla.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.2290</id>

    <published>2011-10-14T07:17:01Z</published>
    <updated>2011-10-14T08:45:46Z</updated>

    <summary>You might have stumbled across Dist::Zilla&apos;s --trial command line option in the past, and maybe even used it for a developer CPAN release. Its effect is (as I understand it) two-fold: adds -TRIAL to the name of the distribution archive being produced sets release: testing in the META.json file which is parsed by CPAN services It came to my attention that using -TRIAL is actually pretty bad for you and your system, and other users, even though it&apos;s one of the two naming conventions CPAN services use to identify developer releases. The problem is that the actual $VERSION of your code is unaffected. This means once installed, you can&apos;t ask your computer the version of an installed distribution and work out from that whether it&apos;s a developer release, or not. A secondary issue is that in sites such as metacpan.org there&apos;s nothing really obvious about the release which highlights its status as &quot;development&quot;, in the list of available versions. An alternative way to signal to CPAN services that a dist is a trial release is to use an underscore and a secondary version number at the end of $VERSION, like _001. This is still a bit crappy but at least humans can really easily see what&apos;s going on. Back to Dist::Zilla. If you use the AutoVersion plugin, a better alternative than using --trial is to set the DEV environment variable when you build or release the distribution. This has the effect of: (sprintf &apos;_%03u&apos;, $ENV{DEV}) being added to the end of $VERSION sets release: testing in the META.json file which is parsed by CPAN services Otherwise the best thing to do right now is to set the version manually, for developer releases. I hear from chatter on IRC that there are plans to change the --trial feature of Dist::Zilla to alter $VERSION if necessary (that is, if no underscore exists) - a good compromise, I reckon....</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>You might have stumbled across Dist::Zilla's <code>--trial</code> command line option in the past, and maybe even used it for a developer CPAN release. Its effect is (as I understand it) two-fold:</p>

<ul>
<li>adds <code>-TRIAL</code> to the name of the distribution archive being produced</li>
<li>sets <code>release: testing</code> in the <code>META.json</code> file which is parsed by CPAN services</li>
</ul>

<p>It came to my attention that using <code>-TRIAL</code> is actually pretty bad for you and your system, and other users, even though it's one of the two naming conventions CPAN services use to <a href="http://www.cpan.org/modules/04pause.html#conventions">identify developer releases</a>.</p>

<p>The problem is that the actual <code>$VERSION</code> of your code is unaffected. This means once installed, you can't ask your computer the version of an installed distribution and work out from that whether it's a developer release, or not. A secondary issue is that in sites such as <a href="https://metacpan.org/">metacpan.org</a> there's nothing really obvious about the release which highlights its status as "development", in the list of available versions.</p>

<p>An alternative way to signal to CPAN services that a dist is a trial release is to use an underscore and a secondary version number at the end of <code>$VERSION</code>, like <code>_001</code>. This is still a bit crappy but at least humans can really easily see what's going on.</p>

<p>Back to Dist::Zilla. If you use the <a href="https://metacpan.org/module/Dist::Zilla::Plugin::AutoVersion">AutoVersion</a> plugin, a better alternative than using <code>--trial</code> is to set the <code>DEV</code> environment variable when you build or release the distribution. This has the effect of:</p>

<ul>
<li><code>(sprintf '_%03u', $ENV{DEV})</code> being added to the end of <code>$VERSION</code></li>
<li>sets <code>release: testing</code> in the <code>META.json</code> file which is parsed by CPAN services</li>
</ul>

<p>Otherwise the best thing to do right now is to set the version manually, for developer releases. I hear from chatter on IRC that there are plans to change the <code>--trial</code> feature of Dist::Zilla to alter <code>$VERSION</code> <em>if necessary</em> (that is, if no underscore exists) - a good compromise, I reckon.<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>local::libs for Dist Development</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/07/locallibs-for-dist-development.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1978</id>

    <published>2011-07-16T15:26:25Z</published>
    <updated>2011-07-16T16:08:56Z</updated>

    <summary>Most of my distributions are on GitHub and built using Dist::Zilla. As the dependencies of each vary widely and I don&#8217;t want to muck up my workstation&#8217;s libraries, I set up a local::lib for each distribution&#8217;s development. The App::local::lib::helper scripts make this really easy. As per the docs, I combine the helper with App::cpanminus (cpanm) for all installation. To bootstrap a new local::lib area, I wrote this simple shell script: #!/bin/bash # script named &quot;new-ll&quot; if [ -z $1 ] then echo &apos;pass the distribution name, please&apos; exit fi echo &quot;creating local::lib for $1 ...&quot; sleep 3 curl -L http://cpanmin.us/ | perl - --notest --quiet --local-lib \ ~/perl5/$1 \ App::cpanminus \ Dist::Zilla \ App::local::lib::helper . Entering the correct environment for a distribution uses another helper script: #!/bin/bash # script named &quot;go&quot; if [ -z $1 ] then echo &apos;pass the distribution name, please&apos; exit fi ~/perl5/$1/bin/localenv bash . Which means my workflow for a new distribution is: $ new-ll New-Dist-Name $ go New-Dist-Name . Any Perl distributions installed in that shell (for example from dzil authordeps | cpanm or dzil listdeps | cpanm) will be placed into the new local::lib. It&#8217;s a simple ^D to exit. However it&#8217;s not obvious that you&#8217;re within this special environment, so editing Bash&#8217;s $PS1 variable (the shell prompt) to include the following, can help: echo $PERL5LIB | cut -d&apos;/&apos; -f5 . My deep thanks to the authors of the distributions used to create this neat setup....</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>Most of my distributions are on GitHub and built using <a href="http://search.cpan.org/perldoc?Dist::Zilla">Dist::Zilla</a>. As the dependencies of each vary widely and I don&#8217;t want to muck up my workstation&#8217;s libraries, I set up a local::lib for each distribution&#8217;s development.</p>

<p>The <a href="http://search.cpan.org/perldoc?App::local::lib::helper">App::local::lib::helper</a> scripts make this really easy. As per the docs, I combine the helper with <a href="http://search.cpan.org/perldoc?App::cpanminus">App::cpanminus</a> (<code>cpanm</code>) for all installation.</p>

<p>To bootstrap a new local::lib area, I wrote this simple shell script:</p>

<pre><code>#!/bin/bash
# script named "new-ll"

if [ -z $1 ]
  then
    echo 'pass the distribution name, please'
    exit
fi

echo "creating local::lib for $1 ..."
sleep 3

curl -L http://cpanmin.us/ | perl - --notest --quiet --local-lib \
    ~/perl5/$1 \
    App::cpanminus \
    Dist::Zilla \
    App::local::lib::helper
</code></pre>

<p>. <br />
Entering the correct environment for a distribution uses another helper script:</p>

<pre><code>#!/bin/bash
# script named "go"

if [ -z $1 ]
  then
    echo 'pass the distribution name, please'
    exit
fi

~/perl5/$1/bin/localenv bash
</code></pre>

<p>. <br />
Which means my workflow for a new distribution is:</p>

<pre><code>$ new-ll New-Dist-Name
$ go New-Dist-Name
</code></pre>

<p>. <br />
Any Perl distributions installed in that shell (for example from <code>dzil authordeps | cpanm</code> or <code>dzil listdeps | cpanm</code>) will be placed into the new local::lib. It&#8217;s a simple ^D to exit.</p>

<p>However it&#8217;s not obvious that you&#8217;re within this special environment, so editing Bash&#8217;s <code>$PS1</code> variable (the shell prompt) to include the following, can help:</p>

<pre><code>echo $PERL5LIB | cut -d'/' -f5
</code></pre>

<p>. <br />
My deep thanks to the authors of the distributions used to create this neat setup.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Perl on a Windows 7 laptop</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/04/perl-on-a-windows-7-laptop.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1667</id>

    <published>2011-04-18T20:33:58Z</published>
    <updated>2011-04-19T05:32:34Z</updated>

    <summary><![CDATA[I&#8217;ve been setting up my Windows 7 laptop to have as complete a Perl development environment as possible. I don&#8217;t have a choice about the operating system in this case, but I am used to the Unix-style environment, which I&#8217;d like to maintain. One option is to use Cygwin and just dive into there for everything. However I do want some of my code to work natively under Windows so there is still a need to run Perl tests at a Windows console. I might as well develop there too, if I can. I&#8217;ve ended up with the following steps, which are in places bodgy hacks, but show the principle works at least: Git for Windows Strawberry Perl Vim fix Windows Console perldoc fix local::lib cpanm installer Local CPAN mirror First thing is to install Git for Windows, known as msysgit (don&#8217;t alter any of the Windows PATH settings at install time). It&#8217;s a great little system which ships with Bash, Vim, and a suite of other handy tools. On this platform you probably want to set the End Of Line character(s) to ensure consistency. I have the following in my ~/.gitconfig: [core] editor = vim eol = lf [color] ui = true The bundled Perl in msysgit is a little ancient (5.8.8). Download and install the excellent Strawberry Perl distribution. Our goal is to have perl within the msysgit environment be Strawberry Perl&#8217;s perl. Move C:\Program Files\Git\bin\perl.exe out the way (to perl-g.exe) and copy C:\strawberry\perl\bin\perl.exe in its place (there are no symbolic links under Windows). By changing the Perl though, you knacker parts of Git which use Perl (for example git commit --interactive). The way to fix this is to keep a copy of the original msysgit perl (as above) and then edit any of the scripts in C:\Program Files\Git\libexec\git-core to have #!/usr/bin/perl-g at the top. Here&#8217;s a list: git-add--interactive git-svn git-difftool git-relink git-send-email The msysgit bundled Vim also needs some help, in the form of syntax files. I downloaded and installed GVim for Windows, and copied the .vim files from C:\Program Files\Vim\vim73\syntax to C:\Program Files\Git\share\vim\vim73\syntax but perhaps there&#8217;s a less brute-force way. At the least, you should get hold of perl.vim and pod.vim. The Windows console program leaves a lot to be desired. I found a reasonable alternative in the form of Console2, an open source project hosted on Sourceforge. Download and install that (well, copy to Program Files). You&#8217;ll definitely want to edit its Settings so under Hotkeys, set Close tab and Rename tab to an alternative, or None (by doing Clear then Assign for each). Also under Settings in the Console section I set the Shell to be C:\Program Files\Git\bin\sh.exe --login -i and the Startup dir to be a folder I created in my user area for Perl development. Now, pinning the Console2 application to the Start Menu means it can be opened straight into msysgit&#8217;s Bash. At the shell I installed my own vimrc file to ~/.vimrc, and created a ~/.bash_profile containing the following: alias ll="ls -l --color" alias view="vim -R" export TERM=vt100 Strawberry Perl ships with many useful tools in its bin directory. Some of them are Windows batch files (.bat) because the expectatation is that you&#8217;re running Perl from the native Windows console. In this setup we&#8217;re within a Bash shell so they don&#8217;t work. One thing you&#8217;ll probably miss is perldoc, so create a ~/bin directory and in ~/bin/perldoc put the following: #!/usr/bin/perl require 5; BEGIN { $^W = 1 if $ENV{'PERLDOCDEBUG'} } use Pod::Perldoc; exit( Pod::Perldoc-&gt;run() ); I always use a local::lib area for the modules used in my development, and Strawberry Perl ships with this module. Simply run the llw32helper program from the normal Windows console and it&#8217;ll ask you for the new local::lib location then set Registry entries appropriately. One reboot later and perl -V should include this new library path. From Strawberry Perl&#8217;s CPAN shell (perl -MCPAN -e shell) I only install one module - App::cpanminus. This provides a new tool, cpanm, for installing modules. Note that since the previous local::lib setup, App::cpanminus is installed to that location rather than Strawberry Perl&#8217;s standard library path. The final step is to have a local CPAN mirror. This means I can work on the Windows 7 laptop from a remote part of a Scottish Hebridean island, for instance, fully off-line. This uses the CPAN::Mini and CPAN::Mini::Webserver modules, both installed via the cpanm utility. The minicpan command line app will create the mirror for you. The minicpan_webserver app fires up an interface at http://localhost:2963/. Here are example commands used with this setup, which I&#8217;ve made into Bash aliases (also set your ~/.minicpanrc as per the docs): minicpan -l /path/to/local/minicpan -r http://your.cpan.mirror.example.com/ cpanm --mirror file:///C:/path/to/local/minicpan --mirror-only -v Module::Name A remaining niggle is that cursor keys don&#8217;t seem to work in less (Ctrl-N and Ctrl-K are alternatives). I&#8217;ve not yet found a fix for this; however they do work in Vim. Another issue I found is that, bizarrely, cpanm sometimes fails unless the -v option is provided. Also with cpanm it seems more successful at unpacking dist tarballs when treating the local platform as UNIX rather than WIN32 so I hacked the script to do that. I wish I were more capable on this platform to begin to debug this (please email me if you want to collaborate). That&#8217;s pretty much where I&#8217;m at, right now. I&#8217;d welcome constructive feedback on this process in the comments (at blogs.perl.org if you&#8217;re reading a syndication). My deep thanks and respect to all the developers of the above tools and libraries, who have made this possible....]]></summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>I&#8217;ve been setting up my Windows 7 laptop to have as complete a Perl development environment as possible. I don&#8217;t have a choice about the operating system in this case, but I am used to the Unix-style environment, which I&#8217;d like to maintain.</p>

<p>One option is to use <a href="http://www.cygwin.com/">Cygwin</a> and just dive into there for everything. However I do want <a href="http://search.cpan.org/perldoc?Net::CLI::Interact">some of my code</a> to work natively under Windows so there is still a need to run Perl tests at a Windows console. I might as well develop there too, if I can. I&#8217;ve ended up with the following steps, which are in places bodgy hacks, but show the principle works at least:</p>

<ol>
<li>Git for Windows</li>
<li>Strawberry Perl</li>
<li>Vim fix</li>
<li>Windows Console</li>
<li>perldoc fix</li>
<li>local::lib</li>
<li>cpanm installer</li>
<li>Local CPAN mirror</li>
</ol>

<p>First thing is to install <a href="http://code.google.com/p/msysgit/">Git for Windows</a>, known as <a href="http://code.google.com/p/msysgit/downloads/list">msysgit</a> (don&#8217;t alter any of the Windows PATH settings at install time). It&#8217;s a great little system which ships with Bash, Vim, and a suite of other handy tools. On this platform you probably want to set the End Of Line character(s) to ensure consistency. I have the following in my <code>~/.gitconfig</code>:</p>

<pre><code>[core]
    editor = vim
    eol = lf
[color]
    ui = true
</code></pre>

<p>The bundled Perl in msysgit is a little ancient (5.8.8). Download and install the excellent <a href="http://strawberryperl.com/">Strawberry Perl</a> distribution. Our goal is to have <code>perl</code> within the msysgit environment be Strawberry Perl&#8217;s <code>perl</code>. Move <code>C:\Program Files\Git\bin\perl.exe</code> out the way (to <code>perl-g.exe</code>) and copy <code>C:\strawberry\perl\bin\perl.exe</code> in its place (there are no symbolic links under Windows).</p>

<p>By changing the Perl though, you knacker parts of Git which use Perl (for example <code>git commit --interactive</code>). The way to fix this is to keep a copy of the original msysgit <code>perl</code> (as above) and then edit any of the scripts in <code>C:\Program Files\Git\libexec\git-core</code> to have <code>#!/usr/bin/perl-g</code> at the top. Here&#8217;s a list:</p>

<ul>
<li><code>git-add--interactive</code></li>
<li><code>git-svn</code></li>
<li><code>git-difftool</code></li>
<li><code>git-relink</code></li>
<li><code>git-send-email</code></li>
</ul>

<p>The msysgit bundled Vim also needs some help, in the form of syntax files. I downloaded and installed <a href="http://www.vim.org/download.php#pc">GVim for Windows</a>, and copied the <code>.vim</code> files from <code>C:\Program Files\Vim\vim73\syntax</code> to <code>C:\Program Files\Git\share\vim\vim73\syntax</code> but perhaps there&#8217;s a less brute-force way. At the least, you should get hold of <code>perl.vim</code> and <code>pod.vim</code>.</p>

<p>The Windows console program leaves a lot to be desired. I found a reasonable alternative in the form of <a href="http://sourceforge.net/projects/console/">Console2</a>, an open source project hosted on Sourceforge. Download and install that (well, copy to Program Files). You&#8217;ll definitely want to edit its Settings so under Hotkeys, set Close tab and Rename tab to an alternative, or None (by doing Clear then Assign for each). Also under Settings in the Console section I set the Shell to be <code>C:\Program Files\Git\bin\sh.exe --login -i</code> and the Startup dir to be a folder I created in my user area for Perl development. Now, pinning the Console2 application to the Start Menu means it can be opened straight into msysgit&#8217;s Bash.</p>

<p>At the shell I installed <a href="http://gorwits.me.uk/data/files/vimrc">my own vimrc</a> file to <code>~/.vimrc</code>, and created a <code>~/.bash_profile</code> containing the following:</p>

<pre><code>alias ll="ls -l --color"
alias view="vim -R"
export TERM=vt100
</code></pre>

<p>Strawberry Perl ships with many useful tools in its bin directory. Some of them are Windows batch files (<code>.bat</code>) because the expectatation is that you&#8217;re running Perl from the native Windows console. In this setup we&#8217;re within a Bash shell so they don&#8217;t work. One thing you&#8217;ll probably miss is perldoc, so create a <code>~/bin</code> directory and in <code>~/bin/perldoc</code> put the following:</p>

<pre><code>#!/usr/bin/perl
require 5;
BEGIN { $^W = 1 if $ENV{'PERLDOCDEBUG'} }
use Pod::Perldoc;
exit( Pod::Perldoc-&gt;run() );
</code></pre>

<p>I always use a <a href="http://search.cpan.org/perldoc?local::lib">local::lib</a> area for the modules used in my development, and Strawberry Perl ships with this module. Simply run the <code>llw32helper</code> program from the normal Windows console and it&#8217;ll ask you for the new local::lib location then set Registry entries appropriately. One reboot later and <code>perl -V</code> should include this new library path.</p>

<p>From Strawberry Perl&#8217;s CPAN shell (<code>perl -MCPAN -e shell</code>) I only install one module - <a href="http://search.cpan.org/perldoc?App::cpanminus">App::cpanminus</a>. This provides a new tool, <code>cpanm</code>, for installing modules. Note that since the previous local::lib setup, App::cpanminus is installed to that location rather than Strawberry Perl&#8217;s standard library path.</p>

<p>The final step is to have a local CPAN mirror. This means I can work on the Windows 7 laptop from a <a href="http://www.islayjura.com/">remote part of a Scottish Hebridean island</a>, for instance, fully off-line. This uses the <a href="http://search.cpan.org/perldoc?CPAN::Mini">CPAN::Mini</a> and <a href="http://search.cpan.org/perldoc?CPAN::Mini::Webserver">CPAN::Mini::Webserver</a> modules, both installed via the <code>cpanm</code> utility. The <code>minicpan</code> command line app will create the mirror for you. The <code>minicpan_webserver</code> app fires up an interface at <code>http://localhost:2963/</code>. Here are example commands used with this setup, which I&#8217;ve made into Bash <em>aliases</em> (also set your <code>~/.minicpanrc</code> as per the docs):</p>

<pre><code>minicpan -l /path/to/local/minicpan -r http://your.cpan.mirror.example.com/
cpanm --mirror file:///C:/path/to/local/minicpan --mirror-only -v Module::Name
</code></pre>

<p>A remaining niggle is that cursor keys don&#8217;t seem to work in <code>less</code> (Ctrl-N and Ctrl-K are alternatives). I&#8217;ve not yet found a fix for this; however they do work in Vim. Another issue I found is that, bizarrely, <code>cpanm</code> sometimes fails unless the <code>-v</code> option is provided. Also with <code>cpanm</code> it seems more successful at unpacking dist tarballs when treating the local platform as UNIX rather than WIN32 so I hacked the script to do that. I wish I were more capable on this platform to begin to debug this (please email me if you want to collaborate).</p>

<p>That&#8217;s pretty much where I&#8217;m at, right now. I&#8217;d welcome constructive feedback on this process in the comments (at blogs.perl.org if you&#8217;re reading a syndication). My deep thanks and respect to all the developers of the above tools and libraries, who have made this possible.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Dist::Zilla::PluginBundle::Author:: namespace</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/02/dist-zilla-pluginbundle-author-namespace.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1426</id>

    <published>2011-02-05T19:20:16Z</published>
    <updated>2011-02-05T19:35:11Z</updated>

    <summary>Following the lead of Mike Doherty (DOHERTY) I&apos;ve moved my own Dist::Zilla Author PluginBundle into a new namespace: Dist::Zilla::PluginBundle::Author::OLIVER Having Author PluginBundles is a great system for saving me time and allowing others to build my modules with ease. However I had to agree to Mike&apos;s point that polluting the Dist::Zilla::PluginBundle:: namespace wasn&apos;t so cool. It also makes things more clear in the dist.ini file: [@Author::OLIVER] If you have an Author PluginBundle, please consider moving it into this new namespace. You can of course keep the old one around, in parallel, until code using it has moved off to the backpan....</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>Following the lead of Mike Doherty (<a href="http://search.cpan.org/~doherty/" target="_blank">DOHERTY</a>) I've moved my own <a href="http://search.cpan.org/perldoc?Dist::Zilla" target="_blank">Dist::Zilla</a> Author PluginBundle into a new namespace:</p>

<pre><code class="prettyprint">Dist::Zilla::PluginBundle::Author::OLIVER
</code></pre>

<p>Having Author PluginBundles is a great system for saving me time and allowing others to build my modules with ease. However I had to agree to Mike's point that polluting the <code>Dist::Zilla::PluginBundle::</code> namespace wasn't so cool. It also makes things more clear in the <code>dist.ini</code> file:</p>

<pre><code class="prettyprint">[@Author::OLIVER]
</code></pre>

<p>If you have an Author PluginBundle, please consider moving it into this <a href="http://search.cpan.org/search?query=Dist::Zilla::PluginBundle::Author&mode=all" target="_blank">new namespace</a>. You can of course keep the old one around, in parallel, until code using it has moved off to the backpan.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Dist::Zilla::Plugin::MetaResourcesFromGit</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/02/dist-zilla-plugin-metaresourcesfromgit.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1421</id>

    <published>2011-02-03T19:21:17Z</published>
    <updated>2011-02-03T20:54:34Z</updated>

    <summary><![CDATA[The CPAN META specification includes support for "resource" links to homepage, bug tracker, mail list, source code repository, and so on. These will appear on search.cpan.org if you ship a META.json with your distribution. Dist::Zilla's MetaResources plugin allows you to set these links in the distribution config, but I wanted something a little more automagical. This can be done because I've set up my GitHub repositories with consistent naming and layout. So my new plugin, Dist::Zilla::Plugin::MetaResourcesFromGit, is a drop-in replacement for the standard MetaResources plugin. It automatically generates four resource links based on the name of the distribution and the remote git repository settings. Simply use the plugin in your dist.ini file: [MetaResourcesFromGit] The default links are equivalent to: homepage = https://github.com/&lt;account>/&lt;repo&gt;/wiki bugtracker.web = https://rt.cpan.org/Public/Dist/Display.html?Name=&lt;dist-name&gt; repository.url = git://github.com/&lt;account&gt;/&lt;repo&gt;.git repository.web = https://github.com/&lt;account&gt;/&lt;repo&gt; repository.type = git Any other resources provided to this Plugin are passed through to the MetaResources Plugin as-is. If you wish to override one of the above, some formatting codes are provided (described in the documentation) to assist. If you wish to suppress the appearance of one of the above resources, set an empty value. If you want to know more about my Dist::Zilla and GitHub workflow, I discussed it in an earlier post on this blog. I wrote this plugin to assist me, and it's also shown how great the Moose-based Dist::Zilla architecture is for extending features. The Plugin is GitHub centric at the moment, but I'd be happy to accept a patch to work with other cloud-based Git services (Gitorious, SourceForge, etc)....]]></summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>The <a href="http://search.cpan.org/perldoc?CPAN::Meta::Spec" target="_blank">CPAN META specification</a> includes support for "resource" links to homepage, bug tracker, mail list, source code repository, and so on. These will appear on search.cpan.org if you <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::MetaJSON" target="_blank">ship a META.json</a> with your distribution.</p>

<p>Dist::Zilla's <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::MetaResources" target="_blank">MetaResources</a> plugin allows you to set these links in the distribution config, but I wanted something a little more automagical. This can be done because I've set up my GitHub repositories with consistent naming and layout.</p>

<p>So my new plugin, <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::MetaResourcesFromGit" target="_blank">Dist::Zilla::Plugin::MetaResourcesFromGit</a>, is a drop-in replacement for the standard MetaResources plugin. It automatically generates four resource links based on the name of the distribution and the remote git repository settings. Simply use the plugin in your <code>dist.ini</code> file:</p>

<pre><code class="prettyprint">[MetaResourcesFromGit]
</code></pre>

<p>The default links are equivalent to:</p>

<pre><code class="prettyprint">homepage        = https://github.com/&lt;account>/&lt;repo&gt;/wiki
bugtracker.web  = https://rt.cpan.org/Public/Dist/Display.html?Name=&lt;dist-name&gt;
repository.url  = git://github.com/&lt;account&gt;/&lt;repo&gt;.git
repository.web  = https://github.com/&lt;account&gt;/&lt;repo&gt;
repository.type = git
</code></pre>

<p>Any other resources provided to this Plugin are passed through to the MetaResources Plugin as-is. If you wish to override one of the above, some formatting codes are provided (described in the documentation) to assist. If you wish to suppress the appearance of one of the above resources, set an empty value.</p>

<p>If you want to know more about <a href="http://blogs.perl.org/users/oliver_gorwits/2011/01/my-distzilla-and-gitgithub-workflow.html" target="_blank">my Dist::Zilla and GitHub workflow</a>, I discussed it in an earlier post on this blog. I wrote this plugin to assist me, and it's also shown how great the Moose-based Dist::Zilla architecture is for extending features.</p>

<p>The Plugin is GitHub centric at the moment, but I'd be happy to accept a patch to work with other cloud-based Git services (Gitorious, SourceForge, etc).</p>]]>
        
    </content>
</entry>

<entry>
    <title>My Dist::Zilla and git/GitHub workflow</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/01/my-distzilla-and-gitgithub-workflow.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1367</id>

    <published>2011-01-16T14:18:36Z</published>
    <updated>2011-02-02T05:27:45Z</updated>

    <summary><![CDATA[There has been a bit of discussion recently on the #distzilla IRC channel about how people are integrating their CPAN distribution development with Git, and in particular some of the Dist::Zilla Git plugin(s). I thought it might contribute to a useful discussion if I show how I have things set up. Like many, I want to host my code on GitHub and then periodically publish to CPAN. Dist::Zilla helps in both these by providing plugins to automatically push releases to GitHub, and then also upload to CPAN. What bothers some is the stage at which these things happen, and also how the branches and tags are represented on GitHub. In particular, folks might want: a "clean" git branch which tracks CPAN releases another branch which is the "trunk" of development a user browsing the GitHub website to see the CPAN branch (with the README, etc) sane commit messages and tags What I have configured is for the master branch on GitHub to be the one tracking CPAN releases. This makes it straightforward for most people to fork the distribution and tinker around without getting into trouble (i.e. they can build the dist). My trunk of development takes place in a branch called devel, and that is from where I kick off Dist::Zilla builds and releases: Tags are applied to the master branch automatically, with the version number which was uploaded to CPAN. So a user can again browse to GitHub, and when selecting a (version) tag they will see the CPAN dist at that version. The commit message for the the master branch is also automatic, and contains the text of the latest section in the Changes file. Commit messages along my devel branch are of couse the everyday notes I make as I code. But following a Dist::Zilla driven release, one commit is done automatically on the devel branch to store the new header in the Changes file, and it gets the comment "Bumped changelog following rel. v%v". Okay, this is all a bit abstract, so if you follow this link you can see the network graph for one of my modules. It clearly shows the two branches, how they are merged, and all commit messages. I think this setup is really neat and tidy, and very intuitive for the visiting user who might not be familiar with Dist::Zilla. It's also almost completely automated so I really just stick to the devel branch and forget all about the rest. Finally, let's look at a snippet from my dist.ini which drives it all. Note that the CommitBuild Plugin must come before the @Git Bundle: [Git::CommitBuild] branch = release_branch = master message = &lt;contents of latest changelog entry&gt; [@Git] commit_msg = Bumped changelog following rel. v%v The CommitBuild Plugin is responsible for pushing the built distribution into a branch other than the one I've currently checked out. That is, I'm working in devel but the baked distribution is committed to master along with a nice comment, just at the same time as being uploaded to CPAN. Okay, I have one confession. Getting the contents of the Changes file entry into that message variable does involve a wee hack, but you could equally just say something like "product of release %v" using the Git Plugin substitution variables. I hope showing this has helped....]]></summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>There has been a bit of discussion recently on the <tt>#distzilla</tt> IRC channel about how people are integrating their CPAN distribution development with Git, and in particular some of the <a target="_blank" href="http://search.cpan.org/perldoc?Dist::Zilla">Dist::Zilla</a> <a target="_blank" href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::Git">Git plugin(s)</a>. I thought it might contribute to a useful discussion if I show how I have things set up.</p>

<p>Like many, I want to <a target="_blank" href="https://github.com/ollyg">host my code on GitHub</a> and then periodically publish to CPAN. Dist::Zilla helps in both these by providing plugins to automatically push releases to GitHub, and then also upload to CPAN.</p>

<p>What bothers some is the stage at which these things happen, and also how the branches and tags are represented on GitHub. In particular, folks might want:</p>

<p>
<ul>
	<li>a "clean" git branch which tracks CPAN releases</li>
	<li>another branch which is the "trunk" of development</li>
	<li>a user browsing the GitHub website to see <a target="_blank" href="https://github.com/ollyg/Dist-Zilla-PluginBundle-Author-OLIVER">the CPAN branch</a> (with the README, etc)</li>
	<li>sane commit messages and tags</li>
</ul>
</p>

<p>What I have configured is for the <tt>master</tt> branch on GitHub to be the one tracking CPAN releases. This makes it straightforward for most people to fork the distribution and tinker around without getting into trouble (i.e. they can build the dist).</p>

<p>My trunk of development takes place in a branch called <tt>devel</tt>, and that is from where I kick off Dist::Zilla builds and releases:</p>

<p><img alt="Screen shot 2011-01-16 at 15.56.38.png" src="http://blogs.perl.org/users/oliver_gorwits/2011/01/16/Screen%20shot%202011-01-16%20at%2015.56.38.png" width="371" height="150" class="mt-image-none" style="" /></p>

<p>Tags are applied to the <tt>master</tt> branch automatically, with the version number which was uploaded to CPAN. So a user can again browse to GitHub, and when selecting a (version) tag they will see the CPAN dist at that version.</p>

<p>The commit message for the the <tt>master</tt> branch is also automatic, and contains the text of the latest section in the <tt>Changes</tt> file. Commit messages along my <tt>devel</tt> branch are of couse the everyday notes I make as I code. But following a Dist::Zilla driven release, one commit is done automatically on the <tt>devel</tt> branch to store the new header in the <tt>Changes</tt> file, and it gets the comment "<tt>Bumped changelog following rel. v%v</tt>".</p>

<p>Okay, this is all a bit abstract, so if you follow <a target="_blank" href="https://github.com/ollyg/Dist-Zilla-PluginBundle-Author-OLIVER/network">this link</a> you can see the network graph for one of my modules. It clearly shows the two branches, how they are merged, and all commit messages.</p>

<p>I think this setup is really neat and tidy, and very intuitive for the visiting user who might not be familiar with Dist::Zilla. It's also almost completely automated so I really just stick to the <tt>devel</tt> branch and forget all about the rest.</p>

<p>Finally, let's look at a snippet from my <tt>dist.ini</tt> which drives it all. Note that the <tt>CommitBuild</tt> Plugin <em>must</em> come before the <tt>@Git</tt> Bundle:</p>

<pre><code class="prettyprint">[Git::CommitBuild]
branch =
release_branch = master
message = &lt;contents of latest changelog entry&gt;

<p>[@Git]<br />
commit_msg = Bumped changelog following rel. v%v<br />
</code></pre></p>

<p>The <tt>CommitBuild</tt> Plugin is responsible for pushing the built distribution into a branch other than the one I've currently checked out. That is, I'm working in <tt>devel</tt> but the baked distribution is committed to <tt>master</tt> along with a nice comment, just at the same time as being uploaded to CPAN.</p>

<p>Okay, I have one confession. Getting the contents of the <tt>Changes</tt> file entry into that <tt>message</tt> variable does involve a <a target="_blank" href="https://github.com/ollyg/Dist-Zilla-PluginBundle-Author-OLIVER/blob/v1.103640/lib/Dist/Zilla/PluginBundle/Author/OLIVER.pm#L83">wee hack</a>, but you could equally just say something like "<tt>product of release %v</tt>" using the Git Plugin substitution variables.</p>

<p>I hope showing this has helped.</p>
]]>
        
    </content>
</entry>

<entry>
    <title>AskPerl: The Back-Compat Dilemma</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2011/01/askperl-the-back-compat-dilemma.html" />
    <id>tag:blogs.perl.org,2011:/users/oliver_gorwits//140.1301</id>

    <published>2011-01-03T19:49:25Z</published>
    <updated>2011-01-03T20:46:03Z</updated>

    <summary>Gentle reader, I need your advice. Some years ago I created the Net::Appliance::Session Perl module. It allows the user to automate interactions with CLI-based networked devices (think routers, switches) - a sort of Expect but with some helpful domain knowledge. The module has turned out to be quite popular (which is important to my story), in use by many organisations. There is a shopping-list of problems with the code, though, which makes both bug-fixing and feature development really hard. I&apos;ve been planning a rewrite for over a year, and finally completed most of that in the past few days. The new version is completely different internally, but that shouldn&apos;t matter much. The problem comes in that I&apos;ve engineered a new &quot;phrasebook&quot; system for the scripted CLI interactions, and also the programmers&apos; API has changed. [Edit: I should add that lots of long-asked-for features are included, so the rewrite did bring benefits for the user.] Now, I guess that if I release this as Net::Appliance::Session with a major version bump it could cause havoc some time down the line when an innocent upgrades their server and in comes the new package and some maintenance script fails. Perl doesn&apos;t make it easy to deal with this (nor do most operating systems, either, of course). However I&apos;m loathe to change the module&apos;s namespace. I like its name, and it feels like chasing my tail if I just rename a module to indicate an incompatible API change. Alternatively I could write a BackCompat role, but for starters that&apos;s a lot of work (the old API was huge) and I worry that things like error handling simply work too differently in the new version to massage. Also, should that role be enabled by default or via a flag at use-time? I&apos;m not a professional programmer, nor a key part of some large projects like Catalyst, Moose, DBIx::Class which I&apos;m sure have had to deal with such issues in the past. I don&apos;t really know the best course of action, and I also don&apos;t have much communication at all with my user base (using this module is a sysadmin-practice &quot;smell&quot; so many don&apos;t own up to it). I need your help: please have a think and let me know in comments what you might do in this situation. Many thanks!...</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>Gentle reader, I need your advice.</p>

<p>Some years ago I created the <a href="http://search.cpan.org/perldoc?Net::Appliance::Session">Net::Appliance::Session</a> Perl module. It allows the user to automate interactions with CLI-based networked devices (think routers, switches) - a sort of Expect but with some helpful domain knowledge. The module has turned out to be quite popular (which is important to my story), in use by many organisations.</p>

<p>There is a shopping-list of problems with the code, though, which makes both bug-fixing and feature development really hard. I've been planning a rewrite for over a year, and finally completed most of that in the past few days.</p>

<p>The new version is completely different internally, but that shouldn't matter much. The problem comes in that I've engineered a new "phrasebook" system for the scripted CLI interactions, and also the programmers' API has changed. [Edit: I should add that lots of long-asked-for features are included, so the rewrite did bring benefits for the user.]</p>

<p>Now, I guess that if I release this as Net::Appliance::Session with a major version bump it could cause havoc some time down the line when an innocent upgrades their server and in comes the new package and some maintenance script fails. Perl doesn't make it easy to deal with this (nor do most operating systems, either, of course).</p>

<p>However I'm loathe to change the module's namespace. I like its name, and it feels like chasing my tail if I just rename a module to indicate an incompatible API change.</p>

<p>Alternatively I could write a <em>BackCompat</em> role, but for starters that's a lot of work (the old API was huge) and I worry that things like error handling simply work too differently in the new version to massage. Also, should that role be enabled by default or via a flag at <em>use</em>-time?</p>

<p>I'm not a professional programmer, nor a key part of some large projects like Catalyst, Moose, DBIx::Class which I'm sure have had to deal with such issues in the past. I don't really know the best course of action, and I also don't have much communication at all with my user base (using this module is a sysadmin-practice "smell" so many don't own up to it).</p>

<p>I need your help: please have a think and let me know in comments what you might do in this situation. Many thanks!</p>]]>
        
    </content>
</entry>

<entry>
    <title>CatatlystX::ListFramework::Builder finally removed from CPAN</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2010/11/catatlystxlistframeworkbuilder-finally-removed-from-cpan.html" />
    <id>tag:blogs.perl.org,2010:/users/oliver_gorwits//140.1200</id>

    <published>2010-11-24T20:18:21Z</published>
    <updated>2010-11-24T20:34:54Z</updated>

    <summary>This note is to announce that I&apos;ve just now, finally, removed the old CatalystX::ListFramework::Builder distributions from CPAN. Don&apos;t worry, the module has long been deprecated in favour of its more popular replacement Catalyst::Plugin::AutoCRUD. This moment cannot pass without thanking Andrew Payne and Peter Edwards for creating the ancestor to them both, CatalystX::ListFramework. I believe Peter had the thought to provide some kind of simple web access to database tables, and prodded Andrew into creating the ListFramework. Whilst out at a miltonkeynes.pm meet one evening, I discussed forking the code to make it more automagical and to allow the use of an AJAX UI which Peter had good reason for not wanting at the time. And so ::Builder was born. I&apos;m looking forward to the future of ::AutoCRUD. More time is available to me since I changed job recently, and there is a bunch of ideas waiting in the queue. If you have suggestions for AutoCRUD&apos;s wishlist, please do create a simple RT ticket against the module....</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>This note is to announce that I've just now, finally, removed the old CatalystX::ListFramework::Builder distributions from CPAN. Don't worry, the module has long been deprecated in favour of its more popular replacement <a href="http://search.cpan.org/perldoc?Catalyst::Plugin::AutoCRUD">Catalyst::Plugin::AutoCRUD</a>.</p>

<p>This moment cannot pass without thanking Andrew Payne and Peter Edwards for creating the ancestor to them both, CatalystX::ListFramework. I believe Peter had the thought to provide some kind of simple web access to database tables, and prodded Andrew into creating the ListFramework. Whilst out at a <a href="http://miltonkeynes.pm.org/">miltonkeynes.pm</a> meet one evening, I discussed forking the code to make it more automagical and to allow the use of an AJAX UI which Peter had good reason for not wanting at the time. And so ::Builder was born.</p>

<p>I'm looking forward to the future of ::AutoCRUD. More time is available to me since I changed job recently, and there is a bunch of ideas waiting in the queue. If you have suggestions for AutoCRUD's wishlist, please do <a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-AutoCRUD">create a simple RT ticket</a> against the module. </p>

<p><br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Test Post - sorry for the noise</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/oliver_gorwits/2010/09/test-post---sorry-for-the-noise.html" />
    <id>tag:blogs.perl.org,2010:/users/oliver_gorwits//140.972</id>

    <published>2010-09-05T20:51:00Z</published>
    <updated>2010-09-05T20:51:54Z</updated>

    <summary>Hopefully some syndication to my other site will work. Once again sorry for the noise....</summary>
    <author>
        <name>Oliver Gorwits</name>
        <uri>http://gorwits.me.uk/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/oliver_gorwits/">
        <![CDATA[<p>Hopefully some syndication to my other site will work.</p>

<p>Once again sorry for the noise.</p>]]>
        
    </content>
</entry>

</feed>
