<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>maros</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/maros/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/maros/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/maros//1280</id>
    <updated>2012-06-02T16:43:56Z</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>MooseX-App 1.04 released</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/maros/2012/06/moosex-app-104-released.html" />
    <id>tag:blogs.perl.org,2012:/users/maros//1280.3337</id>

    <published>2012-06-02T17:45:06Z</published>
    <updated>2012-06-02T16:43:56Z</updated>

    <summary>I just have released the latest version of MooseX-App - a command line-app helper framework - on CPAN (see my last blog post if you want to learn more about MooseX-App). This release incorporates the feedback I have got from...</summary>
    <author>
        <name>maros</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/maros/">
        <![CDATA[<p>I just have released the latest version of MooseX-App - a command line-app helper framework - on <span class="caps">CPAN </span>(see <a href="http://blogs.perl.org/users/maros/2012/04/user-friendly-command-line-apps-with-less-suffering.html">my last blog post</a> if you want to learn more about MooseX-App). This release incorporates the feedback I have got from fellow perl mongers.</p>

<p>The most notable change is that not all attributes will be exposed to the <span class="caps">CLI, </span>but only those defined with the new 'option' keyword.</p>

<script src="https://gist.github.com/2858926.js"> </script>

<p>The 'option' keyword is basically just syntactic sugar for adding an attribute with a special trait which marks attributes as command-line options. The main advantage for this approach is that you don't have to explicitly prevent internal attributes - possibly originating from consumed roles deep down in your code - from being exposed to the command line.</p>

<p>Furthermore I have cleaned up the meta classes, making it easier to write custom plugins which can modify almost every part of MooseX-App's behaviour, and fixed a couple of bugs I have discovered while switching App::iTan from MooseX::App::Cmd to MooseX::App. </p>

<p>App::iTan is a little command-line application - written a couple of years ago - which helps me to manage indexed transaction authentication numbers (iTAN) for my online-banking account. Hope you like it.</p>]]>
        
    </content>
</entry>

<entry>
    <title>User friendly command line apps with even less suffering</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/maros/2012/04/user-friendly-command-line-apps-with-less-suffering.html" />
    <id>tag:blogs.perl.org,2012:/users/maros//1280.3105</id>

    <published>2012-04-15T18:00:00Z</published>
    <updated>2012-04-15T17:02:17Z</updated>

    <summary>I love to write command line applications (eg. App-iTan, Business-UPS-Tracking, Game-Lacuna-Task, Mac-iPhoto-Exif and many more not publicly available). However most of the CPAN tools I generally use to build these applications either are not as user-friendly as I would like...</summary>
    <author>
        <name>maros</name>
        
    </author>
    
    <category term="moosecommandlineapp" label="moose command-line app" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/maros/">
        <![CDATA[<p>I love to write command line applications (eg. <a href="https://metacpan.org/release/App-iTan">App-iTan</a>, <a href="https://metacpan.org/module/ups_tracking">Business-UPS-Tracking</a>, <a href="https://metacpan.org/release/Games-Lacuna-Task">Game-Lacuna-Task</a>, <a href="https://metacpan.org/release/Mac-iPhoto-Exif">Mac-iPhoto-Exif</a> and many more not publicly available). However most of the <span class="caps">CPAN </span>tools I generally use to build these applications either are not as user-friendly as I would like them to be, or are not flexible enough. </p>

<p>I decided to change that and wrote <a href="https://metacpan.org/release/MooseX-App">MooseX-App</a>.</p>

<p>It handles commands with multiple subcommands, generates usage text, error messages on wrong user-input, validates options, and lets you write your program as easy-to-test and reusable classes. Just as App-Cmd (or MooseX-App-Cmd respectively). However compared to these options it ...</p>


<ul>
<li>is more flexible</li>
<li>supports plugins that can overdrive almost all of its behaviour</li>
<li>does not impose a certain application structure on you (thus making code reusage and testing easier)</li>
<li>does not pollute your command classes with many methods since most of its logic is implemented via meta classes</li>
<li>and is quite user friendly by providing useful input hints, better error messages as well as optional colorful output and bash completion</li>
</ul>



<p>So let me give you a short example:</p>

<p><script src="https://gist.github.com/2390756.js"> </script><br />
 <br />
Hope you like it.</p>]]>
        
    </content>
</entry>

</feed>
