David Wheeler writes:
> On Jul 12, 2006, at 03:41, Gabor Szabo wrote:
>
> >perl -MModule -e'print $Module::VERSION'
>
> I have this alias set up:
>
> function pv () { perl -M$1 -le "print $1->VERSION"; }
Along similar lines, I have this one-liner as ~/bin/pmv:
#! /bin/sh
perl -m$1 -le 'print '$1'->VERSION || die "No VERSION in '$1'\n"'
> I think that calling ->VERSION is more correct.
So do I. In fact I used to use $VERSION in my script, but changed to
->VERSION after some situation in which it worked and $VERSION didn't.
Sorry, I can't right now remember what that was.
Smylers