| line |
true |
false |
branch |
|
36
|
30 |
0 |
if (my $lib = abs_path($0) =~ s[/(?:script/|bin/)?\w+$][/lib]ru) |
|
37
|
0 |
30 |
if -d "$lib/App/Greple" |
|
185
|
2250 |
480 |
if ref $b ne "CODE" |
|
192
|
0 |
0 |
unless my $var = $optargs{$name} |
|
193
|
0 |
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 |
30 |
if $ENV{'DEBUG_GETOPT'} |
|
421
|
0 |
30 |
if $ENV{'DEBUG_GETOPTEX'} |
|
425
|
0 |
305 |
utf8::is_utf8($_) ? : |
|
428
|
30 |
0 |
unless (@ARGV and $ARGV[0] eq "--norc" and shift @ARGV or $ENV{'GREPLE_NORC'}) |
|
440
|
0 |
30 |
if $ENV{'GREPLEOPTS'} |
|
445
|
0 |
30 |
unless $parser->getoptions(@optargs) |
|
447
|
0 |
30 |
if ($opt_version) |
|
456
|
0 |
30 |
if ($opt_d{'o'}) |
|
461
|
30 |
0 |
!defined($opt_m) ? : |
|
463
|
0 |
0 |
if @param % 2 |
|
464
|
0 |
0 |
if (¬all(sub {
/^(-?\d+)?$/u;
}
, @param)) |
|
469
|
0 |
0 |
if ($length ne '') { } |
|
488
|
0 |
30 |
if ($opt_d{'u'}) |
|
490
|
0 |
0 |
if /\|([0-9a-zA-Z])\b/u |
|
495
|
0 |
30 |
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 |
30 |
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
|
30 |
0 |
if ($opt_filter) |
|
570
|
0 |
30 |
if $opt_i |
|
572
|
0 |
30 |
if (@opt_f) { } |
|
574
|
0 |
0 |
$opt_select ? : |
|
580
|
0 |
30 |
unless ($opt_filter or grep {not $_->[0] =~ /^(not|may)/u;} @opt_pattern) |
|
608
|
0 |
30 |
if (@opti > 0) |
|
627
|
0 |
30 |
$must ? : |
|
629
|
0 |
30 |
if (/^-(\d+)$/u) { } |
|
|
0 |
30 |
elsif (/^\+(\d+)$/u) { } |
|
|
30 |
0 |
elsif (/^(\d+)$/u) { } |
|
645
|
0 |
0 |
if (/^-(\d+)$/u) { } |
|
|
0 |
0 |
elsif (/^\+(\d+)$/u) { } |
|
|
0 |
0 |
elsif (/^(\d+)$/u) { } |
|
664
|
30 |
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
|
30 |
0 |
unless ($opt_noif) |
|
703
|
0 |
30 |
if (@opt_chdir) { } |
|
|
0 |
30 |
elsif (@opt_glob) { } |
|
707
|
0 |
0 |
unless ($opt_h or @opt_chdir == 1 and @argv_files == 1 and @opt_glob == 0) |
|
716
|
0 |
0 |
unless @ARGV or @argv_files or @opt_glob or $opt_readlist |
|
717
|
0 |
30 |
if (@ARGV > 1 || $opt_readlist and not $opt_h) |
|
721
|
30 |
0 |
unless $need_filename |
|
723
|
0 |
30 |
if $opt_joinby ne "" |
|
747
|
0 |
30 |
$opt_ansicolor eq '16' ? : |
|
760
|
20 |
10 |
if ($color_handler->list == 0) |
|
761
|
20 |
0 |
$opt_colorful ? : |
|
765
|
0 |
30 |
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
|
0 |
30 |
unless ($need_color) |
|
801
|
0 |
30 |
if (defined $opt_blockend) |
|
840
|
0 |
30 |
if ($color_index{'S'}) |
|
843
|
0 |
30 |
if ($color_index{'A'} or $color_index{'D'}) { } |
|
|
0 |
30 |
elsif ($color_index{'R'}) { } |
|
860
|
0 |
30 |
if ($opt_d{'c'}) |
|
874
|
0 |
30 |
if ($opt_border) { } |
|
|
0 |
30 |
elsif ($opt_p) { } |
|
883
|
0 |
30 |
if ($opt_C) |
|
921
|
0 |
98 |
if callable($_) |
|
922
|
30 |
68 |
if $pattern |
|
923
|
0 |
68 |
unless $_ = parse_func($_) |
|
942
|
0 |
30 |
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 |
30 |
if (@opt_pf) |
|
965
|
0 |
30 |
if defined $opt_usage |
|
967
|
0 |
30 |
unless open SAVESTDIN, "<&", \*STDIN |
|
968
|
0 |
30 |
unless open SAVESTDOUT, ">&", \*STDOUT |
|
969
|
0 |
30 |
unless open SAVESTDERR, ">&", \*STDERR |
|
972
|
0 |
28 |
unless open STDIN, "<&", \*SAVESTDIN |
|
975
|
0 |
0 |
unless open STDERR, ">&", \*SAVESTDERR |
|
980
|
0 |
0 |
unless open STDOUT, ">&", \*SAVESTDOUT |
|
995
|
30 |
0 |
if ($opt_error =~ /^(?: fatal | skip | retry )$/ux) { } |
|
|
0 |
0 |
elsif ($opt_error eq 'ignore') { } |
|
996
|
0 |
30 |
if ($opt_warn{'read'}) { } |
|
1000
|
0 |
0 |
if $@ |
|
1010
|
0 |
0 |
if ($opt_warn{'read'}) { } |
|
1040
|
0 |
30 |
!$need_color ? : |
|
1043
|
0 |
30 |
if ($opt_d{'n'} and $opt_d{'f'}) { } |
|
|
0 |
30 |
elsif ($opt_d{'n'}) { } |
|
|
0 |
30 |
elsif ($opt_d{'f'}) { } |
|
1057
|
0 |
30 |
if ($opt_d{'n'}) { } |
|
1058
|
0 |
0 |
if $n |
|
1071
|
0 |
30 |
if ($opt_d{'s'}) |
|
1081
|
0 |
28 |
if ($opt_d{'n'}) |
|
1085
|
0 |
0 |
if ($opt_uniqcolor and $opt_d{'c'}) |
|
1090
|
0 |
28 |
if ($opt_d{'s'}) |
|
1100
|
0 |
0 |
ref $v eq 'ARRAY' ? : |
|
1109
|
0 |
28 |
if ($opt_d{'p'}) |
|
1124
|
0 |
30 |
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
|
0 |
30 |
unless utf8::is_utf8($file) |
|
1205
|
0 |
30 |
if (do {
$file =~ m[^https?://]u
}) { } |
|
|
0 |
30 |
elsif ($file eq '-') { } |
|
1207
|
0 |
0 |
unless open STDIN, "-|" or exec "w3m -dump $file" |
|
1213
|
0 |
30 |
unless (open STDIN, "<", $file) |
|
1214
|
0 |
0 |
unless -l $file |
|
1219
|
0 |
30 |
if (my(@filters) = $filter_d->get_filters($file)) |
|
1223
|
0 |
30 |
if ($file_code eq 'binary') { } |
|
1244
|
0 |
46 |
if (my $msg = $@) |
|
1245
|
0 |
0 |
if ($msg =~ /^SKIP/iu) { } |
|
1246
|
0 |
0 |
if $opt_warn{'begin'} |
|
1254
|
0 |
28 |
if $progress_show |
|
1274
|
0 |
0 |
/P/iu ? : |
|
|
0 |
28 |
/G/iu ? : |
|
|
28 |
0 |
$opt_capture_group ? : |
|
1296
|
0 |
28 |
if ($opt_l) { } |
|
|
0 |
28 |
elsif ($opt_c) { } |
|
|
28 |
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 |
28 |
if $progress_reset |
|
1312
|
0 |
28 |
if @opt_of |
|
1316
|
0 |
28 |
if @opt_of |
|
1326
|
0 |
28 |
if $opt_clean |
|
1335
|
0 |
28 |
if ($opt_filestyle eq "once") |
|
1358
|
0 |
28 |
if (@opt_print) |
|
1363
|
0 |
0 |
unless ($opt_continue) |
|
1364
|
0 |
0 |
if defined $block |
|
1369
|
0 |
28 |
if ($opt_n) |
|
1378
|
0 |
28 |
if $opt_filestyle eq "separate" |
|
1382
|
0 |
28 |
if $opt_n and $opt_linestyle eq "separate" |
|
1385
|
0 |
28 |
if grep {$_;} do {
print &$_file($current_file) if $opt_filestyle eq "separate"
}, do {
print &$_line($line) if $opt_n and $opt_linestyle eq "separate"
}, do {
print &$_block($block_number) if $opt_b and $opt_blockstyle eq "separate"
} |
|
1386
|
0 |
28 |
if $opt_b and $opt_blockstyle eq "separate" |
|
1391
|
0 |
28 |
if ($indexer) |
|
1392
|
0 |
0 |
if $indexer->block |
|
1393
|
0 |
0 |
$indexer->reverse ? : |
|
1405
|
40 |
0 |
if ($callback) |
|
1407
|
0 |
40 |
if (ref $callback eq 'CODE') { } |
|
|
40 |
0 |
elsif (callable($callback)) { } |
|
1422
|
0 |
40 |
if ($opt_join) |
|
1423
|
0 |
0 |
if ($opt_n and $opt_linestyle eq 'line') { } |
|
1430
|
0 |
40 |
if $opt_uniqcolor |
|
1435
|
0 |
28 |
if $block eq "" |
|
1438
|
0 |
28 |
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 |
28 |
if $colormap{'TEXT'} ne "" |
|
1453
|
0 |
28 |
if (@line) |
|
1457
|
0 |
28 |
if ($opt_b and $opt_blockstyle eq "line") |
|
1462
|
0 |
28 |
if ($opt_filestyle eq "line") |
|
1467
|
0 |
28 |
if $is_top and $_top ne "" |
|
1469
|
0 |
28 |
if $opt_newline and not $block =~ /\n\z/u |
|
1470
|
0 |
28 |
if $need_blockend |
|
1471
|
28 |
0 |
if ($is_bottom) { } |
|
1472
|
0 |
28 |
if $_bottom ne "" |
|
1474
|
0 |
0 |
if $_middle ne "" |