Skip to content

Instantly share code, notes, and snippets.

@earnhardt3rd
Created June 19, 2023 14:04
Show Gist options
  • Save earnhardt3rd/75f4de0e94487b41f3342e38e0298242 to your computer and use it in GitHub Desktop.
Save earnhardt3rd/75f4de0e94487b41f3342e38e0298242 to your computer and use it in GitHub Desktop.
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &_WSP_MODS();}
1;
sub _WSP_MODS {
my %RET_WSP;
my $wspMods = $ROOTS{"NXROOT"} . $SLASH . "site" . $SLASH . "mods" . $SLASH . "majic" . $SLASH . "wsp.mods";
if (! -f $wspMods ) {
print " Unable to locate WSP File! ( $wspMods )\n";
return;
}
open (WSPFH,"< $wspMods");
my $ln=0;
while (<WSPFH>) {
my $line = $_;
chomp($line);
next if ($line =~ /\/.*/);
next if ($line eq "");
$ln++;
printf " WSP(%0.4d):%-s\n",$ln,$line;
}
close(WSPFH);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment