[Module-build-checkins] [svn:Module-Build] r5891 - in Module-Build/trunk: . lib/Module/Build
Status: Beta
Brought to you by:
kwilliams
From: <ra...@cv...> - 2006-04-11 08:31:30
|
Author: randys Date: Tue Apr 11 01:30:57 2006 New Revision: 5891 Modified: Module-Build/trunk/Changes Module-Build/trunk/lib/Module/Build/Base.pm Log: Do not preserve timestamps of copied files. Modified: Module-Build/trunk/Changes ============================================================================== --- Module-Build/trunk/Changes (original) +++ Module-Build/trunk/Changes Tue Apr 11 01:30:57 2006 @@ -2,8 +2,8 @@ 0.27_11 - - copy_if_modified() now preserves the file mode and timestamps for - files that are copied. + - copy_if_modified() now preserves the executable bit of the source + file. [Spotted by Julian Mehnle] - Backing out a requirement added in 0.27_06 on the method y_n() to always include a default. This behavior would cause existing Modified: Module-Build/trunk/lib/Module/Build/Base.pm ============================================================================== --- Module-Build/trunk/lib/Module/Build/Base.pm (original) +++ Module-Build/trunk/lib/Module/Build/Base.pm Tue Apr 11 01:30:57 2006 @@ -3933,12 +3933,10 @@ $self->log_info("$file -> $to_path\n") if $args{verbose}; File::Copy::copy($file, $to_path) or die "Can't copy('$file', '$to_path'): $!"; - # preserve mode & timestamps; copied from ExtUtils::Install::pm_to_blib - my($mode, $atime, $mtime) = (stat $file)[2,8,9]; - my $mtime_adj = ($self->os_type eq 'VMS') ? 1 : 0; - utime($atime, $mtime + $mtime_adj, $to_path); + # mode is read-only + (executable if source is executable) + my $mode = (stat $file)[2]; $mode = 0444 | ( $mode & 0111 ? 0111 : 0 ); - chmod($mode, $to_path); + chmod( $mode, $to_path ); return $to_path; } |