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

I have a working piece of code that looks like this:
#!/usr/bin/perl -Tw use strict; use CGI qw/:param/; use Net::POP3; use utf8; my $serverName = 'pop.chello.nl'; my $pop3 = new Net::POP3 ($serverName); print "Hello\n";

Now if i add
use Net::SMTP;

to the header, the Hello is not printed. If i remove the 'use Net::SMTP;' again, the Hello IS printed.

Does anybody have any idea what the problem might be?

Replies are listed 'Best First'.
Re: Net::SMTP ruins Net:::POP3
by Jaap (Curate) on Oct 04, 2002 at 19:29 UTC
    I am terribly ashamed but i found it: it was a tainting problem. "Insecure dependency..."
    Thank you for the help.
Re: Net::SMTP ruins Net:::POP3
by Jaap (Curate) on Oct 04, 2002 at 18:24 UTC
    Hmmmm... upon futher testing this issue it seems like it is very inconsistent. The above is not true. It is more like a random effect now.

    It's is however not the only strange behaviour the Net:: modules have shown me. I think i just might switch to one of the 999 other mail modules.
      After having sent mail with Net::SMTP and about 800 of the other 999 mail modules, I've stuck with, and would like to recommend Mail::Sender. Now that is easy mailing. :)
      You have moved into a dark place.
      It is pitch black. You are likely to be eaten by a grue.
      What version of perl?

      I'd be more worried about the "use utf8;" than either of the Net modules. If you remove the utf8, does the problem go away?

      For certain combinations of perl releases and module versions, I think utf8 could cause odd problems. This might be one of them...
      --
      Mike

Re: Net::SMTP ruins Net:::POP3
by Jaap (Curate) on Oct 04, 2002 at 19:26 UTC
    Well... it is not 'use utf8' and it is not Net::SMTP or Net::POP3.

    I am now using Mail::POP3Client and the problem pops up again. I am using Perl 5.6.1