Symbian port: add Series 90 support
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Installed.pm
index 619b141..e8f9f3a 100644 (file)
@@ -16,7 +16,8 @@ my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/);
 require VMS::Filespec if $Is_VMS;
 
 use vars qw($VERSION);
-$VERSION = '0.07';
+$VERSION = '1.41';
+$VERSION = eval $VERSION;
 
 sub _is_prefix {
     my ($self, $path, $prefix) = @_;
@@ -26,8 +27,10 @@ sub _is_prefix {
         $prefix = VMS::Filespec::unixify($prefix);
         $path   = VMS::Filespec::unixify($path);
     }
-    $prefix =~ m!/+! && $prefix =~ s!/+!/!g;
-    $path   =~ m!/+! && $path   =~ s!/+!/!g;
+
+    # Sloppy Unix path normalization.
+    $prefix =~ s{/+}{/}g;
+    $path   =~ s{/+}{/}g;
 
     return 1 if substr($path, 0, length($prefix)) eq $prefix;
 
@@ -39,7 +42,7 @@ sub _is_prefix {
     return(0);
 }
 
-sub _is_doc { 
+sub _is_doc {
     my ($self, $path) = @_;
     my $man1dir = $Config{man1direxp};
     my $man3dir = $Config{man3direxp};
@@ -48,7 +51,7 @@ sub _is_doc {
            ($man3dir && $self->_is_prefix($path, $man3dir))
            ? 1 : 0)
 }
+
 sub _is_type {
     my ($self, $path, $type) = @_;
     return 1 if $type eq "all";
@@ -125,7 +128,7 @@ sub new {
         }
 
         # Read the .packlist
-        $self->{$module}{packlist} = 
+        $self->{$module}{packlist} =
           ExtUtils::Packlist->new($File::Find::name);
     };
 
@@ -184,7 +187,7 @@ sub files {
     my (@files);
     foreach my $file (keys(%{$self->{$module}{packlist}})) {
         push(@files, $file)
-          if ($self->_is_type($file, $type) && 
+          if ($self->_is_type($file, $type) &&
               $self->_is_under($file, @under));
     }
     return(@files);