[Israel.pm] I wonder about these errors (perlapp)

Berler Chanan chananb at centerity.com
Sun May 17 01:02:14 PDT 2009


Thanks for helping me understand the idea of PerlApp.
As for using PerlApp, well I am in a position where I write Nagios plugins,
and all kinda stuff around
MySQL and Nagios, and we don't really want customers to have the plugins
sources.
So we do compile the plugins and other scripts we write to executable
standalone programs
(some for CentOS5.x and some for Win).

Thanks
Chanan

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf
Of Roey Almog (Infoneto Ltd)
Sent: Sunday, May 17, 2009 8:39 AM
To: Perl in Israel
Subject: Re: [Israel.pm] I wonder about these errors (perlapp)

Chanan Hi,

PerlApp does not actually compiles your code it is just packing it in
one executable file that acts like self extract and run -  and as
ActiveState says - "Convert Perl program into a standalone
application"

Perl App use all sort of heuristics to find what modules should be
packed so your program will run on any computer (regardless if perl
installed or not) many times it checks very deeply trying to get
modules referenced by other modules you use but they are actually no
in use in your case - e.g.
Examples you have some where in one of the modules code like this

eval {require Some::Module::Better};
if ($@)
{
    require Some::Module::Regular;
}

This code  tries (at run time) to require one module first and if this
module is missing it will try to require the other, in this case Perl
App will try to add both modules to the executable package how ever it
is that one of those is missing in you computer however the program
will run.

Sometimes program created with Perl App will die saying it is missing
a file and you will have to include it manually.

This is the original documentation regarding this problem directly
from ActiveState's docs:

"Error: Can't locate module.pm

When PerlApp can't locate a module that seems to be used or required
by the application, it produces an error message:

    VMS\Stdio.pm:
        warn: Can't locate VMS\Stdio.pm
        refby: C:\perl\lib\File\Temp.pm
In general, PerlApp cannot determine whether a module is absolutely
needed at runtime. For the error message above, looking at the source
code of the File::Temp module reveals that the VMS::Stdio module is
only used on the VMS platform:

    require VMS::Stdio if $^O eq 'VMS';
It is therefore safe to ignore the error. PerlApp includes a number of
platform-specific rules telling it that certain dependencies are
likely not required. In those cases, the error messages are downgraded
to a warning. In all other cases it is the responsibility of the user
to verify if the module is needed or not. PerlApp still generates a
valid executable, even while this error message is displayed.

It is possible to suppress the error/warning message by explicitly
excluding the missing module with the --trim option:

    --trim VMS::Stdio"

Hope this help

P.S. - do you commonly use Perl App ?

Roey Almog
Infoneto Ltd
On Thu, May 14, 2009 at 6:30 PM, Berler Chanan <chananb at centerity.com>
wrote:
>
> Hi All,
>
> I am using perlapp (activestate) to compile my perl scripts (under win)
> I wonder why I get all kinda error messages, while the script compiled,
and
> a new executable is created ?
> How can be an executable working compiled exe, while I get these errors ?
> See my errors:
> Thanks
> Chanan
>
> PerlApp 7.3.0 build 287519
> Copyright (C) 1998-2008 ActiveState Software Inc. All rights reserved.
> Standard license for Moshe Sharon <moshes at centerity.com>
>
> Expect.pm:
>        error: Can't locate Expect.pm
>        refby: C:\Perl\site\lib\Net\SFTP\Foreign.pm line 412
> IO\Compress\Bzip2.pm:
>        error: Can't locate IO\Compress\Bzip2.pm
>        refby: C:\Perl\lib\Archive\Tar\Constant.pm line 74
> IO\Pty.pm:
>        error: Can't locate IO\Pty.pm
>        refby: C:\Perl\site\lib\Net\SFTP\Foreign.pm line 410
> IO\Uncompress\Bunzip2.pm:
>        error: Can't locate IO\Uncompress\Bunzip2.pm
>        refby: C:\Perl\lib\Archive\Tar\Constant.pm line 73
> Sort\Key.pm:
>        error: Can't locate Sort\Key.pm
>        refby: C:\Perl\site\lib\Net\SFTP\Foreign\Helpers.pm line 43
>
> Summary: 5 errors and 0 warnings
>
> Created 'plugin_manager_client.exe' [Test it]
> Executable size: 2.57 MB
>
> [DONE]
>
>
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://mail.perl.org.il/mailman/listinfo/perl
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.329 / Virus Database: 270.12.24/2108 - Release Date: 05/16/09
17:05:00



More information about the Perl mailing list