# 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)){
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.";
}
$caching = 0;
}
if($caching) {
- push(@cache, $_);
+ push(@cache, $_) if @cache || /\S/;
}
else {
print OUT $_;
print OUT @cache;
@cache = ();
}
+ print OUT "\n";
$caching = 1;
}
}