[Module-build-checkins] [svn:Module-Build] r5893 - in Module-Build/trunk: . lib/Module/Build
Status: Beta
Brought to you by:
kwilliams
From: <ra...@cv...> - 2006-04-11 09:08:23
|
Author: randys Date: Tue Apr 11 02:07:57 2006 New Revision: 5893 Modified: Module-Build/trunk/Changes Module-Build/trunk/lib/Module/Build/Compat.pm Log: Do not warn when creating Makefile.PL if a Module::Build subclass is not bundled with the distribution; it might already be installed. Modified: Module-Build/trunk/Changes ============================================================================== --- Module-Build/trunk/Changes (original) +++ Module-Build/trunk/Changes Tue Apr 11 02:07:57 2006 @@ -2,6 +2,11 @@ 0.27_11 + - We should not emit a warning if a Module::Build subclass is + required in a Makefile.PL that is not bundled in the current + distribution; it may be installed on the user's system. [Spotted by + Tyler MacDonald] + - copy_if_modified() now preserves the executable bit of the source file. [Spotted by Julian Mehnle] Modified: Module-Build/trunk/lib/Module/Build/Compat.pm ============================================================================== --- Module-Build/trunk/lib/Module/Build/Compat.pm (original) +++ Module-Build/trunk/lib/Module/Build/Compat.pm Tue Apr 11 02:07:57 2006 @@ -42,24 +42,25 @@ print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n"; - # If a custom subclass is being used, make sure we add its directory to @INC + # If a *bundled* custom subclass is being used, make sure we add its + # directory to @INC. my $subclass_load = ''; if (ref($build) ne "Module::Build") { my $subclass_dir = $package->subclass_dir($build); - + if (File::Spec->file_name_is_absolute($subclass_dir)) { my $base_dir = $build->base_dir; if ($build->dir_contains($base_dir, $subclass_dir)) { $subclass_dir = File::Spec->abs2rel($subclass_dir, $base_dir); - } else { - $build->log_warn("Warning: builder subclass " . ref($build) . - " doesn't seem to have been loaded from within $base_dir"); + $subclass_load = "use lib '$subclass_dir';"; } + + } else { + $subclass_load = "use lib '$subclass_dir';"; } - $subclass_load = "use lib '$subclass_dir';"; } - + if ($type eq 'small') { printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build); use Module::Build::Compat 0.02; |