On Wed, 10 Sep 2003, Stas Bekman wrote:

> What we want to skip is m|CVS/[^/]+$/, but it won't work
> on systems with a different slash. So File::Spec comes to
> help:
>
>   return '' if File::Spec->splitdir( $path )[-2] eq 'CVS';
>
> or something like that. however File::Spec::Unix talks
> about $path being a path, without a volume, which I have
> no idea if it's true. So may be a better solution is:
>
> use File::Basename;
> return '' (basename dirname $path) eq 'CVS';
>
> This is untested, but the point is that using portable
> tools sounds like a better idea than trying to craft the
> regex.

Thanks, Stas - that does work in excluding the CVS/ entries
from getting into blib:
============================================================
Index: lib/ModPerl/BuildMM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
retrieving revision 1.11
diff -u -r1.11 BuildMM.pm
--- lib/ModPerl/BuildMM.pm      21 May 2003 06:47:45 -0000      1.11
+++ lib/ModPerl/BuildMM.pm      11 Sep 2003 00:38:41 -0000
@@ -6,6 +6,7 @@
 use ExtUtils::MakeMaker ();
 use Cwd ();
 use File::Spec;
+use File::Basename;

 use Apache::Build ();
 use ModPerl::MM;
@@ -254,7 +255,7 @@
     }

     return '' if $path =~ m/\.(pl|cvsignore)$/;
-    return '' if $path =~ m:\bCVS/:;
+    return '' if (basename dirname $path) eq 'CVS';
     return '' if $path =~ m/~$/;

     $path;

=============================================================
-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to