RFC: new.pm – a perl -e use/new shortener

Posted on December 25, 2016. Filed under: Uncategorized | Tags: , |

RFC: new.pm – a perl -e use/new shortener

I tend to use perl one-liners extensively, mostly for testing purposes. In particular, I often load a module with a loooooooooong name only to instantiate it once. And it’s boooooooring to type the whole name twice.

So I came up with an idea of a one-liner shortener along the lines of:

perl -we 'use new qw(My::Very::Long::Module x foo 42); print $x->get_foo;'

Liked it here?
Why not try sites on the blogroll...