[csw-devel] SF.net SVN: gar:[19811] csw/mgar/gar/v2/bin/pathfilter

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Tue Dec 4 17:01:06 CET 2012


Revision: 19811
          http://gar.svn.sourceforge.net/gar/?rev=19811&view=rev
Author:   dmichelsen
Date:     2012-12-04 16:01:05 +0000 (Tue, 04 Dec 2012)
Log Message:
-----------
mGAR v2: Fix error when no selector is given

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/pathfilter

Modified: csw/mgar/gar/v2/bin/pathfilter
===================================================================
--- csw/mgar/gar/v2/bin/pathfilter	2012-12-04 10:38:29 UTC (rev 19810)
+++ csw/mgar/gar/v2/bin/pathfilter	2012-12-04 16:01:05 UTC (rev 19811)
@@ -14,6 +14,7 @@
 #   excluded also.
 
 use strict;
+use Carp;
 use Getopt::Long qw(:config no_ignore_case);
 use Pod::Usage;
 
@@ -53,8 +54,11 @@
   push @seltemp, $re;
 }
 
-my $mre = '^(' . join( '|', @seltemp ) . ')$';
-push @selection, [ $mode, qr/$mre/ ];
+# If @selection_args is empty the @selection must also be empty
+if( defined $mode ) {
+  my $mre = '^(' . join( '|', @seltemp ) . ')$';
+  push @selection, [ $mode, qr/$mre/ ];
+}
 
 pod2usage(-verbose => 2) if $help;
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list