From: Vincent Pit Date: Fri, 23 Aug 2013 18:48:13 +0000 (-0300) Subject: Make sure the POD headings are linkable X-Git-Tag: v1.05~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FRegexp-Wildcards.git;a=commitdiff_plain;h=510bd793e8fac0683f0ac86adbfd48b5af7b14b9 Make sure the POD headings are linkable --- diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index 59ac6d8..b65eebe 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -224,7 +224,10 @@ sub new { $self->capture($args{capture}); } -=head2 C<< new [ do => $what E type => $type ], capture => $captures >> +=head2 C + + my $rw = Regexp::Wildcards->new(do => $what, capture => $capture); + my $rw = Regexp::Wildcards->new(type => $type, capture => $capture); Constructs a new L object. @@ -238,7 +241,12 @@ The C option overrides C. C lists which atoms should be capturing. Refer to L for more details. -=head2 C<< do [ $what E set => $c1, add => $c2, rem => $c3 ] >> +=head2 C + + $rw->do($what); + $rw->do(set => $c1); + $rw->do(add => $c2); + $rw->do(rem => $c3); Specifies the list of metacharacters to convert or to prevent for escaping. They fit into six classes : @@ -333,7 +341,9 @@ No argument means C<< set => [ ] >>. The C method returns the L object. -=head2 C +=head2 C + + $rw->type($type); Notifies to convert the metacharacters that corresponds to the predefined type C<$type>. C<$type> can be any of : @@ -386,7 +396,12 @@ In particular, you can usually pass C<$^O> as the C<$type> and get the correspon The C method returns the L object. -=head2 C<< capture [ $captures E set => $c1, add => $c2, rem => $c3 ] >> +=head2 C + + $rw->capture($captures); + $rw->capture(set => $c1); + $rw->capture(add => $c2); + $rw->capture(rem => $c3); Specifies the list of atoms to capture. This method works like L, except that the classes are different : @@ -438,7 +453,10 @@ Capture matching C<{ ... , ... }> alternations. The C method returns the L object. -=head2 C +=head2 C + + my $rx = $rw->convert($wc); + my $rx = $rw->convert($wc, $type); Converts the wildcard expression C<$wc> into a regular expression according to the options stored into the L object, or to C<$type> if it's supplied. It successively escapes all unprotected regexp special characters that doesn't hold any meaning for wildcards, then replace C<'jokers'>, C<'sql'> and C<'commas'> or C<'brackets'> (depending on the L or L options), all of this by applying the C<'capture'> rules specified in the constructor or by L.