Skip Menu |

This queue is for tickets about the File-Util CPAN distribution.

Report information
The Basics
Id: 38246
Status: resolved
Priority: 0/
Queue: File-Util

People
Owner: Nobody in particular
Requestors: muskie73 [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.23
Fixed in: (no value)



Subject: last_modified using wrong file test operator
The last_modified method is not returning the correct value (confirm by using the File::stat mtime method to compare). The problem seems to be that the last_modified sub in File::Util.pm is using the "last inode change" file test operator (-C) rather than the "last modified" operator (-M). Attached is a patch to fix this.
Subject: FileUtil_lastmod.patch
--- File/Util.pm.old 2008-08-06 08:41:18.708475752 -0400 +++ File/Util.pm 2008-08-06 08:42:04.448796042 -0400 @@ -1115,7 +1115,7 @@ return undef unless -e $f; - $^T - ((-C $f) * 60 * 60 * 24) + $^T - ((-M $f) * 60 * 60 * 24) }
Fixed in version 3.24, which should be available for download off CPAN in a couple hours or so. -- Tommy Butler On Wed Aug 06 08:44:12 2008, muskie73@comcast.net wrote: Show quoted text
> The last_modified method is not returning the correct value (confirm by > using the File::stat mtime method to compare). > > The problem seems to be that the last_modified sub in File::Util.pm is > using the "last inode change" file test operator (-C) rather than the > "last modified" operator (-M). > > Attached is a patch to fix this.