Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mail-Sender CPAN distribution.

Report information
The Basics
Id: 89074
Status: resolved
Priority: 0/
Queue: Mail-Sender

People
Owner: cwhitener [...] gmail.com
Requestors: KENTNL [...] cpan.org
tommy [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in:
  • 0.900-TRIAL
  • 0.900001-TRIAL
  • 0.900002-TRIAL



Subject: won't install with cpanm
The installer makefile prompts the user to set defaults for the module (y/N) This causes cpanm to sit waiting for a response from a user in the shell that was spawned for the automated install. Obviously this is impossible, leading to an infinite wait. As a result, cpanm can't complete the installation. You have to use the CPAN shell instead and manually answer yes or no at the prompt. Thanks.
On Mon Sep 30 13:15:26 2013, TOMMY wrote: Show quoted text
> The installer makefile prompts the user to set defaults for the module > (y/N) > > This causes cpanm to sit waiting for a response from a user in the > shell that was spawned for the automated install. Obviously this is > impossible, leading to an infinite wait. As a result, cpanm can't > complete the installation. You have to use the CPAN shell instead and > manually answer yes or no at the prompt. > > Thanks.
This is strange. What version were you attempting to install?? The Config.PL attempts to test whether it's being run under an automated installer and skip the questions.
Hi Tommy, I'm going to look into updating the installation process a bit to hopefully get rid of the need for the Config.PL script all together. Given that, I'll have to add a feature to generate a config after installation. Thanks, Chase

Yeah, Its not obvious why its blocking without reading this bug first.

I have cpanm set up to be interactive, but the actual prompt doesn't write to the interactive tty, it gets lost in the log.

So all I see is a blocked terminal. Upon digging into the process with htop + strace, I see its blocking on "read", and indeed, pumping a return key into the attached terminal results in it working.

( And then my monitor which shows me the log contents when they're updated shows me the prompt message being fed into the log .... alas, they turn up *after* I pressed return ... )

On 2016-05-08 13:51:56, KENTNL wrote: Show quoted text
> Yeah, Its not obvious why its blocking without reading this bug first. > > I have cpanm set up to be interactive, but the actual prompt doesn't > write to > the interactive tty, it gets lost in the log. > > So all I see is a blocked terminal. Upon digging into the process with > htop + > strace, I see its blocking on "read", and indeed, pumping a return key > into the > attached terminal results in it working. > > ( And then my monitor which shows me the log contents when they're > updated > shows me the prompt message being fed into the log .... alas, they > turn up > *after* I pressed return ... )
Looking at https://metacpan.org/source/JENDA/Mail-Sender-0.8.23/Config.PL#L18 the problems seems to be clear: the questions are printed to STDOUT, not STDERR. STDOUT is not flushed by default. Perl is usually smart enough to flush STDOUT automatically before a read from STDIN happens, but this does not always work. So in short: the solution is to use "print STDERR" instead of "print" in the whole script. Regards, Slaven
Hi Everyone, The following commit was made to update Config.PL a bit and change all print to STDOUT to STDERR as per Slaven's suggestion. https://github.com/Perl-Email-Project/Mail-Sender/commit/541eb83b6e618ba7c27d71a9f06303eac161d8a8 https://github.com/Perl-Email-Project/Mail-Sender/blob/master/Config.PL should now be ok under strict and warnings and has been tested on Perl 5.8.9 through Perl 5.24.0. I will put out a testing release soon for this fix. Thanks, Chase
Hi Everyone, I believe this to be working correctly. If you find that I'm mistaken, please yell at me (loudly). cpanm Mail::Sender@0.900002 That installs without error for me on the various boxes I've tested with. Thanks, Chase