Friday, November 11, 2011

To check whether a perl module exists on your machine.

To find out whether the Net::Twitter perl module exists on your machine.
To print the path:
[raghu@raghu-ti8105 ~]$ perl -MNet::Twitter -e 'print $INC{"Net/Twitter.pm"}'
/usr/lib/perl5/site_perl/5.8.8/Net/Twitter.pm 
To just confirm whether it exists:
[raghu@raghu-ti8105 ~]$ perl -MNet::Twitter -le 'print 1'
1
Note: Replace the Net::Twitter module with yours.

No comments:

Post a Comment