/usr/share/perl5/App/Ack.pm is in ack-grep 2.14-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | package App::Ack;
use warnings;
use strict;
=head1 NAME
App::Ack - A container for functions for the ack program
=head1 VERSION
Version 2.14
=cut
our $VERSION;
our $COPYRIGHT;
BEGIN {
$VERSION = '2.14';
$COPYRIGHT = 'Copyright 2005-2014 Andy Lester.';
}
our $fh;
BEGIN {
$fh = *STDOUT;
}
our %types;
our %type_wanted;
our %mappings;
our %ignore_dirs;
our $is_filter_mode;
our $output_to_pipe;
our $dir_sep_chars;
our $is_cygwin;
our $is_windows;
use File::Spec 1.00015 ();
BEGIN {
# These have to be checked before any filehandle diddling.
$output_to_pipe = not -t *STDOUT;
$is_filter_mode = -p STDIN;
$is_cygwin = ($^O eq 'cygwin');
$is_windows = ($^O eq 'MSWin32');
$dir_sep_chars = $is_windows ? quotemeta( '\\/' ) : quotemeta( File::Spec->catfile( '', '' ) );
}
=head1 SYNOPSIS
If you want to know about the F<ack> program, see the F<ack> file itself.
No user-serviceable parts inside. F<ack> is all that should use this.
=head1 FUNCTIONS
=cut
=head2 remove_dir_sep( $path )
This functions removes a trailing path separator, if there is one, from its argument
=cut
sub remove_dir_sep {
my $path = shift;
$path =~ s/[$dir_sep_chars]$//;
return $path;
}
=head2 warn( @_ )
Put out an ack-specific warning.
=cut
sub warn {
return CORE::warn( _my_program(), ': ', @_, "\n" );
}
=head2 die( @_ )
Die in an ack-specific way.
=cut
sub die {
return CORE::die( _my_program(), ': ', @_, "\n" );
}
sub _my_program {
require File::Basename;
return File::Basename::basename( $0 );
}
=head2 filetypes_supported()
Returns a list of all the types that we can detect.
=cut
sub filetypes_supported {
return keys %mappings;
}
sub _get_thpppt {
my $y = q{_ /|,\\'!.x',=(www)=, U };
$y =~ tr/,x!w/\nOo_/;
return $y;
}
sub _thpppt {
my $y = _get_thpppt();
App::Ack::print( "$y ack $_[0]!\n" );
exit 0;
}
sub _bar {
my $x;
$x = <<'_BAR';
6?!I'7!I"?%+!
3~!I#7#I"7#I!?!+!="+"="+!:!
2?#I!7!I!?#I!7!I"+"=%+"=#
1?"+!?*+!=#~"=!+#?"="+!
0?"+!?"I"?&+!="~!=!~"=!+%="+"
/I!+!?)+!?!+!=$~!=!~!="+!="+"?!="?!
.?%I"?%+%='?!=#~$="
,,!?%I"?(+$=$~!=#:"~$:!~!
,I!?!I!?"I"?!+#?"+!?!+#="~$:!~!:!~!:!,!:!,":#~!
+I!?&+!="+!?#+$=!~":!~!:!~!:!,!:#,!:!,%:"
*+!I!?!+$=!+!=!+!?$+#=!~":!~":#,$:",#:!,!:!
*I!?"+!?!+!=$+!?#+#=#~":$,!:",!:!,&:"
)I!?$=!~!=#+"?!+!=!+!=!~!="~!:!~":!,'.!,%:!~!
(=!?"+!?!=!~$?"+!?!+!=#~"=",!="~$,$.",#.!:!=!
(I"+"="~"=!+&=!~"=!~!,!~!+!=!?!+!?!=!I!?!+"=!.",!.!,":!
%I$?!+!?!=%+!~!+#~!=!~#:#=!~!+!~!=#:!,%.!,!.!:"
$I!?!=!?!I!+!?"+!=!~!=!~!?!I!?!=!+!=!~#:",!~"=!~!:"~!=!:",&:" '-/
$?!+!I!?"+"=!+"~!,!:"+#~#:#,"=!~"=!,!~!,!.",!:".!:! */! !I!t!'!s! !a! !g!r!e!p!!! !/!
$+"=!+!?!+"~!=!:!~!:"I!+!,!~!=!:!~!,!:!,$:!~".&:"~!,# (-/
%~!=!~!=!:!.!+"~!:!,!.!,!~!=!:$.!,":!,!.!:!~!,!:!=!.#="~!,!:" ./!
%=!~!?!+"?"+!=!~",!.!:!?!~!.!:!,!:!,#.!,!:","~!:!=!~!=!:",!~! ./!
%+"~":!~!=#~!:!~!,!.!~!:",!~!=!~!.!:!,!.",!:!,":!=":!.!,!:!7! -/!
%~",!:".#:!=!:!,!:"+!:!~!:!.!,!~!,!.#,!.!,$:"~!,":"~!=! */!
&=!~!=#+!=!~",!.!:",#:#,!.",+:!,!.",!=!+!?!
&~!=!~!=!~!:"~#:",!.!,#~!:!.!+!,!.",$.",$.#,!+!I!?!
&~!="~!:!~":!~",!~!=!~":!,!:!~!,!:!,&.$,#."+!?!I!?!I!
&~!=!~!=!+!,!:!~!:!=!,!:!~&:$,!.!,".!,".!,#."~!+!?$I!
&~!=!~!="~!=!:!~":!,!~%:#,!:",!.!,#.",#I!7"I!?!+!?"I"
&+!I!7!:#~"=!~!:!,!:"~$.!=!.!,!~!,$.#,!~!7!I#?!+!?"I"7!
%7#?!+!~!:!=!~!=!~":!,!:"~":#.!,)7#I"?"I!7&
%7#I!=":!=!~!:"~$:"~!:#,!:!,!:!~!:#,!7#I!?#7)
$7$+!,!~!=#~!:!~!:!~$:#,!.!~!:!=!,":!7#I"?#7+=!?!
$7#I!~!,!~#=!~!:"~!:!,!:!,#:!=!~",":!7$I!?#I!7*+!=!+"
"I!7$I!,":!,!.!=":$,!:!,$:$7$I!+!?"I!7+?"I!7!I!7!,!
!,!7%I!:",!."~":!,&.!,!:!~!I!7$I!+!?"I!7,?!I!7',!
!7(,!.#~":!,%.!,!7%I!7!?#I"7,+!?!7*
7+:!,!~#,"=!7'I!?#I"7/+!7+
77I!+!7!?!7!I"71+!7,
_BAR
return App::Ack::__pic($x);
}
sub _cathy {
my $x = <<'CATHY';
0+!--+!
0|! "C!H!O!C!O!L!A!T!E!!! !|!
0|! "C!H!O!C!O!L!A!T!E!!! !|!
0|! "C!H!O!C!O!L!A!T!E!!! !|!
0|! $A"C!K!!! $|!
0+!--+!
6\! 1:!,!.! !
7\! /.!M!~!Z!M!~!
8\! /~!D! "M! !
4.! $\! /M!~!.!8! +.!M# 4
0,!.! (\! .~!M!N! ,+!I!.!M!.! 3
/?!O!.!M!:! '\! .O!.! +~!Z!=!N!.! 4
..! !D!Z!.!Z!.! '\! 9=!M".! 6
/.! !.!~!M".! '\! 8~! 9
4M!.! /.!7!N!M!.! F
4.! &:!M! !N"M# !M"N!M! #D!M&=! =
:M!7!M#:! !~!M!7!,!$!M!:! #.! !O!N!.!M!:!M# ;
8Z!M"~!N!$!D!.!N!?! !I!N!.! (?!M! !M!,!D!M".! 9
(?!Z!M!N!:! )=!M!O!8!.!M!+!M! !M!,! !O!M! +,!M!.!M!~!Z!N!M!:! &:!~! 0
&8!7!.!~!M"D!M!,! &M!?!=!8! !M!,!O! !M!+! !+!O!.!M! $M#~! !.!8!M!Z!.!M! !O!M"Z! %:!~!M!Z!M!Z!.! +
&:!M!7!,! *M!.!Z!M! !8"M!.!M!~! !.!M!.!=! #~!8!.!M! !7!M! "N!Z#I! !D!M!,!M!.! $."M!,! !M!.! *
2$!O! "N! !.!M!I! !7" "M! "+!O! !~!M! !d!O!.!7!I!M!.! !.!O!=!M!.! !M",!M!.! %.!$!O!D! +
1~!O! "M!+! !8!$! "M! "?!O! %Z!8!D!M!?!8!I!O!7!M! #M!.!M! "M",!M! 4
07!~! ".!8! !.!M! "I!+! !.!M! &Z!D!.!7!=!M! !:!.!M! #:!8"+! !.!+!8! !8! 3
/~!M! #N! !~!M!$! !.!M! !.!M" &~!M! "~!M!O! "D! $M! !8! "M!,!M!+!D!.! 1
#.! #?!M!N!.! #~!O! $M!.!7!$! "?" !?!~!M! '7!8!?!M!.!+!M"O! $?"$!D! !.!O! !$!7!I!.! 0
$,!M!:!O!?! ".! !?!=! $=!:!O! !M! "M! !M! !+!$! (.! +.!M! !M!.! !8! !+"Z!~! $:!M!$! !.! '
#.!8!.!I!$! $7!I! %M" !=!M! !~!M!D! "7!I! .I!O! %?!=!,!D! !,!M! !D!~!8!~! %D!M! (
#.!M"?! $=!O! %=!N! "8!.! !Z!M! #M!~! (M!:! #.!M" &O! !M!.! !?!,! !8!.!N!~! $8!N!M!,!.! %
*$!O! &M!,! "O! !.!M!.! #M! (~!M( &O!.! !7! "M! !.!M!.!M!,! #.!M! !M! &
)=!8!.! $.!M!O!.! "$!.!I!N! !I!M# (7!M(I! %D"Z!M! "=!I! "M! !M!:! #~!D! '
)D! &8!N!:! ".!O! !M!="M! "M! (7!M) %." !M!D!."M!.! !$!=! !M!,! +
(M! &+!.!M! #Z!7!O!M!.!~!8! +,!M#D!?!M#D! #.!Z!M#,!Z!?! !~!N! "N!.! !M! +
'D!:! %$!D! !?! #M!Z! !8!.! !M"?!7!?!7! '+!I!D! !?!O!:!M!:! ":!M!:! !M!7".!M! "8!+! !:!D! !.!M! *
%.!O!:! $.!O!+! !D!.! #M! "M!.!+!N!I!Z! "7!M!N!M!N!?!I!7!Z!=!M'D"~! #M!.!8!$! !:! !.!M! "N!?! !,!O! )
!.!?!M!:!M!I! %8!,! "M!.! #M! "N! !M!.! !M!.! !+!~! !.!M!.! ':!M! $M! $M!Z!$! !M!.! "D! "M! "?!M! (
!7!8! !+!I! ".! "$!=! ":!$! "+! !M!.! !O! !M!I!M".! !=!~! ",!O! '=!M! $$!,! #N!:! ":!8!.! !D!~! !,!M!.! !:!M!.! &
!:!,!.! &Z" #D! !.!8!."M!.! !8!?!Z!M!.!M! #Z!~! !?!M!Z!.! %~!O!.!8!$!N!8!O!I!:!~! !+! #M!.! !.!M!.! !+!M! ".!~!M!+! $
!.! 'D!I! #?!M!.!M!,! !.!Z! !.!8! #M&O!I!?! (~!I!M"." !M!Z!.! !M!N!.! "+!$!.! "M!.! !M!?!.! "8!M! $
(O!8! $M! !M!.! ".!:! !+!=! #M! #.!M! !+" *$!M":!.! !M!~! "M!7! #M! #7!Z! "M"$!M!.! !.! #
'$!Z! #.!7!+!M! $.!,! !+!:! #N! #.!M!.!+!M! +D!M! #=!N! ":!O! #=!M! #Z!D! $M!I! %
$,! ".! $.!M" %$!.! !?!~! "+!7!." !.!M!,! !M! *,!N!M!.$M!?! "D!,! #M!.! #N! +
,M!Z! &M! "I!,! "M! %I!M! !?!=!.! (Z!8!M! $:!M!.! !,!M! $D! #.!M!.! )
+8!O! &.!8! "I!,! !~!M! &N!M! !M!D! '?!N!O!." $?!7! "?!~! #M!.! #I!D!.! (
3M!,! "N!.! !D" &.!+!M!.! !M":!.":!M!7!M!D! 'M!.! "M!.! "M!,! $I! )
3I! #M! "M!,! !:! &.!M" ".!,! !.!$!M!I! #.! !:! !.!M!?! "N!+! ".! /
1M!,! #.!M!8!M!=!.! +~!N"O!Z"~! *+!M!.! "M! 2
0.!M! &M!.! 8:! %.!M!Z! "M!=! *O!,! %
0?!$! &N! )." .,! %."M! ":!M!.! 0
0N!:! %?!O! #.! ..! &,! &.!D!,! "N!I! 0
CATHY
return App::Ack::__pic($x);
}
sub __pic {
my($compressed) = @_;
$compressed =~ s/(.)(.)/$1x(ord($2)-32)/eg;
App::Ack::print( $compressed );
exit 0;
}
=head2 show_help()
Dumps the help page to the user.
=cut
sub show_help {
my $help_arg = shift || 0;
return show_help_types() if $help_arg =~ /^types?/;
App::Ack::print( <<"END_OF_HELP" );
Usage: ack [OPTION]... PATTERN [FILES OR DIRECTORIES]
Search for PATTERN in each source file in the tree from the current
directory on down. If any files or directories are specified, then
only those files and directories are checked. ack may also search
STDIN, but only if no file or directory arguments are specified,
or if one of them is "-".
Default switches may be specified in ACK_OPTIONS environment variable or
an .ackrc file. If you want no dependency on the environment, turn it
off with --noenv.
Example: ack -i select
Searching:
-i, --ignore-case Ignore case distinctions in PATTERN
--[no]smart-case Ignore case distinctions in PATTERN,
only if PATTERN contains no upper case.
Ignored if -i is specified
-v, --invert-match Invert match: select non-matching lines
-w, --word-regexp Force PATTERN to match only whole words
-Q, --literal Quote all metacharacters; PATTERN is literal
Search output:
--lines=NUM Only print line(s) NUM of each file
-l, --files-with-matches Only print filenames containing matches
-L, --files-without-matches Only print filenames with no matches
--output=expr Output the evaluation of expr for each line
(turns off text highlighting)
-o Show only the part of a line matching PATTERN
Same as --output='\$&'
--passthru Print all lines, whether matching or not
--match PATTERN Specify PATTERN explicitly.
-m, --max-count=NUM Stop searching in each file after NUM matches
-1 Stop searching after one match of any kind
-H, --with-filename Print the filename for each match (default:
on unless explicitly searching a single file)
-h, --no-filename Suppress the prefixing filename on output
-c, --count Show number of lines matching per file
--[no]column Show the column number of the first match
-A NUM, --after-context=NUM Print NUM lines of trailing context after
matching lines.
-B NUM, --before-context=NUM Print NUM lines of leading context before
matching lines.
-C [NUM], --context[=NUM] Print NUM lines (default 2) of output context.
--print0 Print null byte as separator between filenames,
only works with -f, -g, -l, -L or -c.
-s Suppress error messages about nonexistent or
unreadable files.
File presentation:
--pager=COMMAND Pipes all ack output through COMMAND. For
example, --pager="less -R". Ignored if output
is redirected.
--nopager Do not send output through a pager. Cancels
any setting in ~/.ackrc, ACK_PAGER or
ACK_PAGER_COLOR.
--[no]heading Print a filename heading above each file's
results. (default: on when used interactively)
--[no]break Print a break between results from different
files. (default: on when used interactively)
--group Same as --heading --break
--nogroup Same as --noheading --nobreak
--[no]color Highlight the matching text (default: on unless
output is redirected, or on Windows)
--[no]colour Same as --[no]color
--color-filename=COLOR
--color-match=COLOR
--color-lineno=COLOR Set the color for filenames, matches, and line
numbers.
--flush Flush output immediately, even when ack is used
non-interactively (when output goes to a pipe or
file).
File finding:
-f Only print the files selected, without
searching. The PATTERN must not be specified.
-g Same as -f, but only select files matching
PATTERN.
--sort-files Sort the found files lexically.
--show-types Show which types each file has.
--files-from=FILE Read the list of files to search from FILE.
-x Read the list of files to search from STDIN.
File inclusion/exclusion:
--[no]ignore-dir=name Add/remove directory from list of ignored dirs
--[no]ignore-directory=name Synonym for ignore-dir
--ignore-file=filter Add filter for ignoring files
-r, -R, --recurse Recurse into subdirectories (default: on)
-n, --no-recurse No descending into subdirectories
--[no]follow Follow symlinks. Default is off.
-k, --known-types Include only files of types that ack recognizes.
--type=X Include only X files, where X is a recognized
filetype.
--type=noX Exclude X files.
See "ack --help-types" for supported filetypes.
File type specification:
--type-set TYPE:FILTER:FILTERARGS
Files with the given FILTERARGS applied to the
given FILTER are recognized as being of type
TYPE. This replaces an existing definition for
type TYPE.
--type-add TYPE:FILTER:FILTERARGS
Files with the given FILTERARGS applied to the
given FILTER are recognized as being type TYPE.
--type-del TYPE Removes all filters associated with TYPE.
Miscellaneous:
--[no]env Ignore environment variables and global ackrc
files. --env is legal but redundant.
--ackrc=filename Specify an ackrc file to use
--ignore-ack-defaults Ignore default definitions included with ack.
--create-ackrc Outputs a default ackrc for your customization
to standard output.
--help, -? This help
--help-types Display all known types
--dump Dump information on which options are loaded
from which RC files
--[no]filter Force ack to treat standard input as a pipe
(--filter) or tty (--nofilter)
--man Man page
--version Display version & copyright
--thpppt Bill the Cat
--bar The warning admiral
--cathy Chocolate! Chocolate! Chocolate!
Exit status is 0 if match, 1 if no match.
ack's home page is at http://beyondgrep.com/
The full ack manual is available by running "ack --man".
This is version $VERSION of ack. Run "ack --version" for full version info.
END_OF_HELP
return;
}
=head2 show_help_types()
Display the filetypes help subpage.
=cut
sub show_help_types {
App::Ack::print( <<'END_OF_HELP' );
Usage: ack [OPTION]... PATTERN [FILES OR DIRECTORIES]
The following is the list of filetypes supported by ack. You can
specify a file type with the --type=TYPE format, or the --TYPE
format. For example, both --type=perl and --perl work.
Note that some extensions may appear in multiple types. For example,
.pod files are both Perl and Parrot.
END_OF_HELP
my @types = filetypes_supported();
my $maxlen = 0;
for ( @types ) {
$maxlen = length if $maxlen < length;
}
for my $type ( sort @types ) {
next if $type =~ /^-/; # Stuff to not show
my $ext_list = $mappings{$type};
if ( ref $ext_list ) {
$ext_list = join( '; ', map { $_->to_string } @{$ext_list} );
}
App::Ack::print( sprintf( " --[no]%-*.*s %s\n", $maxlen, $maxlen, $type, $ext_list ) );
}
return;
}
sub show_man {
require Pod::Usage;
Pod::Usage::pod2usage({
-input => $App::Ack::orig_program_name,
-verbose => 2,
-exitval => 0,
});
return;
}
=head2 get_version_statement
Returns the version information for ack.
=cut
sub get_version_statement {
require Config;
my $copyright = get_copyright();
my $this_perl = $Config::Config{perlpath};
if ($^O ne 'VMS') {
my $ext = $Config::Config{_exe};
$this_perl .= $ext unless $this_perl =~ m/$ext$/i;
}
my $ver = sprintf( '%vd', $^V );
return <<"END_OF_VERSION";
ack ${VERSION}
Running under Perl $ver at $this_perl
$copyright
This program is free software. You may modify or distribute it
under the terms of the Artistic License v2.0.
END_OF_VERSION
}
=head2 print_version_statement
Prints the version information for ack.
=cut
sub print_version_statement {
App::Ack::print( get_version_statement() );
return;
}
=head2 get_copyright
Return the copyright for ack.
=cut
sub get_copyright {
return $COPYRIGHT;
}
# print*() subs added in order to make it easy for a third party
# module (such as App::Wack) to redefine the display methods
# and show the results in a different way.
sub print { print {$fh} @_; return; }
sub print_first_filename { App::Ack::print( $_[0], "\n" ); return; }
sub print_blank_line { App::Ack::print( "\n" ); return; }
sub print_separator { App::Ack::print( "--\n" ); return; }
sub print_filename { App::Ack::print( $_[0], $_[1] ); return; }
sub print_line_no { App::Ack::print( $_[0], $_[1] ); return; }
sub print_column_no { App::Ack::print( $_[0], $_[1] ); return; }
sub print_count {
my $filename = shift;
my $nmatches = shift;
my $ors = shift;
my $count = shift;
my $show_filename = shift;
if ($show_filename) {
App::Ack::print( $filename );
App::Ack::print( ':', $nmatches ) if $count;
}
else {
App::Ack::print( $nmatches ) if $count;
}
App::Ack::print( $ors );
return;
}
sub print_count0 {
my $filename = shift;
my $ors = shift;
my $show_filename = shift;
if ($show_filename) {
App::Ack::print( $filename, ':0', $ors );
}
else {
App::Ack::print( '0', $ors );
}
return;
}
sub set_up_pager {
my $command = shift;
return if App::Ack::output_to_pipe();
my $pager;
if ( not open( $pager, '|-', $command ) ) {
App::Ack::die( qq{Unable to pipe to pager "$command": $!} );
}
$fh = $pager;
return;
}
=head2 output_to_pipe()
Returns true if ack's input is coming from a pipe.
=cut
sub output_to_pipe {
return $output_to_pipe;
}
=head2 exit_from_ack
Exit from the application with the correct exit code.
Returns with 0 if a match was found, otherwise with 1. The number of matches is
handed in as the only argument.
=cut
sub exit_from_ack {
my $nmatches = shift;
my $rc = $nmatches ? 0 : 1;
exit $rc;
}
=head1 COPYRIGHT & LICENSE
Copyright 2005-2014 Andy Lester.
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License v2.0.
=cut
1; # End of App::Ack
|