| line |
true |
false |
branch |
|
36
|
21 |
0 |
if (my $lib = abs_path($0) =~ s[/(?:script/|bin/)?\w+$][/lib]ru)
|
|
37
|
0 |
21 |
if -d "$lib/App/Greple"
|
|
185
|
1575 |
336 |
if ref $b ne "CODE"
|
|
192
|
0 |
4 |
unless my $var = $optargs{$name}
|
|
193
|
4 |
0 |
if (ref $var eq 'SCALAR') { }
|
|
|
0 |
0 |
elsif (ref $var eq 'HASH' and @_ == 1) { }
|
|
294
|
0 |
0 |
$_[1] ? :
|
|
297
|
0 |
0 |
if ($_[1]) { }
|
|
363
|
0 |
0 |
if ($_ eq 'all') { }
|
|
372
|
0 |
0 |
if (my(@modules) = &uniq($rcloader->modules))
|
|
387
|
0 |
0 |
ref $_[0] eq 'HASH' ? :
|
|
389
|
0 |
0 |
if (exists $optargs{$name})
|
|
391
|
0 |
0 |
if (ref $ref eq 'ARRAY') { }
|
|
|
0 |
0 |
elsif (ref $ref eq 'CODE') { }
|
|
|
0 |
0 |
elsif (ref $ref eq 'SCALAR') { }
|
|
392
|
0 |
0 |
if ($opt->{'append'}) { }
|
|
420
|
0 |
21 |
if $ENV{'DEBUG_GETOPT'}
|
|
421
|
0 |
21 |
if $ENV{'DEBUG_GETOPTEX'}
|
|
425
|
0 |
114 |
utf8::is_utf8($_) ? :
|
|
428
|
21 |
0 |
unless (@ARGV and $ARGV[0] eq "--norc" and shift @ARGV or $ENV{'GREPLE_NORC'})
|
|
440
|
0 |
21 |
if $ENV{'GREPLEOPTS'}
|
|
445
|
0 |
21 |
unless $parser->getoptions(@optargs)
|
|
447
|
0 |
21 |
if ($opt_version)
|
|
456
|
0 |
21 |
if ($opt_d{'o'})
|
|
461
|
21 |
0 |
!defined($opt_m) ? :
|
|
463
|
0 |
0 |
if @param % 2
|
|
464
|
0 |
0 |
if (¬all(sub {
|
|
469
|
0 |
0 |
if ($length ne '') { }
|
|
488
|
0 |
21 |
if ($opt_d{'u'})
|
|
490
|
0 |
0 |
if /\|([0-9a-zA-Z])\b/u
|
|
495
|
0 |
21 |
if ($opt_man or $opt_show or $opt_path)
|
|
497
|
0 |
0 |
/^-M(\w+(::\w++(?![=(]))*)/u ? :
|
|
499
|
0 |
0 |
if (@module)
|
|
502
|
0 |
0 |
$jp ? :
|
|
505
|
0 |
0 |
unless $INC{$file}
|
|
506
|
0 |
0 |
if ($opt_man) { }
|
|
507
|
0 |
0 |
unless exec "$perldoc $module"
|
|
510
|
0 |
0 |
if ($opt_path) { }
|
|
514
|
0 |
0 |
unless exec "$pager $file"
|
|
526
|
0 |
0 |
if $module =~ /\b \.greplerc $/ux
|
|
527
|
0 |
0 |
if $module =~ /\b default $/ux
|
|
532
|
0 |
21 |
if (@opt_icode) { }
|
|
534
|
0 |
0 |
if (grep {s/^\+//u;} @opt_icode)
|
|
538
|
0 |
0 |
if (@opt_icode > 1) { }
|
|
|
0 |
0 |
elsif ($opt_icode[0] =~ /^(?:guess|auto)$/iu) { }
|
|
557
|
0 |
21 |
if ($opt_filter)
|
|
570
|
0 |
21 |
if $opt_i
|
|
572
|
0 |
21 |
if (@opt_f) { }
|
|
574
|
0 |
0 |
$opt_select ? :
|
|
580
|
0 |
21 |
unless ($opt_filter or grep {not $_->[0] =~ /^(not|may)/u;} @opt_pattern)
|
|
608
|
0 |
21 |
if (@opti > 0)
|
|
627
|
21 |
0 |
$must ? :
|
|
629
|
0 |
0 |
if (/^-(\d+)$/u) { }
|
|
|
0 |
0 |
elsif (/^\+(\d+)$/u) { }
|
|
|
0 |
0 |
elsif (/^(\d+)$/u) { }
|
|
645
|
0 |
0 |
if (/^-(\d+)$/u) { }
|
|
|
0 |
0 |
elsif (/^\+(\d+)$/u) { }
|
|
|
0 |
0 |
elsif (/^(\d+)$/u) { }
|
|
664
|
21 |
0 |
unless local $_ = shift()
|
|
665
|
0 |
0 |
if /[^\d,]/u
|
|
666
|
0 |
0 |
$_ eq '' ? :
|
|
667
|
0 |
0 |
if (@c == 1)
|
|
670
|
0 |
0 |
if @c % 2
|
|
674
|
0 |
0 |
if $_[0] < $min
|
|
675
|
0 |
0 |
if $max <= 0 or $_[0] <= $max
|
|
685
|
21 |
0 |
unless ($opt_noif)
|
|
703
|
0 |
21 |
if (@opt_chdir) { }
|
|
|
0 |
21 |
elsif (@opt_glob) { }
|
|
707
|
0 |
0 |
unless ($opt_h or @opt_chdir == 1 and @argv_files == 1 and @opt_glob == 0)
|
|
716
|
2 |
0 |
unless @ARGV or @argv_files or @opt_glob or $opt_readlist
|
|
717
|
0 |
21 |
if (@ARGV > 1 || $opt_readlist and not $opt_h)
|
|
721
|
21 |
0 |
unless $need_filename
|
|
723
|
0 |
21 |
if $opt_joinby ne ""
|
|
747
|
0 |
21 |
$opt_ansicolor eq '16' ? :
|
|
760
|
0 |
21 |
if ($color_handler->list == 0)
|
|
761
|
0 |
0 |
$opt_colorful ? :
|
|
765
|
0 |
21 |
if ($opt_ansicolor eq "24bit")
|
|
774
|
0 |
0 |
if ($mk eq '-') { }
|
|
|
0 |
0 |
elsif ($mk eq '=') { }
|
|
|
0 |
0 |
elsif ($s ne '') { }
|
|
775
|
0 |
0 |
if $s ne ""
|
|
779
|
0 |
0 |
if $c ne ""
|
|
789
|
21 |
0 |
unless ($need_color)
|
|
801
|
0 |
21 |
if (defined $opt_blockend)
|
|
840
|
0 |
21 |
if ($color_index{'S'})
|
|
843
|
0 |
21 |
if ($color_index{'A'} or $color_index{'D'}) { }
|
|
|
0 |
21 |
elsif ($color_index{'R'}) { }
|
|
860
|
0 |
21 |
if ($opt_d{'c'})
|
|
874
|
0 |
21 |
if ($opt_border) { }
|
|
|
0 |
21 |
elsif ($opt_p) { }
|
|
883
|
0 |
21 |
if ($opt_C)
|
|
921
|
0 |
53 |
if callable($_)
|
|
922
|
0 |
53 |
if $pattern
|
|
923
|
0 |
53 |
unless $_ = parse_func($_)
|
|
942
|
0 |
21 |
if ($opt_d{'m'})
|
|
946
|
0 |
0 |
$pat->is_positive ? :
|
|
|
0 |
0 |
$pat->is_negative ? :
|
|
|
0 |
0 |
$pat->is_required ? :
|
|
951
|
0 |
0 |
$pat->is_function ? :
|
|
|
0 |
0 |
@colors > 1 ? :
|
|
961
|
0 |
21 |
if (@opt_pf)
|
|
965
|
0 |
21 |
if defined $opt_usage
|
|
967
|
0 |
21 |
unless open SAVESTDIN, "<&", \*STDIN
|
|
968
|
0 |
21 |
unless open SAVESTDOUT, ">&", \*STDOUT
|
|
969
|
0 |
21 |
unless open SAVESTDERR, ">&", \*STDERR
|
|
972
|
0 |
21 |
unless open STDIN, "<&", \*SAVESTDIN
|
|
975
|
0 |
0 |
unless open STDERR, ">&", \*SAVESTDERR
|
|
980
|
0 |
2 |
unless open STDOUT, ">&", \*SAVESTDOUT
|
|
995
|
21 |
0 |
if ($opt_error =~ /^(?: fatal | skip | retry )$/ux) { }
|
|
|
0 |
0 |
elsif ($opt_error eq 'ignore') { }
|
|
996
|
0 |
21 |
if ($opt_warn{'read'}) { }
|
|
1000
|
0 |
0 |
if $@
|
|
1010
|
0 |
0 |
if ($opt_warn{'read'}) { }
|
|
1040
|
21 |
0 |
!$need_color ? :
|
|
1043
|
0 |
21 |
if ($opt_d{'n'} and $opt_d{'f'}) { }
|
|
|
0 |
21 |
elsif ($opt_d{'n'}) { }
|
|
|
0 |
21 |
elsif ($opt_d{'f'}) { }
|
|
1057
|
0 |
21 |
if ($opt_d{'n'}) { }
|
|
1058
|
0 |
0 |
if $n
|
|
1071
|
0 |
21 |
if ($opt_d{'s'})
|
|
1081
|
0 |
21 |
if ($opt_d{'n'})
|
|
1085
|
0 |
0 |
if ($opt_uniqcolor and $opt_d{'c'})
|
|
1090
|
0 |
21 |
if ($opt_d{'s'})
|
|
1100
|
0 |
0 |
ref $v eq 'ARRAY' ? :
|
|
1109
|
0 |
21 |
if ($opt_d{'p'})
|
|
1124
|
0 |
21 |
unless (defined $content)
|
|
1125
|
0 |
0 |
if ($opt_error eq "fatal")
|
|
1128
|
0 |
0 |
if ($opt_error ne "retry")
|
|
1129
|
0 |
0 |
if $opt_warn{'skip'}
|
|
1135
|
0 |
0 |
unless (seek STDIN, 0, 0)
|
|
1137
|
0 |
0 |
if $opt_warn{'skip'}
|
|
1141
|
0 |
0 |
unless (defined $content)
|
|
1142
|
0 |
0 |
if $opt_warn{'skip'}
|
|
1145
|
0 |
0 |
if $opt_warn{'retry'}
|
|
1172
|
0 |
0 |
$opt_usage ? :
|
|
1173
|
0 |
0 |
if $help eq "ignore"
|
|
1193
|
0 |
0 |
if $opt_d{'d'}
|
|
1194
|
0 |
0 |
unless chdir $start_directory
|
|
1195
|
0 |
0 |
unless chdir $dir
|
|
1202
|
2 |
19 |
unless utf8::is_utf8($file)
|
|
1205
|
0 |
21 |
if (do {
|
|
|
2 |
19 |
elsif ($file eq '-') { }
|
|
1207
|
0 |
0 |
unless open STDIN, "-|" or exec "w3m -dump $file"
|
|
1213
|
0 |
19 |
unless (open STDIN, "<", $file)
|
|
1214
|
0 |
0 |
unless -l $file
|
|
1219
|
0 |
21 |
if (my(@filters) = $filter_d->get_filters($file))
|
|
1223
|
0 |
21 |
if ($file_code eq 'binary') { }
|
|
1244
|
0 |
25 |
if (my $msg = $@)
|
|
1245
|
0 |
0 |
if ($msg =~ /^SKIP/iu) { }
|
|
1246
|
0 |
0 |
if $opt_warn{'begin'}
|
|
1254
|
0 |
21 |
if $progress_show
|
|
1274
|
0 |
0 |
/P/iu ? :
|
|
|
0 |
0 |
/G/iu ? :
|
|
|
0 |
21 |
$opt_capture_group ? :
|
|
1296
|
0 |
21 |
if ($opt_l) { }
|
|
|
0 |
21 |
elsif ($opt_c) { }
|
|
|
21 |
0 |
elsif (@{$grep->result_ref}) { }
|
|
1297
|
0 |
0 |
if ($matched)
|
|
1298
|
0 |
0 |
if $progress_reset
|
|
1300
|
0 |
0 |
if $opt_c
|
|
1305
|
0 |
0 |
if $progress_reset
|
|
1306
|
0 |
0 |
if $need_filename
|
|
1310
|
0 |
21 |
if $progress_reset
|
|
1312
|
2 |
19 |
if @opt_of
|
|
1316
|
2 |
19 |
if @opt_of
|
|
1326
|
0 |
21 |
if $opt_clean
|
|
1335
|
0 |
21 |
if ($opt_filestyle eq "once")
|
|
1358
|
0 |
73 |
if (@opt_print)
|
|
1363
|
0 |
0 |
unless ($opt_continue)
|
|
1364
|
0 |
0 |
if defined $block
|
|
1369
|
0 |
73 |
if ($opt_n)
|
|
1378
|
0 |
73 |
if $opt_filestyle eq "separate"
|
|
1382
|
0 |
73 |
if $opt_n and $opt_linestyle eq "separate"
|
|
1385
|
0 |
73 |
if grep {$_;} do {
|
|
1386
|
0 |
73 |
if $opt_b and $opt_blockstyle eq "separate"
|
|
1391
|
0 |
73 |
if ($indexer)
|
|
1392
|
0 |
0 |
if $indexer->block
|
|
1393
|
0 |
0 |
$indexer->reverse ? :
|
|
1405
|
166 |
0 |
if ($callback)
|
|
1407
|
166 |
0 |
if (ref $callback eq 'CODE') { }
|
|
|
0 |
0 |
elsif (callable($callback)) { }
|
|
1422
|
0 |
166 |
if ($opt_join)
|
|
1423
|
0 |
0 |
if ($opt_n and $opt_linestyle eq 'line') { }
|
|
1430
|
0 |
166 |
if $opt_uniqcolor
|
|
1435
|
0 |
73 |
if $block eq ""
|
|
1438
|
0 |
73 |
if ($opt_n)
|
|
1439
|
0 |
0 |
if ($opt_linestyle eq 'line') { }
|
|
1440
|
0 |
0 |
$block =~ /[\n$mark]/u ? :
|
|
1442
|
0 |
0 |
unless $+{'mark'}
|
|
1444
|
0 |
0 |
$+{'mark'} ? :
|
|
1451
|
0 |
73 |
if $colormap{'TEXT'} ne ""
|
|
1453
|
0 |
73 |
if (@line)
|
|
1457
|
0 |
73 |
if ($opt_b and $opt_blockstyle eq "line")
|
|
1462
|
0 |
73 |
if ($opt_filestyle eq "line")
|
|
1467
|
0 |
73 |
if $is_top and $_top ne ""
|
|
1469
|
0 |
73 |
if $opt_newline and not $block =~ /\n\z/u
|
|
1470
|
0 |
73 |
if $need_blockend
|
|
1471
|
21 |
52 |
if ($is_bottom) { }
|
|
1472
|
0 |
21 |
if $_bottom ne ""
|
|
1474
|
0 |
52 |
if $_middle ne ""
|