Re: [Module::Build] In _backticks(): multi-arg open not accepted by perl5.004 parser
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <ke...@ma...> - 2006-04-10 04:02:12
|
I couldn't think of anything clever, so I'm dynamically generating that sub from a string at BEGIN{} time now. -Ken On Apr 9, 2006, at 8:09 PM, Ken Williams wrote: > Unfortunately that doesn't work either. At runtime, open() won't > unroll its arguments into a list, it seems to be using @cmd in a > scalar context. > > Lemme brainstorm a little bit and see if I can think of something > that compiles under 5.5 and runs under 5.6. > > -Ken > > > On Apr 9, 2006, at 12:09 PM, Ken Williams wrote: > >> Grr! >> >> This patch should fix it, though: >> >> @@ -346,7 +346,8 @@ >> my ($self, @cmd) = @_; >> if ($self->have_multiarg_pipeopen) { >> local *FH; >> - open FH, "-|", @cmd or die "Can't run @cmd: $!"; >> + unshift @cmd, "-|"; >> + open FH, @cmd or die "Can't run @cmd: $!"; >> return wantarray ? <FH> : join '', <FH>; >> } else { >> my $cmd = $self->_quote_args(@cmd); >> >> >> Committing. >> >> -Ken >> >> On Apr 9, 2006, at 12:53 AM, Randy W. Sims wrote: >> >>> randys@new-pieria:~/Module-Build$ ~/perl5.005/bin/perl5.00504 >>> Build.PL >>> >>> Too many arguments for open at lib/Module/Build/Base.pm line 355, >>> near "@cmd or"BEGIN not safe after errors--compilation aborted at >>> lib/Module/Build/Base.pm line 574. >>> BEGIN failed--compilation aborted at lib/Module/Build.pm line 14. >>> BEGIN failed--compilation aborted at Build.PL line 10. >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by xPML, a groundbreaking >>> scripting language >>> that extends applications into web and mobile media. Attend the >>> live webcast >>> and join the prime developer group breaking into this new coding >>> territory! >>> http://sel.as-us.falkag.net/sel? >>> cmd=lnk&kid=110944&bid=241720&dat=121642 >>> _______________________________________________ >>> Module-build-general mailing list >>> Mod...@li... >>> https://lists.sourceforge.net/lists/listinfo/module-build-general >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the >> live webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Module-build-general mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/module-build-general > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Module-build-general mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/module-build-general |