Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Wow, I am befuddled. Here's a minimal case demonstrating the problem. The follow code runs fine
use strict; use Data::Dumper; use Net::SSH::W32Perl; use Net::SFTP; use Memoize; my $host = 'xxxxxx'; my $user = 'xxxxx'; my $password = 'xxxxxx'; my $sftp = Net::SFTP->new( $host, user => $user, password => $password, debug => 0, protocol => 2 );
But if I use GetOpt::Declare,
use strict; use Data::Dumper; use Net::SSH::W32Perl; use Net::SFTP; use Memoize; use GetOpt::Declare; my $host = 'xxxxxx'; my $user = 'xxxxx'; my $password = 'xxxxxx'; my $sftp = Net::SFTP->new( $host, user => $user, password => $password, debug => 0, protocol => 2 );
all hell breaks loose and I get heaps of complaints
C:\TWO\scratch>perl sftp.pl "makerandom" is not exported by the Crypt::Random module "makerandom_itv" is not exported by the Crypt::Random module "makerandom_octet" is not exported by the Crypt::Random module Can't continue after import errors at C:/APPS/Perl/site/lib/Crypt/Rand +om/Generator.pm line 12 BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Crypt/Rando +m/Generator.pm line 12, <GEN0> line 1. Compilation failed in require at C:/APPS/Perl/site/lib/Crypt/Random.pm + line 18, <GEN0> line 1. BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Crypt/Rando +m.pm line 18, <GEN0> line 1. Compilation failed in require at C:/APPS/Perl/site/lib/Crypt/DH.pm lin +e 6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Crypt/DH.pm + line 6, <GEN0> line 1. Compilation failed in require at C:/APPS/Perl/site/lib/Net/SSH/Perl/Ke +x/DH1.pm line 13, <GEN0> line 1. BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Net/SSH/Per +l/Kex/DH1.pm line 13, <GEN0> l ine 1. Compilation failed in require at C:/APPS/Perl/site/lib/Net/SSH/Perl/Ke +x.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Net/SSH/Per +l/Kex.pm line 6, <GEN0> line 1 . Compilation failed in require at C:/APPS/Perl/site/lib/Net/SSH/Perl/SS +H2.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Net/SSH/Per +l/SSH2.pm line 6, <GEN0> line 1. Compilation failed in require at C:/APPS/Perl/site/lib/Net/SSH/W32Perl +/SSH2.pm line 7, <GEN0> line 1 . BEGIN failed--compilation aborted at C:/APPS/Perl/site/lib/Net/SSH/W32 +Perl/SSH2.pm line 7, <GEN0> li ne 1. Compilation failed in require at C:/APPS/Perl/site/lib/Net/SSH/Perl.pm + line 55, <GEN0> line 1. C:\TWO\scratch>
Never seen behavior like this before... how or why is GetOpt::Declare upsetting Net::SFTP?

???

rkg


In reply to Net::SFTP name space conflict with GetOpt::Declare? by rkg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-20 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found