in reply to un-inplemented function in Net::SSH::Perl for Activestate Perl?

Both uses of getpwuid in NET::SSH::Perl can be trivially replaced by looking for the equivalent information from the environment

However, if you are uncomfortable with using information extracted from the environment for these purposes, then you can obtain the information from the system, by:

use win32:

Obviously this would need to be done conditionally upon the value of $^O


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: un-inplemented function in Net::SSH::Perl for Activestate Perl?
by jdelmedico (Initiate) on Apr 21, 2006 at 13:30 UTC
    Hello My name is Joe from Toronto just read your solution to the he getpwuid function is unimplemented at :/Perl/site/lib/Net/SSH/Perl.pm line 110. problem When I step through my program the error appears when the perl.pm hits this line in the perl.pm file my $home = $ENV{HOME} || (getpwuid($>))7; Obviousley I don't understand how to update the code to solve this. Can you please help me where I need to update the code.. I tried to modify HOME with HOMPATH I don't know where to apply your suggestions $ENV{USERNAME} for the first use (in _current_user()); $ENV{HOMEDRIVE} . $ENV{HOMEPATH} for the second (in _init() ); Thank you so much for your time.

      Sorry Joe. As I have no way to test any changes made to Net::SSH::Perl, I can only suggest specific workarounds to individual problems. If you do not have the knowledge to apply and test those changes, any advice I give you would be a little of the blind leading the blind.

      The best I can suggest is that you contact the module's author(s) and see if he/they have interest in making and maintaining the appropriate changes.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Thank you