Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: pp module messes encoding

by ZJ.Mike.2009 (Scribe)
on May 14, 2011 at 10:39 UTC ( #904803=note: print w/replies, xml ) Need Help??


in reply to pp module messes encoding

"My code works gr8 as .pl but after it's converted to .exe with the pp module, it gets a strange encoded (I think) text, that I can't understand nor convert to it's standard form. Another weird thing is that the .exe created version of out.txt is about 4 times longer than the .pl's."

I did a quick test. I can confirm that I experienced the same problems (garbled characters and large file) as you described. For a quick solution, maybe you can try PerlApp. I did a test with PerlApp using your demo script. The executable produced by PerlApp works as expected.

Replies are listed 'Best First'.
Re^2: pp module messes encoding
by palkia (Monk) on May 14, 2011 at 15:17 UTC
    Thx for testing for yourself.
    It sound promising but I'm not sure what PerlApp is (module / program ..). I've encountered many results when googling for it.
    Can you please add a link to it?
    thx.
      PerlApp is a utility included in Perl Dev Kit (PDK), a commercial or 21-day free trial version of which can be downloaded here at www.activestate.com/perl-dev-kit. I've also tried Cava Packager, the author of which provides a fully working free-of-charge non-commericial licence, and the resulting executable can also produce a readable text file. Cava Packager can be downloaded here at www.cava.co.uk/download.html.

      For your reference, my testing environment is as follows: Windows XP SP3 ActiveState Perl 5.10.0 Par::Packer 1.002 PerlAPP 8.1 Cava Packager 2.0.48.443

        Thank you very very very very much (no copy pasting !).
        This was by far the most effort invested, thought out, informative, clear and practical reply I ever got about perl.

        I got the cava (long and painful install but it's over now), and it works (finally).
        Not sure how my 45.8KB file became so many MB-s ^^.
        It probably includes some unnecessary data, but I can't figure it out yet.
        (maybe I'll post this as another question)

        But the most important thing is that it finally works (thx again).
Re^2: pp module messes encoding
by Anonymous Monk on May 14, 2011 at 10:58 UTC
    I did a quick test

    But what did you do?

      The OP says "My code works gr8 as .pl but after it's converted to .exe with the pp module, it gets a strange encoded (I think) text." Notice that the script works when evoked by the perl interpreter. The suspect is the pp utility. I packed the demo script that OP posted to an exectuable using the PP utility like the OP did and I ran the executable to see if the problem is reproducible on my system. Isn't this the first step to solving the problem?
        I packed the demo script that OP posted to an exectuable using the PP utility like the OP did

        Is that like a quick test? pp has many options, so you have to show which ones you used, like this Re: pp module messes encoding

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-02-06 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?