Add entry for prototype() in Pod::Functions
[p5sagit/p5-mst-13.2.git] / lib / AutoSplit.pm
index 2d2465f..f7b8eee 100644 (file)
@@ -149,7 +149,10 @@ sub autosplit_file{
 
     # where to write output files
     $autodir = "lib/auto" unless $autodir;
-    ($autodir = VMS::Filespec::unixpath($autodir)) =~ s#/$## if $Is_VMS;
+    if ($Is_VMS) {
+       ($autodir = VMS::Filespec::unixpath($autodir)) =~ s{/$}{};
+       $filename = VMS::Filespec::unixify($filename); # may have dirs
+    }
     unless (-d $autodir){
        local($", @p)="/";
        foreach(split(/\//,$autodir)){
@@ -251,6 +254,7 @@ sub autosplit_file{
     my @cache = ();
     my $caching = 1;
     while (<IN>) {
+       next if /^=\w/ .. /^=cut/;
        if (/^package ([\w:]+)\s*;/) {
            warn "package $1; in AutoSplit section ignored. Not currently supported.";
        }
@@ -282,7 +286,7 @@ sub autosplit_file{
            $caching = 0;
        }
        if($caching) {
-           push(@cache, $_);
+           push(@cache, $_) if @cache || /\S/;
        }
        else {
            print OUT $_;
@@ -292,6 +296,7 @@ sub autosplit_file{
                print OUT @cache;
                @cache = ();
            }
+           print OUT "\n";
            $caching = 1;
        }
     }