in reply to Re^4: Cpan install gets stuck installing Net OpenSSH ?
in thread Cpan install gets stuck installing Net OpenSSH ?

That testing script runs some commands in order to find which shells are available on your system. One of those commands is not behaving as expected and not returning control back to the the testing script.

Could you run the following Perl code and post here the output:

$|=1; for (qw(sh csh bash tcsh ksh dash ash pdksh mksh zsh fish)) { print "shell: $_\n"; system $_ => '-c', 'echo good'; }

Replies are listed 'Best First'.
Re^6: Cpan install gets stuck installing Net OpenSSH ?
by syphilis (Archbishop) on Mar 12, 2016 at 11:35 UTC
    system $_ => '-c', 'echo good';

    Nothing to do with the OP's problem (and I apologise for intruding), but I'm wondering why you've written the system command that way as opposed to (say) either:
    system $_ => '-c' => 'echo good'; or system $_, '-c', 'echo good';
    Is it a stylistic preference, or is there a practical advantage in writing it the way you've chosen ?

    For me, all three of those alternatives work equally well on both Windows and Ubuntu.
    Admittedly, there's quite a few shells specified there that I don't have.

    Cheers,
    Rob
      Style... or lack of it!
Re^6: Cpan install gets stuck installing Net OpenSSH ?
by jtzako (Sexton) on Mar 12, 2016 at 16:48 UTC
    shell: sh good shell: csh good shell: bash good shell: tcsh good shell: ksh good shell: dash shell: ash shell: pdksh shell: mksh shell: zsh good shell: fish -bash-3.2$
      Working directory is /usr/local/home/myuser/.cpan/build/Net-OpenSSH-0.70-ARY6NC

      Try cd'ing to that directory, and then run:
      perl -Mblib t/quoting.t
      If that hangs, kill the process (Ctrl-C) and start inserting some print statements in t/quoting.t to see how far into the script you get before it hangs.
      Then we'll know precisely what function call is hanging - and you might even be able to insert some print statements into that function to more precisely locate the hang.

      If, for example, you find that the hang occurs in the shell_is_clean function (at about line 29 of t/quoting.t) you could stick print statements within that function (which is found in t/common.pm) to further narrow it down.

      Cheers,
      Rob
        I put in some prints and found where it stops. I put a print right before and after this line and it prints the one before but not the one after: my @shells = grep try_shell($_), qw(sh csh bash tcsh ksh dash ash pdksh mksh zsh fish);