12345678910111213141516171819202122232425262728293031323334 |
- use warnings;
- use strict;
- our $excluding;
- BEGIN { our $excluding = 0; }
- if (m/LCOV_EXCL_START/) {
- $excluding = 1;
- }
- if ($excluding and m/LCOV_EXCL_STOP/) {
- $excluding = 0;
- }
- my $exclude_this = (m/LCOV_EXCL_LINE/);
- if ($excluding or $exclude_this) {
- s{^\s*\
- s{^ (\s*)(\d+):}{$1!!!$2:};
- }
- if (eof and $excluding) {
- warn "Runaway LCOV_EXCL_START in $ARGV";
- $excluding = 0;
- }
|