App-Greple-xp
view release on metacpan or search on metacpan
lib/App/Greple/xp.pm view on Meta::CPAN
=head1 NAME
App::Greple::xp - extended pattern module
=head1 VERSION
Version 1.01
=head1 SYNOPSIS
greple -Mxp
=head1 DESCRIPTION
This module provides functions those can be used by B<greple> pattern
and region options.
=head1 OPTIONS
=over 7
=item B<--le-pattern> I<file>
=item B<--inside-pattern> I<file>
=item B<--outside-pattern> I<file>
=item B<--include-pattern> I<file>
=item B<--exclude-pattern> I<file>
Read file contents and use each lines as a pattern for options.
=item B<--le-string> I<file>
=item B<--inside-string> I<file>
=item B<--outside-string> I<file>
=item B<--include-string> I<file>
=item B<--exclude-string> I<file>
Almost same as B<*-pattern> option but each line is concidered as a
fixed string rather than regular expression.
=back
=head2 COMMENT
You can insert comment lines in pattern file. As for fixed string
file, there is no way to write comment.
Lines start with hash mark (C<#>) is ignored as a comment line.
String after double slash (C<//>) is also ignored with preceding
spaces.
=head2 MULTILINE REGEX
Complex pattern can be written on multiple lines as follows.
(?xxn) \
( (?<b>\[) | \@ ) # start with "[" or @ \
(?<n> [ \d : , ]+) # sequence of digit, ":", or "," \
(?(<b>) \] | ) # closing "]" if start with "[" \
$ # EOL
=head2 WILD CARD
Because I<file> parameter is globbed, you can use wild card to give
multiple files. If nothing matched to the wild card, this option is
simply ignored with no message.
$ greple -Mxp --exclude-pattern '*.exclude' ...
=head1 SEE ALSO
L<https://github.com/kaz-utashiro/greple>
L<https://github.com/kaz-utashiro/greple-xp>
=head1 AUTHOR
Kazumasa Utashiro
=head1 LICENSE
Copyright 2019-2025 Kazumasa Utashiro.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
package App::Greple::xp;
use v5.14;
use strict;
use warnings;
our $VERSION = "1.01";
( run in 1.259 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )