Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How do I know if a package is on my server?

by Perlbotics (Archbishop)
on Aug 26, 2017 at 18:13 UTC ( [id://1198073]=note: print w/replies, xml ) Need Help??


in reply to How do I know if a package is on my server?

Perhaps, it is useful to see which files were included during execution, in order to have a reference?

use strict; use warnings; #-- example use Getopt::Long; #-- example / somewhere in your code or imported modules require Math::BigInt; #-- ... more ... #-- at the end, we should have seen them all END { print "VERSION / MODULE / PATH:\n"; for my $module (sort keys %INC) { my $mod_name = $module; $mod_name =~ s{/}{::}; $mod_name =~ s/\.pm$//i; #-- perhaps, the module author followed the convention? my $ver = eval "\$${mod_name}::VERSION" || '?'; printf "%-8s %-35s %s\n", $ver, $mod_name, $INC{$module}; } }

Example output on my host:

VERSION / MODULE / PATH: 1.3301 Carp /opt/perl-5.18.2/lib/site +_perl/5.18.2/Carp.pm 5.70 Exporter /opt/perl-5.18.2/lib/site +_perl/5.18.2/Exporter.pm 5.70 Exporter::Heavy /opt/perl-5.18.2/lib/site +_perl/5.18.2/Exporter/Heavy.pm 2.45 Getopt::Long /opt/perl-5.18.2/lib/site +_perl/5.18.2/Getopt/Long.pm 1.9993 Math::BigInt /opt/perl-5.18.2/lib/5.18 +.2/Math/BigInt.pm 1.27 constant /opt/perl-5.18.2/lib/5.18 +.2/constant.pm 1.22 overload /opt/perl-5.18.2/lib/5.18 +.2/overload.pm 0.02 overloading /opt/perl-5.18.2/lib/5.18 +.2/overloading.pm 1.07 strict /opt/perl-5.18.2/lib/5.18 +.2/strict.pm 1.03 vars /opt/perl-5.18.2/lib/5.18 +.2/vars.pm 1.18 warnings /opt/perl-5.18.2/lib/5.18 +.2/warnings.pm 1.02 warnings::register /opt/perl-5.18.2/lib/5.18 +.2/warnings/register.pm

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-23 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found