From: Craig A. Berry Date: Thu, 25 Apr 2002 12:30:06 +0000 (-0500) Subject: MM_VMS.pm: handle empty PM_TO_BLIB X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ced61113f9085f589ca2d7c37e33eee7d8f51b9;p=p5sagit%2Fp5-mst-13.2.git MM_VMS.pm: handle empty PM_TO_BLIB From: "Craig A. Berry" Message-Id: p4raw-id: //depot/perl@16161 --- diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 787fda6..d3c9ede 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -745,29 +745,28 @@ sub pm_to_blib { pm_to_blib : pm_to_blib.ts $(NOECHO) $(NOOP) -}; - - push @m, <<'MAKE_FRAG', # As always, keep under DCL's 255-char limit pm_to_blib.ts : $(TO_INST_PM) - $(NOECHO) $(RM_F) .MM_tmp -MAKE_FRAG +}; - $line = ''; # avoid uninitialized var warning - while ($from = shift(@files),$to = shift(@files)) { + if (scalar(@files) > 0) { # protect ourselves from empty PM_TO_BLIB + + push(@m,qq[\t\$(NOECHO) \$(RM_F) .MM_tmp\n]); + $line = ''; # avoid uninitialized var warning + while ($from = shift(@files),$to = shift(@files)) { $line .= " $from $to"; if (length($line) > 128) { push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n"); $line = ''; } - } - push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line; + } + push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line; - push(@m,q[ $(PERLRUN) "-MExtUtils::Install" -e "pm_to_blib({split(' ',)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]); - push(@m,qq[ - \$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp; - \$(NOECHO) \$(TOUCH) pm_to_blib.ts -]); + push(@m,q[ $(PERLRUN) "-MExtUtils::Install" -e "pm_to_blib({split(' ',)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]); + push(@m,qq[\n\t\$(NOECHO) \$(RM_F) .MM_tmp\n]); + + } + push(@m,qq[\t\$(NOECHO) \$(TOUCH) pm_to_blib.ts]); join('',@m); }