Net::POP3->new() fails in PerlApp compiled script

E

Eric McDaniel

This may be a question for ActiveState support, but just in case anyone out
there knows what the problem is...

My call to Net::pOP3->new() works fine when run through the perl
interpreter, but fails when I compile the script with PerlApp and run it. My
system is Windows 2000, ActiveState Perl 5.8.0 build 806, PerlApp 5.2.0
build 520.

Here is the script:

##############################################################
#!perl -w

use strict;

use Net::pOP3;

my $p = Net::pOP3->new('mail.mydomain.com', Debug=>99)
or die('Server connection error');
##############################################################

The command'perl pop3.pl' yields this (successful) output:

Net::pOP3: Net::pOP3(2.23)
Net::pOP3: Net::Cmd(2.21)
Net::pOP3: Exporter(5.566)
Net::pOP3: IO::Socket::INET(1.26)
Net::pOP3: IO::Socket(1.27)
Net::pOP3: IO::Handle(1.21)

Net::pOP3=GLOB(0x1d524ac)<<< +OK X1 NT-POP3 Server mail013.readyhosting.com
(IMail 7.10 2193398-16)
Net::pOP3=GLOB(0x1d524ac)>>> RSET
Net::pOP3=GLOB(0x1d524ac)<<< +OK
Net::pOP3=GLOB(0x1d524ac)>>> QUIT
Net::pOP3=GLOB(0x1d524ac)<<< +OK POP3 Server saying Good-Bye


However, when I compile it with PerlApp ('perlapp pop3.pl') and run the
resulting pop3.exe, it dies:

Server connection error at pop3.pl line 7.


Any ideas?

Thanks.

-Eric
 
B

Bart Lateur

Eric said:
Any ideas?

Your error message isn't that helpful. See if you can print out a string
with some more info. See the docs for Net::pOP3 -- I'm a bit lazy
myself.

Anyway, it's rather typical for apps compiled with PerlApp or its
distant nephew perl2exe, if it fails, that one or more modules were
overlooked when building the distribution. (= the EXE). At first look I
see a lot of "use" statements in Net::pOP3, so I suggest you try and
dump the contents of %INC before that call on line 3. Data::Dumper would
be fine. Let's see if one isn't listed that is listed in the list you
gave in your post.
 
J

James Willmore

Eric McDaniel said:
This may be a question for ActiveState support, but just in case anyone out
there knows what the problem is...

My call to Net::pOP3->new() works fine when run through the perl
interpreter, but fails when I compile the script with PerlApp and run it. My
system is Windows 2000, ActiveState Perl 5.8.0 build 806, PerlApp 5.2.0
build 520.

Here is the script:

##############################################################
#!perl -w

use strict;

use Net::pOP3;

my $p = Net::pOP3->new('mail.mydomain.com', Debug=>99)
or die('Server connection error');
##############################################################

The command'perl pop3.pl' yields this (successful) output:

Net::pOP3: Net::pOP3(2.23)
Net::pOP3: Net::Cmd(2.21)
Net::pOP3: Exporter(5.566)
Net::pOP3: IO::Socket::INET(1.26)
Net::pOP3: IO::Socket(1.27)
Net::pOP3: IO::Handle(1.21)

Net::pOP3=GLOB(0x1d524ac)<<< +OK X1 NT-POP3 Server mail013.readyhosting.com
(IMail 7.10 2193398-16)
Net::pOP3=GLOB(0x1d524ac)>>> RSET
Net::pOP3=GLOB(0x1d524ac)<<< +OK
Net::pOP3=GLOB(0x1d524ac)>>> QUIT
Net::pOP3=GLOB(0x1d524ac)<<< +OK POP3 Server saying Good-Bye


However, when I compile it with PerlApp ('perlapp pop3.pl') and run the
resulting pop3.exe, it dies:

Server connection error at pop3.pl line 7.


Any ideas?

With perlcc, you have to include the modules that you have included in
the script. It may be the same with PerlApp.

Just a thought.

Jim
 
E

Eric McDaniel

Bart Lateur said:
Your error message isn't that helpful. See if you can print out a string
with some more info. See the docs for Net::pOP3 -- I'm a bit lazy
myself.

Anyway, it's rather typical for apps compiled with PerlApp or its
distant nephew perl2exe, if it fails, that one or more modules were
overlooked when building the distribution. (= the EXE). At first look I
see a lot of "use" statements in Net::pOP3, so I suggest you try and
dump the contents of %INC before that call on line 3. Data::Dumper would
be fine. Let's see if one isn't listed that is listed in the list you
gave in your post.

I would print out a better error message if I knew where to get one. The
Net::pOP3 docs say nothing about what happens when the constructor fails.
The observed behaviour is that it returns undef, with no indication of what
the problem was. Even with Debug=>99, I get no debug output when the
constructor fails.

I'll see if I can figure out what are the dependent modules.

-Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top