| 1 | package ifdef; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | $VERSION= '0.11'; | |||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | # be strict from now on | ||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | # take all =begin CAPITALS pod sections | ||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | my $ALL; | |||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | # output all source to be output as diff to STDERR | ||||||||||||||||||||||||||||||||||||||||||
| 12 | 3 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.2
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 3 | ▶ | my $diff= $ENV{'IFDEF_DIFF'} || 0; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$ENV{'IFDEF_DIFF'} || 0
MC/DC0%0/1
$ENV{'IFDEF_DIFF'} || 0
$ENV{'IFDEF_DIFF'}
Truth table50%1/2
A
A= $ENV{'IFDEF_DIFF'}
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 3 | eval "sub DIFF () { $diff }"; | |||||||||||||||||||||||||||||||||||||||||
| 15 | } #BEGIN | ||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | # get the necessary modules | ||||||||||||||||||||||||||||||||||||||||||
| 18 | 3 | ▶ | use IO::File (); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | # set up source filter for the initial script | ||||||||||||||||||||||||||||||||||||||||||
| 21 | 3 | ▶ | use Filter::Util::Call (); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | # initializations | ||||||||||||||||||||||||||||||||||||||||||
| 24 | my $STATUS; # status as returned by source filter | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 3 | my $ACTIVATING; # whether we're inside a =begin section being activated | |||||||||||||||||||||||||||||||||||||||||
| 26 | 3 | my $INPOD; # whether we're inside any =pod section | |||||||||||||||||||||||||||||||||||||||||
| 27 | 3 | my $DEPTH; # depth of conditionals | |||||||||||||||||||||||||||||||||||||||||
| 28 | 3 | my @STATE; # state of each level | |||||||||||||||||||||||||||||||||||||||||
| 29 | 3 | my %IFDEF; # filename conversion hash | |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | # install an @INC handler | ||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | unshift( @INC, sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=10 SCAR=47.0
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | my ( $ref, $filename, $path )= @_; | |||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | # return what we know of this module | ||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | if ( !ref $ref ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | $ref =~ s#/#::#; | |||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | return $IFDEF{$ref}; | |||||||||||||||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | # check all directories and handlers | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | foreach (@INC) { | |||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | # let that INC handle do it if it is an INC handle and it's not us | ||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | if (ref) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | goto &$_ unless $_ eq $ref; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | # we found the file | ||||||||||||||||||||||||||||||||||||||||||
| 50 | elsif ( -f ( $path= "$_/$filename" ) ) { | ||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | # create temp file | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | open( my $in, $path ) or next; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | my $out= IO::File->new_tmpfile | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 55 | or die "Failed to create temporary file for '$path': $!\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | $filename =~ s#/#::#; | |||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | $IFDEF{$filename}= $path; | |||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||
| 59 | # process all lines | ||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | local $_= \my $foo; # current state of localizing $_ ? | |||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | ▶ | while ( readline $in ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | &oneline; | |||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | print $out $_; | |||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | close $in; | |||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | &reset; | |||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | # make sure we start reading from start again | ||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | $out->seek( 0, 0 ) or die "Failed to seek: $!\n"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | return $out; | |||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | # indicate that the rest should be searched (which will fail) | ||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 77 | 3 | } ); | |||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | # satisfy require | ||||||||||||||||||||||||||||||||||||||||||
| 80 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 83 | # process | ||||||||||||||||||||||||||||||||||||||||||
| 84 | # | ||||||||||||||||||||||||||||||||||||||||||
| 85 | # Process a string (consisting of many lines) | ||||||||||||||||||||||||||||||||||||||||||
| 86 | # | ||||||||||||||||||||||||||||||||||||||||||
| 87 | # IN: 1 string to process | ||||||||||||||||||||||||||||||||||||||||||
| 88 | # OUT: 1 processed string (in place change if called in void context) | ||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | 6 | ▶ | sub process { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
process: called CC=4 SCAR=20.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | # process all lines | ||||||||||||||||||||||||||||||||||||||||||
| 93 | 6 | ▶ | my @line= split m#(?<=$/)#, $_[0]; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
process: not called CC=4 SCAR=20.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 94 | 6 | &reset; | |||||||||||||||||||||||||||||||||||||||||
| 95 | 6 | local $_= \my $foo; | |||||||||||||||||||||||||||||||||||||||||
| 96 | 6 | &oneline foreach @line; | |||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | # close of activating section (e.g. when called by "load") | ||||||||||||||||||||||||||||||||||||||||||
| 99 | 6 | ▶ | push @line,"}$/" if $ACTIVATING; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | # return if not in void context | ||||||||||||||||||||||||||||||||||||||||||
| 102 | 6 | ▶ | return join( '', @line ) if defined wantarray; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | # change in place | ||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | $_[0]= join( '',@line ); | |||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 108 | } #process | ||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 111 | # reset | ||||||||||||||||||||||||||||||||||||||||||
| 112 | # | ||||||||||||||||||||||||||||||||||||||||||
| 113 | # Reset all internal variables to a known state | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | 17 | ▶ | sub reset { $ACTIVATING= $INPOD= $DEPTH= 0 } #reset | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reset: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||
| 117 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 118 | # oneline | ||||||||||||||||||||||||||||||||||||||||||
| 119 | # | ||||||||||||||||||||||||||||||||||||||||||
| 120 | # Process one line in $_ in place | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | 146 | ▶ | sub oneline { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
oneline: called CC=15 SCAR=27.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | # let the world know if we should | ||||||||||||||||||||||||||||||||||||||||||
| 125 | 146 | print STDERR "<$_" if DIFF; | |||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | # it's a pod marker | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 146 | ▶ | if ( m#^=(\w+)# ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | # going back to source | ||||||||||||||||||||||||||||||||||||||||||
| 131 | 30 | ▶ | if ( $1 eq 'cut' ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | 7 | ▶ | $_= $ACTIVATING ? "}$/" : $/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | 7 | &reset; | |||||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | # beginning potentially special pod section | ||||||||||||||||||||||||||||||||||||||||||
| 137 | elsif ( $1 eq 'begin' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 138 | 13 | ▶ | if ( m#^=begin\s+([A-Z_0-9]+)\b# ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | # activating | ||||||||||||||||||||||||||||||||||||||||||
| 141 | 12 | ▶ | if ( $ALL or $ENV{$1} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$ALL or $ENV{$1}
MC/DC100%2/2
$ALL or $ENV{$1}
$ALL
$ENV{$1}
Truth table100%3/3
A or B
A= $ALLB= $ENV{$1}
| |||||||||||||||||||||||||||||||||||||||||||
| 142 | 7 | ▶ | $_= $ACTIVATING ? "}{$/" : "{;$/"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 143 | 7 | $ACTIVATING= 1; | |||||||||||||||||||||||||||||||||||||||||
| 144 | 7 | $INPOD= 0; | |||||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||
| 147 | # not activating now | ||||||||||||||||||||||||||||||||||||||||||
| 148 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 149 | 5 | ▶ | $_= $ACTIVATING ? "}$/" : $/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | 5 | $ACTIVATING= 0; | |||||||||||||||||||||||||||||||||||||||||
| 151 | 5 | $INPOD= 1; | |||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | # normal begin of pod | ||||||||||||||||||||||||||||||||||||||||||
| 156 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 157 | 1 | $_= $/; | |||||||||||||||||||||||||||||||||||||||||
| 158 | 1 | $INPOD= 1; | |||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||
| 162 | # at the end of a possibly activated section | ||||||||||||||||||||||||||||||||||||||||||
| 163 | elsif ( $1 eq 'end' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 164 | 5 | ▶ | $_ = $ACTIVATING ? "}$/" : $/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 165 | 5 | $ACTIVATING= 0; | |||||||||||||||||||||||||||||||||||||||||
| 166 | 5 | $INPOD= 1; | |||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | # it's another pod directive | ||||||||||||||||||||||||||||||||||||||||||
| 170 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 5 | $_= $/; | |||||||||||||||||||||||||||||||||||||||||
| 172 | 5 | $INPOD= 1; | |||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||
| 176 | # already inside pod | ||||||||||||||||||||||||||||||||||||||||||
| 177 | elsif ($INPOD) { | ||||||||||||||||||||||||||||||||||||||||||
| 178 | 51 | $_= $/; | |||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | # looks like comment, make it normal line if so indicated | ||||||||||||||||||||||||||||||||||||||||||
| 182 | elsif ( m/^#\s+([A-Z_0-9]+)\b/ ) { | ||||||||||||||||||||||||||||||||||||||||||
| 183 | 6 | ▶ | s/^#\s+(?:[A-Z_0-9]+)\b// if $ENV{$1}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||
| 186 | # let the world know if we should | ||||||||||||||||||||||||||||||||||||||||||
| 187 | 146 | print STDERR ">$_" if DIFF; | |||||||||||||||||||||||||||||||||||||||||
| 188 | } #oneline | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||
| 192 | # Perl specific subroutines | ||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 195 | # IN: 1 class (ignored) | ||||||||||||||||||||||||||||||||||||||||||
| 196 | # 2..N keys to watch for | ||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||
| 198 | 4 | ▶ | sub import { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=9 SCAR=32.0
| |||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||
| 200 | # being called from source (unless it's from the test-suite) | ||||||||||||||||||||||||||||||||||||||||||
| 201 | 4 | ▶ | warn "The '". | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
(caller)[2] and ($_[0] ne "_testing_" and not shift())
$_[0] ne "_testing_" and not shift()
MC/DC0%0/3
(caller)[2] and ($_[0] ne "_testing_" and not shift())
(caller)[2]
$_[0] ne "_testing_"
not shift()
Truth table25%1/4
A and B and not(C)
A= (caller)[2]B= $_[0] ne "_testing_"C= not shift()
| |||||||||||||||||||||||||||||||||||||||||||
| 202 | __PACKAGE__. | ||||||||||||||||||||||||||||||||||||||||||
| 203 | "' pragma is not supposed to be called from source\n" | ||||||||||||||||||||||||||||||||||||||||||
| 204 | if ( (caller)[2] ) and ( $_[0] ne '_testing_' and !shift ); | ||||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||
| 206 | # lose the class | ||||||||||||||||||||||||||||||||||||||||||
| 207 | 4 | shift; | |||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | # check all parameters | ||||||||||||||||||||||||||||||||||||||||||
| 210 | 4 | my @ignored; | |||||||||||||||||||||||||||||||||||||||||
| 211 | 4 | foreach (@_) { | |||||||||||||||||||||||||||||||||||||||||
| 212 | # it's all | ||||||||||||||||||||||||||||||||||||||||||
| 213 | 1 | ▶ | if ( m#^:?all$# ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 214 | 1 | $ALL= 1; | |||||||||||||||||||||||||||||||||||||||||
| 215 | } | ||||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||||
| 217 | # not all | ||||||||||||||||||||||||||||||||||||||||||
| 218 | elsif ( m#^:?selected$# ) { | ||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | $ALL= 0; | |||||||||||||||||||||||||||||||||||||||||
| 220 | } | ||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||
| 222 | # looks like an environment var reference | ||||||||||||||||||||||||||||||||||||||||||
| 223 | elsif ( m#^[A-Z_0-9]+$# ) { | ||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | $ENV{$_}= 1; | |||||||||||||||||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||||||||||||||||
| 227 | # huh? | ||||||||||||||||||||||||||||||||||||||||||
| 228 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | push @ignored, $_; | |||||||||||||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||
| 233 | # huh? | ||||||||||||||||||||||||||||||||||||||||||
| 234 | 4 | ▶ | warn "Ignored parameters: @ignored\n" if @ignored; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||
| 236 | # make sure we start with a clean slate | ||||||||||||||||||||||||||||||||||||||||||
| 237 | 4 | &reset; | |||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | # set up source filter | ||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | ▶ | return Filter::Util::Call::filter_add( sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | ▶ | if ( ( $STATUS= Filter::Util::Call::filter_read() ) > 0 ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | &oneline; | |||||||||||||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | $STATUS; | |||||||||||||||||||||||||||||||||||||||||
| 245 | 4 | } ); | |||||||||||||||||||||||||||||||||||||||||
| 246 | } #import | ||||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||||
| 248 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | __END__ | ||||||||||||||||||||||||||||||||||||||||||