generated from coulomb/repo-seed
Adopt CoulombSocial/HelixForge/MarkiTect documentation structure: - research/260608-yawex-prior-art/ — yawex exploration and sources - demand/ — inbound NetKingdom integration requirements - spec/ — PRD, TSD, UseCaseCatalog, ArchitectureBlueprint scaffolds - docs/ — stakeholder documentation and repository-layout guide - wiki/, issues/, history/ — scaffolded directories Add SCOPE.md and AGENTS.md. Update workplan paths and README.
45 lines
821 B
Perl
Executable File
45 lines
821 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
#
|
|
# comments out package inclusion of Test::Unit from perl sources
|
|
#
|
|
# $Header: /var/local/cvs/yawex/tools/striptests,v 1.1.1.1 2004/07/15 18:37:24 bernd Exp $
|
|
#
|
|
|
|
$pattern = "use Test::Unit";
|
|
|
|
$usage =<<EOT;
|
|
usage:
|
|
striptests <file>
|
|
EOT
|
|
|
|
unless ($ARGV[0]) {
|
|
print $usage;
|
|
exit 0;
|
|
}
|
|
|
|
foreach $filename (@ARGV) {
|
|
|
|
unless (-f $filename) {
|
|
print "skipping $filename - file not found\n";
|
|
next
|
|
}
|
|
|
|
if ($filename =~ /\.pm/ || $filename =~ /\.pl/) {
|
|
print "processing $filename\n";
|
|
} else {
|
|
print "skipping $filename - not a perl file\n";
|
|
next
|
|
}
|
|
|
|
open INFILE, "<$filename";
|
|
open OUTFILE, ">$filename.mod";
|
|
while (<INFILE>) {
|
|
s/$pattern/\#$pattern/g;
|
|
print OUTFILE;
|
|
}
|
|
close INFILE;
|
|
close OUTFILE;
|
|
system "mv $filename.mod $filename";
|
|
|
|
}
|