[Bps-public-commit] Shipwright branch, master, updated. b1dd80d37f1858ceccbbfa29246462a12b3f65fa
? sunnavy
sunnavy at bestpractical.com
Tue Jun 8 02:18:46 EDT 2010
The branch, master has been updated
via b1dd80d37f1858ceccbbfa29246462a12b3f65fa (commit)
from 9d2bb3bd4a4c1c85a47cf9ee67239ec4fe22ef79 (commit)
Summary of changes:
lib/Shipwright/Source/Base.pm | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit b1dd80d37f1858ceccbbfa29246462a12b3f65fa
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jun 8 14:18:18 2010 +0800
consider "do filename" in Makefile.PL if it uses Module::Install
diff --git a/lib/Shipwright/Source/Base.pm b/lib/Shipwright/Source/Base.pm
index 7b292a8..068f0ba 100644
--- a/lib/Shipwright/Source/Base.pm
+++ b/lib/Shipwright/Source/Base.pm
@@ -170,10 +170,19 @@ sub _follow {
elsif ( -e 'Makefile.PL' ) {
my $makefile = read_file('Makefile.PL')
or confess_or_die "can't read Makefile.PL: $!";
-
if ( $makefile =~ /inc::Module::Install/ ) {
$self->log->info("is a Module::Install based dist");
+ # in case people call another file, which contains
+ # keywords like requires, features, etc
+ # see Task::Plack for a real example
+ while ( $makefile =~ /(do\s+(['"])(.*?)\2\s*;\s*$)/m ) {
+ my $line = $1;
+ my $content = read_file($3);
+ $content =~ s/^__END__$ .*//xsmg;
+ $makefile =~ s/$line/$content;/;
+ }
+
# PREREQ_PM in Makefile is not good enough for inc::Module::Install, which
# will omit features(..). we'll put deps in features(...) into recommends part
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list