]> git.vpit.fr Git - perl/modules/Regexp-Wildcards.git/blobdiff - lib/Regexp/Wildcards.pm
Switch to qw<>
[perl/modules/Regexp-Wildcards.git] / lib / Regexp / Wildcards.pm
index d0f9ab3f134560b14360adb95d99b5a9e3e8577a..8d79b936abdc19cb2ce7fcd5c12852d738eb5d60 100644 (file)
@@ -3,8 +3,8 @@ package Regexp::Wildcards;
 use strict;
 use warnings;
 
-use Carp qw/croak/;
-use Text::Balanced qw/extract_bracketed/;
+use Carp           qw<croak>;
+use Text::Balanced qw<extract_bracketed>;
 
 =head1 NAME
 
@@ -16,7 +16,7 @@ Version 1.03
 
 =cut
 
-use vars qw/$VERSION/;
+use vars qw<$VERSION>;
 BEGIN {
  $VERSION = '1.03';
 }
@@ -34,12 +34,12 @@ BEGIN {
     $re = $rw->convert('%a_c%',   'sql');    # Turn SQL wildcards into regexps.
 
     $rw = Regexp::Wildcards->new(
-     do      => [ qw/jokers brackets/ ], # Do jokers and brackets.
-     capture => [ qw/any greedy/ ],      # Capture *'s greedily.
+     do      => [ qw<jokers brackets> ], # Do jokers and brackets.
+     capture => [ qw<any greedy> ],      # Capture *'s greedily.
     );
 
     $rw->do(add => 'groups');            # Don't escape groups.
-    $rw->capture(rem => [ qw/greedy/ ]); # Actually we want non-greedy matches.
+    $rw->capture(rem => [ qw<greedy> ]); # Actually we want non-greedy matches.
     $re = $rw->convert('*a{,(b)?}?c*');  # '(.*?)a(?:|(b).).c(.*?)'
     $rw->capture();                      # No more captures.
 
@@ -65,20 +65,20 @@ sub _check_self {
 }
 
 my %types = (
- jokers   => [ qw/jokers/ ],
- sql      => [ qw/sql/ ],
- commas   => [ qw/commas/ ],
- brackets => [ qw/brackets/ ],
- unix     => [ qw/jokers brackets/ ],
- win32    => [ qw/jokers commas/ ],
+ jokers   => [ qw<jokers> ],
+ sql      => [ qw<sql> ],
+ commas   => [ qw<commas> ],
+ brackets => [ qw<brackets> ],
+ unix     => [ qw<jokers brackets> ],
+ win32    => [ qw<jokers commas> ],
 );
-$types{$_} = $types{win32} for qw/dos os2 MSWin32 cygwin/;
-$types{$_} = $types{unix}  for qw/linux
+$types{$_} = $types{win32} for qw<dos os2 MSWin32 cygwin>;
+$types{$_} = $types{unix}  for qw<linux
                                   darwin machten next
                                   aix irix hpux dgux dynixptx
                                   bsdos freebsd openbsd
                                   svr4 solaris sunos dec_osf
-                                  sco_sv unicos unicosmk/;
+                                  sco_sv unicos unicosmk>;
 
 my %escapes = (
  jokers   => '?*',
@@ -115,7 +115,7 @@ sub _validate {
  }
 
  my %checked;
- for (qw/set add rem/) {
+ for (qw<set add rem>) {
   my $opt = $opts{$_};
   next unless defined $opt;
   my $cb = {
@@ -310,7 +310,7 @@ No argument means C<< set => [ ] >>.
 
     $rw->do(set => 'jokers');           # Only translate jokers.
     $rw->do('jokers');                  # Same.
-    $rw->do(add => [ qw/sql commas/ ]); # Translate also SQL and commas.
+    $rw->do(add => [ qw<sql commas> ]); # Translate also SQL and commas.
     $rw->do(rem => 'jokers');           # Specifying both 'sql' and 'jokers' is useless.
     $rw->do();                          # Translate nothing.
 
@@ -415,7 +415,7 @@ Capture matching C<{ ... , ... }> alternations.
 
     $rw->capture(set => 'single');           # Only capture "exactly one" metacharacters.
     $rw->capture('single');                  # Same.
-    $rw->capture(add => [ qw/any greedy/ ]); # Also greedily capture "any" metacharacters.
+    $rw->capture(add => [ qw<any greedy> ]); # Also greedily capture "any" metacharacters.
     $rw->capture(rem => 'greedy');           # No more greed please.
     $rw->capture();                          # Capture nothing.