viernes, 22 de mayo de 2009

Last week on 'Perl Programming'

Hey guys (and TIOBE :),

I'm going to paste a template for my new perl scripts I'm using lately. Well, I know I always should code as if it had to make into CPAN, but well... Sometimes you just don't need all the boilerplate.


use strict;
use warnings;
use Data::Dumper::Perltidy;
use Getopt::Long;
use Pod::Usage;

sub man {#{{{
-exitval => 1,
-verbose => 2

# main
GetOptions (
'man' => \&man,


=head1 NAME

=head1 SEE ALSO



=head1 AUTHOR

Raimon Grau Cuscó

=head1 Credits


# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ###}}}

It's not anything awesome, but it just does the job. I saved it in ~/.vim/perl.template , and entered a map in vim like this
iab nperl :r ~/.vim/perl.template
However, if I have to write something longer than 100 lines, it goes through the proces of module starter or h2xs (the former is recommended now)

module-starter --module=Unix::RatFinder::IO --author="Raimon Grau" --email="" --builder=Module::Install
Some random things.

  • Rakudo now passes the 68% of the perl6 specs. yay!
  • I'll go to YAPC::EU::2009! YAY! (thx C.)
  • I'm working on a better Padre::Plugin::Vi a plugin for Padre or at least extending it with new commands. for the moment I've got a commit bit and implemented a couple commands. Yay!
  • Learning lots of things on ironman blogging contest


No hay comentarios: