in reply to Re^4: PAR::Packer pp command including too many modules
in thread PAR::Packer pp command including too many modules

Yes, but ...

You're using portablestrawberry, it loads Portable when you run any program ...

You can always exclude Portable and any other module syou don't want packed

... scandeps ...

portablestrawberry loads Portable when scandeps runs too :)

But I have to ask why it needs to consult anything other than the local perl install tree for module dependency info? Shouldn't it just be looking recursively at "use" statements?

metadata also comes from the CPAN ... you've got the portable version so load it up before you go to work :)

;) When in doubt feel free to UTSL

  • Comment on Re^5: PAR::Packer pp command including too many modules

Replies are listed 'Best First'.
Re^6: PAR::Packer pp command including too many modules
by g0177325 (Initiate) on Mar 16, 2014 at 22:34 UTC
    Holy crappola, you're a genius! This worked, and produced a smallish exe with only 18 unnecessary modules:
    pp -X Portable.pm -e "use strict; print 1..99" -o ttt.exe

    But I guess I still disagree with the coders of PAR::Packer that Portable.pm should be included by default, for some definition of default. To include it because you merely "use strict;" just seems wrong to me.

    Anyhow, thanks a lot for your work-around. It suits my purposes well. I had almost given up hope of getting a reasonable size exe.

    John

      But I guess I still disagree with the coders of PAR::Packer ....

      I have my perl configured to use Data::Dump by default , if I use pp to pack anything Data::Dump gets included unless I exclude it ...

      strawberryperlportable loads Portable by default for every perl program, unless you exclude it, par/pp will package it

      If you still feel its a mistake that loaded modules get packaged (which I don't), feel free to file a bug report :)

      I had almost given up hope of getting a reasonable size exe.

      everybody has got a funny definition of reasonable :)

        strawberryperlportable loads Portable by default for every perl program

        I have strawberry perl portable, yet there's no mention of Portable.pm in %INC:
        C:\_32\pscrpt>type try.pl use strict; use warnings; print for keys %INC; C:\_32\pscrpt>perl -l try.pl warnings.pm strict.pm C:\_32\pscrpt>
        If Portable.pm has been loaded, then I would expect to find it in %INC.
        What gives ? (I have 5.18.2.1 - maybe this behaviour has now changed ?)

        Cheers,
        Rob