Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (30 sloc) 0.839 kB
#!/usr/bin/perl
# Copyright 2001-2012, Paul Johnson (paul@pjcj.net)
# This software is free. It is licensed under the same terms as Perl itself.
# The latest version of this software should be available from my homepage:
# http://www.pjcj.net
use strict;
use warnings;
my $Command =
{
strip_criterion => sub
{
my ($command, $criterion, $file) = @_;
my $t;
local ($^I, @ARGV) = (".bak", $file);
while (<>)
{
$t = index($_, "$criterion code") -3 if !defined $t || $t < 0;
substr $_, $t, 7, ""
if /^line err stmt/ .. /^--------/ and $t > -1 and length > $t;
print;
}
},
};
sub main
{
my ($command) = @ARGV;
die "No such command: $command" unless $Command->{$command};
$Command->{$command}->(@ARGV)
}
main
Jump to Line
Something went wrong with that request. Please try again.