g0177325 has asked for the wisdom of the Perl Monks concerning the following question:

Hi - I'm using the 32 bit portable install of Strawberry Perl 5.16.3 (also tried 5.18.0.1) on Windows 7 x64. I installed PAR::Packer manually by downloading the zip bundles for PAR::Packer and it's two dependent modules Getopt::Argvfile and Module-Scandeps, and building them the standard way (perl Makefile.pl; dmake test; dmake install). All tests passed.

I then try: pp -v -o tt.exe -e "print 1..99"

I see a bunch of modules that presumably PAR needs to do its thing, and the tt.exe files is 3.5 MB, which is reasonable. Opening it with winzip shows only 5 files. So far so good.

Next I try: pp -v -o ttt.exe -e "use strict; print 1..99"

This takes 10 times longer than the first one, I see the same modules needed by PAR being included, but the ttt.exe file is over 9 MB, and winzip shows over 1500 files in it!

Why is PAR including many modules that it doesn't need at all? Things like DBD, DBI, CPAN, Tar, etc. This makes no sense to me at all.

Replies are listed 'Best First'.
Re: PAR::Packer pp command including too many modules
by Anonymous Monk on Mar 13, 2014 at 23:39 UTC

    Why is PAR including many modules that it doesn't need at all?

    Well, because scandeps thinks it needs those modules ... scandeps decides

    Things like DBD, DBI, CPAN, Tar, etc.

    Um, scandeps.pl went nuts?

    Which version of PAR/Module::ScanDeps did you install?

    ? What is the output of perl -V

    ? What is the output of  pp -v -o ttt.exe -e "use strict; print 1..99"

      I'm using Module::ScanDeps 1.13

      perl -V output:

      Summary of my perl5 (revision 5 version 18 subversion 0) configuration +: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread-64in +t uname='Win32 strawberry-perl 5.18.0.1 #1 Sat May 18 17:46:00 2013 +i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPER +L_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fno-strict-alias +ing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++.exe', ldflags ='-s -L"C:\strawberry_perl_51801\perl\lib\CO +RE" -L"C:\strawberry_perl_51801\c\lib"' libpth=C:\strawberry_perl_51801\c\lib C:\strawberry_perl_51801\c\i +686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl518.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry_perl_51801\pe +rl\lib\CORE" -L"C:\strawberry_perl_51801\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAM +PERSAND USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at May 18 2013 17:53:14 %ENV: PERLSHELL="c:\strawberry_perl\portableshell.bat" @INC: C:/strawberry_perl_51801/perl/site/lib C:/strawberry_perl_51801/perl/vendor/lib C:/strawberry_perl_51801/perl/lib .


      Output of pp -vvv -o ttt.exe -e "use strict; print 1..99" >\temp\pp-use-strict.out.txt
      [This isn't all of it, since it was 3300 lines.] C:\strawberry_perl_51801\perl\site\bin/pp: Packing C:\Users\allenjo5\A +ppData\Local\Temp\ppaQ7zF.pl C:\strawberry_perl_51801\perl\site\bin/pp: Writing PAR on C:\Users\all +enjo5\AppData\Local\Temp\ppL1cGp.par C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Algorithm/Diff.pm as lib/Algorithm/Diff.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/Archive/Tar.pm as lib/Archive/Tar.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/Archive/Tar/Constant.pm as lib/Archive/Tar/Constant +.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/Archive/Tar/File.pm as lib/Archive/Tar/File.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip.pm as lib/Archive/Zip.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/Archive.pm as lib/Archive/Zip/Ar +chive.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/DirectoryMember.pm as lib/Archiv +e/Zip/DirectoryMember.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/FileMember.pm as lib/Archive/Zip +/FileMember.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/Member.pm as lib/Archive/Zip/Mem +ber.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/NewFileMember.pm as lib/Archive/ +Zip/NewFileMember.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/StringMember.pm as lib/Archive/Z +ip/StringMember.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/Archive/Zip/ZipFileMember.pm as lib/Archive/ +Zip/ZipFileMember.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/AutoLoader.pm as lib/AutoLoader.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/AutoSplit.pm as lib/AutoSplit.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/B.pm as lib/B.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/B/Deparse.pm as lib/B/Deparse.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/BerkeleyDB.pm as lib/BerkeleyDB.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Author.pm as lib/CPAN/Author.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Bundle.pm as lib/CPAN/Bundle.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/CacheMgr.pm as lib/CPAN/CacheMgr.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Complete.pm as lib/CPAN/Complete.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Config.pm as lib/CPAN/Config.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Debug.pm as lib/CPAN/Debug.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/DeferredCode.pm as lib/CPAN/DeferredCode.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/vendor/lib/CPAN/DistnameInfo.pm as lib/CPAN/DistnameInf +o.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Distribution.pm as lib/CPAN/Distribution.pm C:\strawberry_perl_51801\perl\site\bin/pp: ... adding C:/strawberry_pe +rl_51801/perl/lib/CPAN/Distroprefs.pm as lib/CPAN/Distroprefs.pm ... Packing "Archive/Zip/Member.pm"... Written as "Archive/Zip/Member.pm" Packing "Archive/Zip/NewFileMember.pm"... Written as "Archive/Zip/NewFileMember.pm" Packing "Archive/Zip/StringMember.pm"... Written as "Archive/Zip/StringMember.pm" Packing "Archive/Zip/ZipFileMember.pm"... Written as "Archive/Zip/ZipFileMember.pm" Packing "PAR.pm"... Written as "PAR.pm" Packing "PAR/Dist.pm"... Written as "PAR/Dist.pm" Packing "PAR/Heavy.pm"... Written as "PAR/Heavy.pm" Packing "PAR/SetupProgname.pm"... Written as "PAR/SetupProgname.pm" Packing "PAR/SetupTemp.pm"... Written as "PAR/SetupTemp.pm" Packing "Portable.pm"... Written as "Portable.pm" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/2318195e.dll"... Written as "auto/Win32/Win32.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/387a4607.dll"... Written as "auto/PerlIO/scalar/scalar.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/43d981d6.dll"... Written as "auto/Fcntl/Fcntl.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/5f64aeab.dll"... Written as "auto/Tie/Hash/NamedCapture/NamedCapture.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/6674f066.dll"... Written as "auto/IO/IO.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/83414481.dll"... Written as "auto/List/Util/Util.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/9937eba8.dll"... Written as "auto/Compress/Raw/Zlib/Zlib.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/b0c204bd.dll"... Written as "auto/File/Glob/Glob.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/e0adad6d.dll"... Written as "auto/attributes/attributes.dll" Packing "C:\Users\allenjo5\AppData\Local\Temp\par-616c6c656e6a6f35\cac +he-696e47e08ce51b5e96ba4696af795cb4f68ac7b8/eaa828ef.dll"... Written as "auto/Cwd/Cwd.dll"