From: Mike Guy Date: Sat, 12 May 2001 19:24:33 +0000 (+0100) Subject: Incorrect line numbers in AutoSplit X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8fac18776ead9df1e47e1b139606bde4e393d42;p=p5sagit%2Fp5-mst-13.2.git Incorrect line numbers in AutoSplit Message-Id: p4raw-id: //depot/perl@10093 --- diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index 8fcf528..3147152 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -54,7 +54,7 @@ $keep defaults to 0. The fourth argument, I<$check>, instructs C to check the module -currently being split to ensure that it does include a C +currently being split to ensure that it includes a C specification for the AutoLoader module, and skips the module if AutoLoader is not detected. $check defaults to 1. @@ -199,6 +199,8 @@ sub autosplit_lib_modules{ # private functions +my $self_mod_time = (stat __FILE__)[9]; + sub autosplit_file { my($filename, $autodir, $keep, $check_for_autoloader, $check_mod_time) = @_; @@ -268,7 +270,8 @@ sub autosplit_file { if ($check_mod_time){ my($al_ts_time) = (stat("$al_idx_file"))[9] || 1; - if ($al_ts_time >= $pm_mod_time){ + if ($al_ts_time >= $pm_mod_time and + $al_ts_time >= $self_mod_time){ print "AutoSplit skipped ($al_idx_file newer than $filename)\n" if ($Verbose >= 2); return undef; # one undef, not a list @@ -338,13 +341,14 @@ sub autosplit_file { if ($Verbose>=1); } push(@outfiles, $path); + my $lineno = $fnr - @cache; print OUT <