Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 90799
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.20.1_2
Fixed in: 3.0.0



Subject: questions in Makefile.PL
"Path to pg_config?" Questions in Makefile.PL prevent cpantesters smoker from functioning correctly: they cannot test this module and smoker hangs. Please use prompt from ExtUtils::MakeMaker. Also, environment variables PERL_MM_USE_DEFAULT or AUTOMATED_TESTING can be used to skip questions. -- Alexandr Ciornii, http://chorny.net
Thanks, we will fix this up.
RT-Send-CC: david [...] justatheory.com
Adding in David E. Wheeler, as this seems to be a part of App::Info
On 2013-11-25 09:48:48, TURNSTEP wrote: Show quoted text
> Adding in David E. Wheeler, as this seems to be a part of App::Info
App::Info::Handler::Prompt should not prompt if there is no TTY. If you don't want it to prompt at all, don't pass an App::Info::Handler::Prompt object to the App::Info::RDBMS::PostgreSQL constructor in Makefile.PL. However, know that in this case, it should only be prompting when it is unable to find pg_config. And it looks pretty hard for it.
Show quoted text
> If you don't want it to prompt at all, don't pass an > App::Info::Handler::Prompt object to the App::Info::RDBMS::PostgreSQL > constructor in Makefile.PL.
Yeah, we still want a prompt whenever possible. I confirmed that prompt still asks if those ENVs are set. Any objection to not prompting if those are set. David? Thinking line 83 of Prompt.pm
Show quoted text
> I confirmed that prompt still asks if those ENVs are set. Any > objection to not prompting if those are set. David? Thinking line 83 > of Prompt.pm
Something like line 184 of MakeMaker.pm perhaps?: if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { print "$def\n"; } else { $ans = <STDIN>; Not sure if we should stick AUTOMATED_TESTING in there too, or if that could be the job of DBD::Pg Makefile.PL somehow (perhaps eval the App::Info call)?
Subject: Re: [rt.cpan.org #90799] questions in Makefile.PL
Date: Mon, 25 Nov 2013 14:51:25 -0800
To: bug-DBD-Pg [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Nov 25, 2013, at 2:36 PM, Greg Sabino Mullane via RT <bug-DBD-Pg@rt.cpan.org> wrote: Show quoted text
> Something like line 184 of MakeMaker.pm perhaps?: > > if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { > print "$def\n"; > } > else { > $ans = <STDIN>; > > Not sure if we should stick AUTOMATED_TESTING in there too, or if that could be the job of DBD::Pg Makefile.PL somehow (perhaps eval the App::Info call)?
Oh, I changed it to this and push: my $p = $ENV{PERL_MM_USE_DEFAULT} || $ENV{AUTOMATED_TESTING} ? do { require App::Info::Handler::Print; App::Info::Handler::Print->new; } : do { require App::Info::Handler::Prompt; App::Info::Handler::Prompt->new; }; Best, David
Thanks, David. git id for the record is a8824993ebf866f541d37bd1f3eb8984bb194005. Changing status to patched.