JimSi has asked for the wisdom of the Perl Monks concerning the following question:

I have a problem compiling or installing Net::SSLGlue / Net::SSLGlue::POP3 package on newest Ubuntu 14.04.1. Never had any problem with it on CentOS and the script works right there. On Ubuntu - if I install from package (apt) - it cannot run the script, and gave me following error:

$ ./t.perl Subroutine Net::POP3::starttls redefined at /usr/share/perl5/Net/SSLGl +ue/POP3.pm line 13. Subroutine Net::POP3::_STLS redefined at /usr/share/perl5/Net/SSLGlue/ +POP3.pm line 27. cannot find and replace IO::Socket::INET superclass at /usr/share/perl +5/Net/SSLGlue/POP3.pm line 93. Compilation failed in require at ./t.perl line 21. BEGIN failed--compilation aborted at ./t.perl line 21.

when I am trying to install from CPAN:
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/01_load.t .. Subroutine Net::SMTP::starttls redefined at /root/.cpan +/build/Net-SSLGlue-1.053-fRXdxl/blib/lib/Net/SSLGlue/SMTP.pm line 13. Subroutine Net::SMTP::_STARTTLS redefined at /root/.cpan/build/Net-SSL +Glue-1.053-fRXdxl/blib/lib/Net/SSLGlue/SMTP.pm line 30. t/01_load.t .. Failed 1/3 subtests Test Summary Report ------------------- t/01_load.t (Wstat: 0 Tests: 3 Failed: 1) Failed test: 1 Files=1, Tests=3, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.10 cusr + 0.00 csys = 0.12 CPU) Result: FAIL Failed 1/1 test programs. 1/3 subtests failed. make: *** [test_dynamic] Error 255

The script fails to load "Net::SSLGlue::POP3" module.
Please help
Thanks

Replies are listed 'Best First'.
Re: Ubuntu 14.04.1 & Net::SSLGlue::POP3
by noxxi (Pilgrim) on Apr 27, 2015 at 19:51 UTC
    It might be that you have installed a version of Net::POP3 which has SSL already built in. Since libnet version 3.0 SSL support is integrated into Net::POP3 so you don't need to use Net::SSLGlue any longer and in fact it conflicts with functions defined in Net::POP3. Just leave Net::SSLGlue away and everything works as expected.
      Thank you. Any suggestion for managing SSL and non-SSL POP3 library at the same script? I have this script running on a server, which sounds like have no SSL POP3 library yet, and I am not comfortable yet to upgrade it there, but development machine is my new ubuntu laptop, which has SSL enabled in the library.
        It's not a good idea to have a test setup which does not reflect the production setup, because then the results of your tests are not really trustworthy. Apart from the you might try a conditional load, i.e. something like this
        use Net::POP3; BEGIN { require Net::SSLGlue::POP3 if !defined &Net::POP3::starttls; }