Writing Command line scripts and accepting command line parameters using Moo
The organic way a Perl script grows usually starts with a few statements, conditionals and loops. Sometimes this
can grow to hundreds or even thousands of lines. Then parts of the script might slowly be turned into functions,
but it is usually very painful.
Moo can help us, even when we write a single script, without modules, to write much cleaner code.
Of course these scripts will also need to accept parameters from the command line. Let's see how can this be done.
While many of the Perl Maven articles are free, this article is only available for Perl Maven Pro subscribers.
Perl Maven Pro - extra articles and screencasts
As a Perl Maven Pro subscriber you will enjoy a growing library of articles and screencasts.
After the launch at least four new articles or screencasts will be published every month.
The articles will contain topics such as Web Application Development,
Object Oriented programming, testing, deployment,
code walkthroughs, best practices, and many more subjects in Perl,
and in related technologies.
Unix/Linux shell, SQL and NoSQL just to name a few topic that I, as a Perl programmer
Subscriptions include all previous pro episodes.
In order to subscribe to the Perl Maven Pro, first
register and login
to the web site, and then pay via PayPal: