in reply to Compile Perl To Executable

Al little update, i'm try to use:
ActivePerl 5.12.4 Build 1205 Perl2Exe V10.40B for Windows 32-bit
Load all module, test it on cmd and the file .pl work, so try to convert in Perl2Exe ( just for see if work with another software ), conversion complete. I'm opening the exe and i have this error:
Unable to locate Mouse or Moose in INC at PERL2EXE_STORAGE/Any/Moose.p +m line 41. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Use of uninitialized value $Any::Moose::PREFERRED in string eq at PERL +2EXE_STORA GE/Any/Moose.pm line 197. Undefined subroutine &Class::MOP::get_metaclass_by_name called at PERL +2EXE_STORA GE/Any/Moose.pm line 111. BEGIN failed--compilation aborted at PERL2EXE_STORAGE/Math/Random/Secu +re/RNG.pm line 5. Compilation failed in require at PERL2EXE_STORAGE/Math/Random/Secure.p +m line 8. BEGIN failed--compilation aborted at PERL2EXE_STORAGE/Math/Random/Secu +re.pm line 8. Compilation failed in require at C:\Documents and Settings\Windows Xp\ +Desktop\Pa ssGen.exe line 18. BEGIN failed--compilation aborted at C:\Documents and Settings\Windows + Xp\Deskto p\PassGen.exe line 18. This exe file was created with the evaluation version of Perl2Exe. For more information visit http://www.indigostar.com (The full version does not display this message with a 2 second delay. +) ...
Don't find a module Any::Moose. So i'll add at the end of the file:
#perl2exe_include "C:\Perl\site\lib\Any\Moose.pm";
Nothing to do, same error. Try Cava Packager, "Success _ Scan No error _ Build Complete" and many error on .exe:
Could not load class (Mouse::Meta::Method::Delegation) because : Can't + locate Mo use/Meta/Method/Delegation.pm in @INC (@INC contains: Cava::Packager:: +Loader=HAS H(0xa4ece4) C:/DOCUME~1/WINDOW~1/Desktop/PassGen/installer/MyApp/lib/s +td) at C:/ DOCUME~1/WINDOW~1/Desktop/PassGen/installer/MyApp/lib/std/Mouse/Util.p +m line 261 . at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/installer/MyApp/lib/std/Mouse +/Util.pm l ine 270 Mouse::Util::load_class('Mouse::Meta::Method::Delegation') cal +led at C:/ DOCUME~1/WINDOW~1/Desktop/PassGen/installer/MyApp/lib/std/Mouse/Meta/A +ttribute.p m line 339 Mouse::Meta::Attribute::_make_delegation_method('Mouse::Meta:: +Attribute= HASH(0xd2d91c)', 'new_weak', 'new') called at C:/DOCUME~1/WINDOW~1/Des +ktop/PassG en/installer/MyApp/lib/std/Mouse/Meta/Attribute.pm line 280 Mouse::Meta::Attribute::install_accessors('Mouse::Meta::Attrib +ute=HASH(0 xd2d91c)') called at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/installer/My +App/lib/st d/Mouse/Meta/Class.pm line 241 Mouse::Meta::Class::add_attribute('Mouse::Meta::Class=HASH(0xe +2262c)', ' weak_source', 'isa', 'ClassName', 'is', 'rw', 'lazy_build', 1, 'cleare +r', ...) c alled at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/installer/MyApp/lib/std/ +Mouse.pm l ine 52 Mouse::has('weak_source', 'isa', 'ClassName', 'is', 'rw', 'laz +y_build', 1, 'clearer', 'clear_weak_source', ...) called at C:/DOCUME~1/WINDOW~1 +/Desktop/P assGen/installer/MyApp/lib/std/Crypt/Random/Source/Factory.pm line 40 require Crypt/Random/Source/Factory.pm called at C:/DOCUME~1/W +INDOW~1/De sktop/PassGen/installer/MyApp/lib/std/Math/Random/Secure/RNG.pm line 7 Math::Random::Secure::RNG::BEGIN() called at C:/DOCUME~1/WINDO +W~1/Deskto p/PassGen/installer/MyApp/lib/std/Crypt/Random/Source/Factory.pm line +0 eval {...} called at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/inst +aller/MyAp p/lib/std/Crypt/Random/Source/Factory.pm line 0 require Math/Random/Secure/RNG.pm called at C:/DOCUME~1/WINDOW +~1/Desktop /PassGen/installer/MyApp/lib/std/Math/Random/Secure.pm line 8 Math::Random::Secure::BEGIN() called at C:/DOCUME~1/WINDOW~1/D +esktop/Pas sGen/installer/MyApp/lib/std/Crypt/Random/Source/Factory.pm line 0 eval {...} called at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/inst +aller/MyAp p/lib/std/Crypt/Random/Source/Factory.pm line 0 require Math/Random/Secure.pm called at C:/DOCUME~1/WINDOW~1/D +esktop/Pas sGen/installer/MyApp/lib/std/cavaexecscript/PassGen.pl line 18 main::BEGIN() called at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/i +nstaller/M yApp/lib/std/Crypt/Random/Source/Factory.pm line 0 eval {...} called at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/inst +aller/MyAp p/lib/std/Crypt/Random/Source/Factory.pm line 0 require cavaexecscript/PassGen.pl called at <Packaged Modules> +/Applicati on::Loader line 1484 Cava::Pack::Code::_run_packaged_script('cavaexecscript/PassGen +.pl') call ed at <Packaged Modules>/Application::Loader line 1511 Cava::Pack::Code::_run_doscript() called at <Packaged Modules> +/Applicati on::Loader line 1573 Compilation failed in require at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/ +installer/ MyApp/lib/std/Math/Random/Secure/RNG.pm line 7. BEGIN failed--compilation aborted at C:/DOCUME~1/WINDOW~1/Desktop/Pass +Gen/instal ler/MyApp/lib/std/Math/Random/Secure/RNG.pm line 7. Compilation failed in require at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/ +installer/ MyApp/lib/std/Math/Random/Secure.pm line 8. BEGIN failed--compilation aborted at C:/DOCUME~1/WINDOW~1/Desktop/Pass +Gen/instal ler/MyApp/lib/std/Math/Random/Secure.pm line 8. Compilation failed in require at C:/DOCUME~1/WINDOW~1/Desktop/PassGen/ +installer/ MyApp/lib/std/cavaexecscript/PassGen.pl line 18. BEGIN failed--compilation aborted at C:/DOCUME~1/WINDOW~1/Desktop/Pass +Gen/instal ler/MyApp/lib/std/cavaexecscript/PassGen.pl line 18.
I'm wait for cavac or someone to test the conversion and write a little tutorial for me. I need the .exe for deploy, i can't install on every machine Perl. Thanks for support

Replies are listed 'Best First'.
Re^2: Compile Perl To Executable
by marto (Cardinal) on Jan 09, 2012 at 11:51 UTC

    "I'm wait for cavac or someone to test the conversion and write a little tutorial for me. I need the .exe for deploy, i can't install on every machine Perl. Thanks for support"

    While I wont write a tutorial for you, I can confirm I created an exe using pp with Strawberry Perl running on Windows XP, it executes without any errors. I'd suggest you read and understand the pp documentation, especially the 'example' section at the start.

      Thanks marto, Yesterday i have try to use pp without success:
      Can't call method "load_all_extensions" on an undefined value at C:/Pe +rl/site/lib/Module/Install.pm line 206. BEGIN failed--compilation aborted at C:\Documents and Settings\Windows + Xp\Desktop\PAR-1.002\Makefile.PL line 4.
      I need to follow a tutorial/guide for this, we'll see if finally i resolve this issue. Thanks again

        Our conversation in the CB isn't a productive use of either of our time. First ensure you know which Perl you're running, you claim to have tired both Strawberry and ActiveState:

        perl -V

        IIRC ActiveState perl installs to c:\perl by default. Strawberry to c:\strawberry, so you've either changed this during installation, or the error above is coming from ActiveState perl rather than Strawberry (which you claimed was the only Perl you had at the time). Since you're new to all this, my advice is to run only one Perl. I suggest you stick to Strawberry perl.

        Install modules using the cpan command, for example from the Windows command prompt:

        cpan pp

        This will install pp and all the other modules it needs. When people are telling you exactly what to type into the command prompt, don't report errors which result from running a different command. This is a waste of time for everyone concerned and only confuses the issue.

        Once you have installed pp (and the modules this script you've found online requires) you can create a executable by running the following:

        pp -x scriptname.pl

        This will generate a.exe as an output (I've confirmed this works, Strawberry Perl, Windows XP). Please read and understand the pp documentation regarding general use and options available.

Re^2: Compile Perl To Executable
by Anonymous Monk on Jan 09, 2012 at 09:53 UTC

    Nothing to do, same error. I'm wait for someone to test the conversion and write a little tutorial for me

    All aforementioned tools come with tutorials :D