| 1 | #!/usr/bin/env perl | ||||||||||
| 2 | # sitepods - print out the paths to the modules | ||||||||||
| 3 | # that this site added | ||||||||||
| 4 | # | ||||||||||
| 5 | # this is a perl program not a shell script | ||||||||||
| 6 | # so that we can use the correct perl | ||||||||||
| 7 | |||||||||||
| 8 | # ------ pragmas | ||||||||||
| 9 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use FindBin qw($Bin); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 1 | our $VERSION = '2.1.0'; | |||||||||
| 14 | |||||||||||
| 15 | 1 | ▶ | open(PROG, "$^X -S $Bin/modpods |") || die "can't fork: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | while (<PROG>) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 1681 | ▶ | if ( $^O eq "MSWin32" ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | ▶ | print if /\/site\//; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } else { | ||||||||||
| 21 | 1681 | ▶ | print if /site_perl/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | } | ||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||