in reply to NET::OpenSSH not working...

I can't verify this, as Net::OpenSSH refuses to install on my Windows machine/Strawberry Perl.

Are you getting that error with the exact five lines you posted above? If not, you have somewhere a line like this in your code:

use cwd;

Note the lowercase "c".

This is wrong, as Perl modules are case-sensitive. As you are on a case-insensitive (but case-preserving) filesystem, Perl will still find a file cwd.pm and load it, but thinks it does not have Cwd.pm loaded. When Net::OpenSSH requests to load Cwd.pm, Perl tries to load it and then overwrites the definitions in the Cwd:: namespace.

Replies are listed 'Best First'.
Re^2: NET::OpenSSH not working...
by coding_new (Sexton) on Jun 30, 2010 at 20:15 UTC

    I am getting the error with the exact five lines I posted above. Interestingly enough, if I add the use cwd; line I get even more warnings. The output for that is below. I am trying to just get the ssh piece working before doing anything else, so the code is simply the 5 lines.

    Subroutine Cwd::fastcwd redefined at C:/Perl/lib/cwd.pm line 753.

    Subroutine Cwd::getcwd redefined at C:/Perl/lib/cwd.pm line 753.

    Subroutine Cwd::abs_path redefined at C:/Perl/lib/cwd.pm line 753.

    Subroutine _carp redefined at C:/Perl/lib/Cwd.pm line 317.

    Subroutine _croak redefined at C:/Perl/lib/Cwd.pm line 318.

    Subroutine _backtick_pwd redefined at C:/Perl/lib/Cwd.pm line 321.

    Subroutine _perl_getcwd redefined at C:/Perl/lib/Cwd.pm line 378.

    Subroutine fastcwd_ redefined at C:/Perl/lib/Cwd.pm line 389.

    Subroutine chdir_init redefined at C:/Perl/lib/Cwd.pm line 437.

    Subroutine chdir redefined at C:/Perl/lib/Cwd.pm line 461.

    Subroutine _perl_abs_path redefined at C:/Perl/lib/Cwd.pm line 504.

    Subroutine fast_abs_path redefined at C:/Perl/lib/Cwd.pm line 582.

    Subroutine _vms_cwd redefined at C:/Perl/lib/Cwd.pm line 643.

    Subroutine _vms_abs_path redefined at C:/Perl/lib/Cwd.pm line 647.

    Subroutine _os2_cwd redefined at C:/Perl/lib/Cwd.pm line 684.

    Subroutine _win32_cwd redefined at C:/Perl/lib/Cwd.pm line 691.

    Subroutine _dos_cwd redefined at C:/Perl/lib/Cwd.pm line 704.

    Subroutine _qnx_cwd redefined at C:/Perl/lib/Cwd.pm line 715.

    Subroutine _qnx_abs_path redefined at C:/Perl/lib/Cwd.pm line 724

    Subroutine _epoc_cwd redefined at C:/Perl/lib/Cwd.pm line 739.

    Subroutine Cwd::fast_realpath redefined at C:/Perl/lib/Cwd.pm line 630.

    Subroutine Cwd::_NT_cwd redefined at C:/Perl/lib/Cwd.pm line 702.

    Subroutine Cwd::fastgetcwd redefined at C:/Perl/lib/Cwd.pm line 753.

    Subroutine Cwd::realpath redefined at C:/Perl/lib/Cwd.pm line 753.

    Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 753

    .

    Subroutine Cwd::cwd redefined at C:/Perl/lib/Cwd.pm line 753.

    Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 753.

    Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 753.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Use of uninitialized value in anonymous hash ({}) at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

    Odd number of elements in anonymous hash at C:/Perl/site/lib/Net/OpenSSH.pm line 196.

Re^2: NET::OpenSSH not working...
by coding_new (Sexton) on Jun 30, 2010 at 20:26 UTC

    To add to the note I said earlier. If I do add the use Cwd; with uppercase C, the warnings come out the same as in my original issue.