~/.bashrc Perl Module Version Tip

I often need to quickly check the version of a perl module currently installed. A while back I got tired of running:

$ perl -MPOE::Filter -E 'say $POE::Filter::VERSION'
1.2357

So I added a quick function to .bashrc:

pm-vers () {
    perl -M$1 -e "print \$$1::VERSION, \"\n\""
}

Now I just run:

$ pm-vers POE::Filter
1.2357
This entry was posted in General and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>