From: Graham Knop Date: Wed, 13 Feb 2013 09:39:26 +0000 (-0500) Subject: Fix my lazy IO mistake X-Git-Tag: v0.001000~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2f6bc7bb8c5e9471f215d2893957f7abe1fb524;p=p5sagit%2FDistar.git Fix my lazy IO mistake --- diff --git a/lib/Distar.pm b/lib/Distar.pm index ad971be..df7fb8f 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -85,8 +85,7 @@ sub run_preflight { } sub MY::postamble { - open my $fh, '<', 'maint/Makefile.include'; - ($fh ? do { local $/; <$fh> } : '' ) . <<'END'; + my $post = <<'END'; preflight: perl -IDistar/lib -MDistar -erun_preflight $(VERSION) release: preflight @@ -103,6 +102,10 @@ readmefile: create_distdir pod2text $(VERSION_FROM) >$(DISTVNAME)/README $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-readme-to-manifest END + if (open my $fh, '<', 'maint/Makefile.include') { + $post .= do { local $/; <$fh> }; + } + return $post; } {