Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

It's my complete content.

Because use pp packing my script is so slowly, so i use perlapp

my script mongo.pl:

#!/usr/bin/perl -w use strict; use MongoDB; use MongoDB::Connection; use MongoDB::Database; # mongodb my $conn = MongoDB::Connection->new(host => '127.0.0.1:27017', + query_timeout => 1000 * 6000); my $db = $conn->ygzj_dev; print "$db";

Use "perl mongo.pl" it print "MongoDB::Database=HASH(0x33b2e8)", It worked fun.

when I use perlapp compiling it to exe,My command is "perlapp --shared public --norunlib --gui --verbose --warnings --exe mongo.exe mongo.pl", perlapp generate a mongo.exe and there have 5 warnings ,the warnings is:

<1> Devel\GlobalDestruction.pm: warn: auto\Devel\GlobalDestruction\GlobalDestruction.dll not found refby: C:\Perl64\lib\Moose\Meta\Role.pm line 16 refby: C:\Perl64\lib\Moose\Object.pm line 14 refby: C:\Perl64\lib\Moose\Meta\Method\Destructor.pm line 13 refby: C:\Perl64\lib\Class\MOP\Package.pm line 15 file: C:\Perl64\lib\Devel\GlobalDestruction.pm .... .... <2> Mouse\Util.pm: warn: auto\Mouse\Util\Util.dll not found refby: C:\Perl64\site\lib\Mouse.pm line 11 refby: C:\Perl64\site\lib\Mouse\Meta\Attribute.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Class.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Module.pm line 2 refby: C:\Perl64\site\lib\Mouse\Util\TypeConstraints.pm line 2 refby: C:\Perl64\site\lib\Mouse\Object.pm line 2 refby: C:\Perl64\site\lib\Mouse\Exporter.pm line 17 refby: C:\Perl64\site\lib\Mouse\Meta\Role.pm line 2 refby: C:\Perl64\site\lib\Mouse\PurePerl.pm line 11 refby: C:\Perl64\site\lib\Mouse\Meta\TypeConstraint.pm line 2 refby: C:\Perl64\site\lib\Mouse\Util\MetaRole.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Role\Composite.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Role\Application.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Method\Destructor.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Method\Constructor.pm line 2 refby: C:\Perl64\site\lib\Mouse\Meta\Method\Accessor.pm line 2 file: C:\Perl64\site\lib\Mouse\Util.p .... .... <3> Perl\Tidy.pm: warn: Can't locate Perl\Tidy.pm refby: C:\Perl64\lib\Eval\Closure.pm line 151 ... ... <4> SetDualVar.pm: warn: Can't locate SetDualVar.pm refby: C:\Perl64\lib\Win32\TieRegistry.pm line 39 ... ... <5> VMS\Feature.pm: warn: Can't locate VMS\Feature.pm refby: C:\Perl64\lib\Cwd.pm line 211

I have already installed Mouse, Devel-GlobalDestruction, VMS-FileUtils..., I think these all warning msg is not important, Because when I compiled other script also had some warnings. When I executed the mongo.exe file,there have run error, error msg:

{.\mongo.exe} 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\tmp\mongo.exe>Module/Runtime.pm line 317. Can't locate Params/Validate/PP.pm in @INC (@INC contains:) at /<C:\Us +ers\Administrator\Desktop\tmp\mongo.exe>Module/Runtime.pm line 317. at /<C:\Users\Administrator\Desktop\tmp\mongo.exe>Params/Validate.pm +line 66. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +tmp\mongo.exe>DateTime/Duration.pm line 12. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +tmp\mongo.exe>DateTime.pm line 43. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +tmp\mongo.exe>MongoDB/GridFS.pm line 24. BEGIN failed--compilation aborted at /<C:\Users\Administrator\Desktop\ +tmp\mongo.exe>MongoDB/Database.pm line 23. BEGIN failed--compilation aborted at mongo.pl line 5.

I have allready installed "Params-Validate Validate method/function parameters", Can I compile the script to exe file with could execute. You can test it. my os is windows7 64 bit, my perl is 5.16(active state perl), Thank you very much!


In reply to Re^8: pp can't pack MongoDB and Inline Module by Alle
in thread pp can't pack MongoDB and Inline Module by Alle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (16)
    As of 2014-07-10 09:29 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (204 votes), past polls