Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/env perl
|
|
|
|
# find a Perl module's path on the filesystem
|
|
|
|
use warnings;
|
|
use strict;
|
|
use 5.10.0;
|
|
|
|
my $to_use;
|
|
if (defined $ARGV[0]) {
|
|
$to_use = $ARGV[0];
|
|
} else {
|
|
die "Must specify a module to check path for.";
|
|
}
|
|
|
|
eval("use $to_use");
|
|
|
|
my $filename = $to_use;
|
|
$filename =~ s{ :: }{/}gx;
|
|
$filename .= '.pm';
|
|
|
|
if ($INC{$filename}) {
|
|
say $INC{$filename};
|
|
} else {
|
|
say "$to_use not found";
|
|
}
|
|
|
|
# say $_ . " => " . $INC{$_} for keys %INC;
|