$self->capture($args{capture});
}
-=head2 C<< new [ do => $what E<verbar> type => $type ], capture => $captures >>
+=head2 C<new>
+
+ my $rw = Regexp::Wildcards->new(do => $what, capture => $capture);
+ my $rw = Regexp::Wildcards->new(type => $type, capture => $capture);
Constructs a new L<Regexp::Wildcard> object.
C<capture> lists which atoms should be capturing.
Refer to L</capture> for more details.
-=head2 C<< do [ $what E<verbar> set => $c1, add => $c2, rem => $c3 ] >>
+=head2 C<do>
+
+ $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 :
The C<do> method returns the L<Regexp::Wildcards> object.
-=head2 C<type $type>
+=head2 C<type>
+
+ $rw->type($type);
Notifies to convert the metacharacters that corresponds to the predefined type C<$type>.
C<$type> can be any of :
The C<type> method returns the L<Regexp::Wildcards> object.
-=head2 C<< capture [ $captures E<verbar> set => $c1, add => $c2, rem => $c3 ] >>
+=head2 C<capture>
+
+ $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</do>, except that the classes are different :
The C<capture> method returns the L<Regexp::Wildcards> object.
-=head2 C<convert $wc [ , $type ]>
+=head2 C<convert>
+
+ 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<Regexp::Wildcards> 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</do> or L</type> options), all of this by applying the C<'capture'> rules specified in the constructor or by L</capture>.