From: Vincent Pit Date: Fri, 23 Aug 2013 18:52:19 +0000 (-0300) Subject: POD verbatim paragraphs should fit into a terminal X-Git-Tag: v1.05~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FRegexp-Wildcards.git;a=commitdiff_plain;h=bfcb4effd064d9b5b4c15b1a189d10f3ea183803 POD verbatim paragraphs should fit into a terminal --- diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index b65eebe..9268405 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -31,8 +31,10 @@ BEGIN { my $re; $re = $rw->convert('a{b?,c}*'); # Do it Unix shell style. $re = $rw->convert('a?,b*', 'win32'); # Do it Windows shell style. - $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and escape the rest. - $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into regexps. + $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and + # escape the rest. + $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into + # regexps. $rw = Regexp::Wildcards->new( do => [ qw ], # Do jokers and brackets. @@ -40,7 +42,8 @@ BEGIN { ); $rw->do(add => 'groups'); # Don't escape groups. - $rw->capture(rem => [ qw ]); # Actually we want non-greedy matches. + $rw->capture(rem => [ qw ]); # Actually we want non-greedy + # matches. $re = $rw->convert('*a{,(b)?}?c*'); # '(.*?)a(?:|(b).).c(.*?)' $rw->capture(); # No more captures. @@ -336,7 +339,8 @@ No argument means C<< set => [ ] >>. $rw->do(set => 'jokers'); # Only translate jokers. $rw->do('jokers'); # Same. $rw->do(add => [ qw ]); # Translate also SQL and commas. - $rw->do(rem => 'jokers'); # Specifying both 'sql' and 'jokers' is useless. + $rw->do(rem => 'jokers'); # Specifying both 'sql' and + # 'jokers' is useless. $rw->do(); # Translate nothing. The C method returns the L object. @@ -445,9 +449,11 @@ Capture matching C<{ ... , ... }> alternations. =back - $rw->capture(set => 'single'); # Only capture "exactly one" metacharacters. + $rw->capture(set => 'single'); # Only capture "exactly one" + # metacharacters. $rw->capture('single'); # Same. - $rw->capture(add => [ qw ]); # Also greedily capture "any" metacharacters. + $rw->capture(add => [ qw ]); # Also greedily capture + # "any" metacharacters. $rw->capture(rem => 'greedy'); # No more greed please. $rw->capture(); # Capture nothing.