perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r472431 - /perl/modperl/trunk/lib/Apache2/Status.pm
Date Wed, 08 Nov 2006 09:15:38 GMT
Author: pgollucci
Date: Wed Nov  8 01:15:37 2006
New Revision: 472431

URL: http://svn.apache.org/viewvc?view=rev&rev=472431
Log:
http://rt.cpan.org/Ticket/Display.html?id=22881

Make sue the fine in %INC is -e and therefore hopefully
stat() able.  

Previously fatal warnings caused this to bomb.

Reported by: LGODDARD <LGODDARD@cpan.org>

Modified:
    perl/modperl/trunk/lib/Apache2/Status.pm

Modified: perl/modperl/trunk/lib/Apache2/Status.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Status.pm?view=diff&rev=472431&r1=472430&r2=472431
==============================================================================
--- perl/modperl/trunk/lib/Apache2/Status.pm (original)
+++ perl/modperl/trunk/lib/Apache2/Status.pm Wed Nov  8 01:15:37 2006
@@ -217,11 +217,14 @@
         $module =~ s,\.pm$,,;
         next if $module eq 'mod_perl';
         my $v = ${"$module\:\:VERSION"} || '0.00';
+        my $mtime = -e $INC{$file} ? scalar localtime((stat $INC{$file})[9]) :
+            'N/A';
+
         push @retval, (
             "<tr>", 
             (map "<td>$_</td>", 
                 qq(<a href="$uri?$module">$module</a>),
-                $v, scalar localtime((stat $INC{$file})[9]), $INC{$file}),
+                $v, $mtime, $INC{$file}),
             "</tr>\n"
         );
     }



Mime
View raw message