Augusto Flavio wrote:

Hi!


I'm have a big problem. I make a module(pm) and now i want compile this module. I tried use the perlcc but i receive the msg that the module can't be compiled because have shared libs.

However i found a module, PAR(Perl Archive Toolkit)
which can compile my module. Then, i was to install
this module(PAR). After the instalation of module i
run the command:

$ pp -o compiled.pm -M Exporter module.pm

ps.: The module.pm just require the lib Exporter.

I not have problems with the compilation. Then the
next step would be execute a script (CGI) that use the
compiled module.

I open my firefox and make run the script(CGI).
Unhappyly i get this msg: Unrecognized character \x7F at compiled.pm line 1.


Which i do? Have something wrong with the method of
compilation? Is someone that used the module PAR and
can help me?



Thanks for all. ps.: Sorry for my english



Augusto Flavio










__________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail




Are you working in a Windows variant? If so, Windows will not just execute something with a '.pm' extension. Try just using

  pp -o compiled.exe main_perl_file.pl

Notice in your example below you have ".pm" twice:
   > pp -o compiled.pm -M Exporter module.pm
I use "compiled.exe" because that would be the name of the executable I would 
be trying to create.  I use perl_file.pl because that is the perl code I would want the 
compiled executable to be created from.

Also, I use Exporter quite often in my modules, and I NEVER have to use '-M Exporter'. Try making your line just pp -o compiled.exe main_perl_file.pl

Internal to each perl module that I use, where I want to export subroutines 
(NOT in the .pl file!) I have something like this:

    package my_package;
    use Exporter;
    @ISA = qw(Exporter);
    @EXPORT = ( "subroutine_1",
                "subroutine_2",
                ...
                "subroutine_N",
              );

Good luck









Reply via email to