RE: Conflict with Net::SSH::Perl and Tk?
"Konovalov, Vadim" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
> Maybe I should phrase the question better.
>
> Has anyone been able to successfully write
> a perl program that uses both Tk and Net::SSH::Perl
> and have it work?
I tried to reproduce a problem but it was not easy for me to install
Net::SSH::Perl, unfortunately.
(due to some configuration problems, which are not interesting here to
describe)
However there are some general advices from my side, as I had similar
compatibiliy problem with Tk.
perl/Tk is complex and contains following potential conflict places:
1. C part, which defines some functions that could clash with external
libraries on Linux (libtcl8.4.so is an example)
2. some AUTOLOAD tricks to have widgets loaded on the fly
3. It also exports some Perl functions into main:: namespace
I, personally, faced conflicts at item 1 (when using Tcl in same program)
and item 2 (when I invented my own twisted logic to AUTOLOAD, but this was
easy to avoid :) in real program projects.
Is it possible for you to get an idea which namely conflict you have? Is it
possible for you to check for item 2, so to see which functions are exported
by both modules?
Following simple one-liner:
perl -we '%r0=%::;eval "use CPAN";%r1=%::;print sort map{qq/$_\n/}grep
{!exists $r0{$_}}keys %r1'
gives an idea of exported names
Also, take a look to Tcl::Tk module from CPAN, which provides similar
functionality and have less chances to conflict.
>
> Thanks
>
> -Craig
>
> "Craig M. Votava" wrote:
> >
> > Folks-
> >
> > When I try to run the following:
> > ======================================================
> > #!/usr/bin/perl
> >
> > require Net::SSH::Perl;
> >
> > use Tk;
> >
> > my $ssh;
> > my $host="nwsgpb";
> >
> > $ssh = Net::SSH::Perl->new($host, protocol=>2);
> > ======================================================
> >
> > I get the attached errors. If I comment out the
> > "use Tk" everything works fine.
> >
> > Any thoughts why?
> >
> > Thanks
> >
> > -Craig Votava
> > Lucent Technologies
> >
> > "makerandom" is not exported by the Crypt::Random module at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random/Generator.pm line 12
> > "makerandom_itv" is not exported by the Crypt::Random module at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random/Generator.pm line 12
> > "makerandom_octet" is not exported by the Crypt::Random module at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random/Generator.pm line 12
> > Can't continue after import errors at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random/Generator.pm line 12
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random/Generator.pm
> line 12, <GEN0> line
> > 1.
> > Compilation failed in require at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random.pm line 18,
> <GEN0> line 1.
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/Random.pm line 18,
> <GEN0> line 1.
> > Compilation failed in require at
> /opt/exp/perl/lib/site_perl/5.6.1/Crypt/DH.pm
> > line 6, <GEN0> line 1.
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Crypt/DH.pm line 6, <GEN0> line 1.
> > Compilation failed in require at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/Kex/DH1.pm
> line 13, <GEN0> line
> > 1.
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/Kex/DH1.pm
> line 13, <GEN0> line
> > 1.
> > Compilation failed in require at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/Kex.pm line
> 6, <GEN0> line 1.
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/Kex.pm line
> 6, <GEN0> line 1.
> > Compilation failed in require at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/SSH2.pm line
> 6, <GEN0> line 1.
> > BEGIN failed--compilation aborted at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl/SSH2.pm line
> 6, <GEN0> line 1.
> > Compilation failed in require at
> > /opt/exp/perl/lib/site_perl/5.6.1/Net/SSH/Perl.pm line 51,
> <GEN0> line 1.
> > -++**==--++**==--++**==--++**==--++**==--++**==--++**==
> > This message was posted through the Stanford campus mailing list
> > server. If you wish to unsubscribe from this mailing list, send the
> > message body of "unsubscribe ptk" to [email protected]
> -++**==--++**==--++**==--++**==--++**==--++**==--++**==
> This message was posted through the Stanford campus mailing list
> server. If you wish to unsubscribe from this mailing list, send the
> message body of "unsubscribe ptk" to [email protected]
>
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]