Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
No such thing as a small change
 
PerlMonks  

Re^4: pp can't pack MongoDB and Inline Module

by Alle (Novice)
on Sep 18, 2012 at 09:09 UTC ( #994245=note: print w/ replies, xml ) Need Help??


in reply to Re^3: pp can't pack MongoDB and Inline Module
in thread pp can't pack MongoDB and Inline Module

thank you! i already give up do this, i use pp and PDK-Pro(perlapp) create a exe file, all failure failure failure when use MongoDB .....


Comment on Re^4: pp can't pack MongoDB and Inline Module
Re^5: pp can't pack MongoDB and Inline Module
by Anonymous Monk on Sep 18, 2012 at 10:46 UTC

    thank you! i already give up do this, i use pp and PDK-Pro(perlapp) create a exe file, all failure failure failure when use MongoDB .....

    failures are always informative

Re^5: pp can't pack MongoDB and Inline Module
by marto (Chancellor) on Sep 18, 2012 at 12:32 UTC

    I've confirmed this issue. It does take a very long time to create an exe from the basic script you posted. Checking the list of dependencies, and therefore packaged modules I notice Any::Moose which then requires Moose or Mouse depending on your setup. I have no experience of using either, however I've been told by others that Moose (at least) is pretty bloated. This may not be true, but either way there's a large dependency list from the simple script below.

    For clarification my setup is Windows XP SP3 (I know, it's a wortk thing), Strawberry Perl 5.12.3, PAR::Packer 1.013. Older Core 2 Duo laptop, 1GB RAM.

    The script I used:

    #!/usr/bin/perl use strict; use warnings; use MongoDB; print "hi\n";

    The pp command pp -v -o mongodb.exe -x mongodb.pl (cut down from vvv and vv in an attempt to generate output less than 233KB). mongodb.exe is eventually created, and produces the output expected. There's nothing obvious to me in the logs (vvv, vv, v) as to what the hold up was. Perhaps someone else has packaged MongoDB and has more experience to draw from.

      Thank you for your tips and effort,When I install Mouse and use perlapp pack to exe file, it execuate successfully!

      But can't use MongoDB module to connection mongodb

      my code

      use strict; use utf8; use Encode; use MongoDB; use MongoDB::Connection; use MongoDB::Database; use Tkx; # mongodb my $conn = MongoDB::Connection->new(host => '127.0.0.1:27017', query_timeout => 1000 * 6000); my $db = $conn->dev;

      the error msg

      [DONE] Could not find a suitable Params::Validate implementation: Can't locat +e Params/Validate/XS.pm in @INC (@INC contains:) at /<C:\Users\Admini +strator\Desktop\StudyNotes\perl\perl-Tkx\tkx3.exe>Module/Runtime.pm l +ine 317. Can't locate Params/Validate/PP.pm in @INC (@INC contains:) at /<C:\Us +ers\Administrator\Desktop\StudyNotes\perl\perl-Tkx\tkx3.exe>Module/Ru +ntime.pm line 317. at /<C:\Users\Administrator\Desktop\StudyNotes\perl\perl-Tkx\tkx3.exe +>Params/Validate.pm line 66. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +StudyNotes\perl\perl-Tkx\tkx3.exe>DateTime/Duration.pm line 12. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +StudyNotes\perl\perl-Tkx\tkx3.exe>DateTime.pm line 43. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +StudyNotes\perl\perl-Tkx\tkx3.exe>MongoDB/GridFS.pm line 24. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +StudyNotes\perl\perl-Tkx\tkx3.exe>MongoDB/Database.pm line 23. BEGIN failed--compilation aborted at tkx3.pl line 7. [DONE]

        It seems Params::Validate::XS isn't being detected, and so not packaged. Can you please show how you called pp to create this executable? Could you try again specifically including this module via the -M option? Thanks.

        Update:

        Actually, perhaps a better idea would be to extract the executable you've created, as you would a normal zip file, that way you can examine exactly what has been packaged. In future it may be wise to run pp with some logging such (-v, -vv) and redirect that to a file for reference. I appreciate that packaging this module is time consuming but such logs may prove helpful when debugging problems.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-04-21 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls