Professional Web Applications Themes

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

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) ...

  1. #1

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

    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




    Eric Guest

  2. #2

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

    Eric McDaniel wrote:
     

    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.

    --
    Bart.
    Bart Guest

  3. #3

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

    "Eric McDaniel" <com> wrote in message news:<24Ybb.553105$YN5.373571sccrnsc01>... 

    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
    James Guest

  4. #4

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


    "Bart Lateur" <be> wrote in message
    news:com... 
    >
    > 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.
    >[/ref]

    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


    Eric Guest

Similar Threads

  1. #39835 [NEW]: Configure script fails with expr: syntax error
    By cheetah at tanabi dot org in forum PHP Bugs
    Replies: 4
    Last Post: March 13th, 03:23 PM
  2. Installation script for Linux fails with Fedora 3
    By overbyte@earthlink.net in forum Macromedia Flash Player
    Replies: 0
    Last Post: August 7th, 08:18 PM
  3. unusual behaviour of perl script compiled with perlapp on hp-ux11i
    By strepxe@yahoo.co.uk in forum PERL Modules
    Replies: 1
    Last Post: May 8th, 07:33 PM
  4. Net::POP3
    By Lev Altshuler in forum PERL Modules
    Replies: 18
    Last Post: December 18th, 06:04 PM
  5. Net::POP3->new() fails in PerlApp compiled script
    By Eric McDaniel in forum PERL Modules
    Replies: 0
    Last Post: September 22nd, 04:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139