forked from HariSekhon/DevOps-Perl-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperlpath.pl
executable file
·52 lines (40 loc) · 1.01 KB
/
perlpath.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/perl
#
# Author: Hari Sekhon
# Date: 2019-09-27
#
# https://github.com/harisekhon/devops-perl-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn
# and optionally send me feedback to help improve or steer this or other code I publish
#
# https://www.linkedin.com/in/harisekhon
#
$DESCRIPTION = "
Simple tool to print the Perl \@INC path, one per line
Perl path \@INC may be different between perl and perl -T runs as taint mode prevents loading \$PERL5LIB
Tested on Perl 5.x on Mac and Linux
";
$VERSION = "0.2.0";
use strict;
use warnings;
use File::Basename;
#BEGIN {
# use File::Basename;
# use lib dirname(__FILE__) . "/lib";
#}
sub usage(){
my $progname = basename $0;
my $description = $main::DESCRIPTION;
$description =~ s/^\s*//;
$description =~ s/\s*$//;
print "$description\n\n\n";
print "usage: $progname\n\n";
exit 3;
}
if(@ARGV){
usage;
}
print join("\n", @INC) . "\n";