I seldom use PAR::Packer to deploy my program, but I've heard it's a convenient way to bundle all packages file into a self-executable file.
Today I've had a try on pp to bundle a per script. after about 30mins, it made a exe file without any warnings.
C:\MyProjects\RepAuto>pp -o test.exe RepAuto.pl
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There i
+s NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR
+POSE.
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There i
+s NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR
+POSE.
But when I ran it, it threw a lot of warnings:
C:\MyProjects\RepAuto>test.exe
Could not find a suitable Package::Stash implementation: Can't locate
+Package/St
ash/XS.pm in @INC (@INC contains: CODE(0x14f898c) C:\DOCUME~1\ADMINI~1
+\LOCALS~1\
Temp\par-Administrator\cache-cd7d1f2c54b66fa85c0a47bab7b82df79b4070f8\
+inc\lib C:
\DOCUME~1\ADMINI~1\LOCALS~1\Temp\par-Administrator\cache-cd7d1f2c54b66
+fa85c0a47b
ab7b82df79b4070f8\inc CODE(0x11f6694) CODE(0x11f6994)) at (eval 1028)
+line 1.
Can't locate Package/Stash/PP.pm in @INC (@INC contains: CODE(0x14f898
+c) C:\DOCU
ME~1\ADMINI~1\LOCALS~1\Temp\par-Administrator\cache-cd7d1f2c54b66fa85c
+0a47bab7b8
2df79b4070f8\inc\lib C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\par-Administra
+tor\cache-
cd7d1f2c54b66fa85c0a47bab7b82df79b4070f8\inc CODE(0x11f6694) CODE(0x11
+f6994)) at
(eval 1029) line 1.
at Package/Stash.pm line 46
BEGIN failed--compilation aborted at Package/Stash.pm line 46.
Compilation failed in require at Class/Load.pm line 11.
BEGIN failed--compilation aborted at Class/Load.pm line 11.
Compilation failed in require at DateTime/TimeZone/Local.pm line 9.
BEGIN failed--compilation aborted at DateTime/TimeZone/Local.pm line 9
+.
Compilation failed in require at DateTime/TimeZone.pm line 13.
BEGIN failed--compilation aborted at DateTime/TimeZone.pm line 13.
Compilation failed in require at DateTime.pm line 47.
BEGIN failed--compilation aborted at DateTime.pm line 47.
Compilation failed in require at C3000.pm line 9.
BEGIN failed--compilation aborted at C3000.pm line 9.
Compilation failed in require at script/RepAuto.pl line 24.
BEGIN failed--compilation aborted at script/RepAuto.pl line 24.
I've checked the dir as messages above, it Looked like pp overlooked some packages like Packeage::Stash etc, so I simply copied the relevant pm files to the directory which pp created ad-hoc and rerun it, and the exe works fine. ;)
So my question is what make this problem happen? pp itself or active perl? I mean, some packages is installed by ppm or shipped from active perl msi, does it would make Module::Scandeps miss something?
Hope monks can enlighten me, TIA
C:\>perl -V
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Summary of my perl5 (revision 5 version 12 subversion 4) configuration
+:
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
uname=''
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=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='C:/Perl/site/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSO
+LE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DP
+ERL_IMPLIC
IT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATT
+RIBUTE -fn
o-strict-aliasing -mms-bitfields',
optimize='-O2',
cppflags='-DWIN32'
ccversion='', gccversion='3.4.5 (mingw-vista special r3)', gccosan
+dvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64
+', lseeksi
ze=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='C:\Perl\site\bin\g++.exe', ldflags ='-L"C:\Perl\lib\CORE"'
libpth=\lib
libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32
+-lshell32
-lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion
+-lodbc32 -
lodbccp32 -lcomctl32 -lmsvcrt
perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvap
+i32 -lshel
l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lvers
+ion -lodbc
32 -lodbccp32 -lcomctl32 -lmsvcrt
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -L"C:\Perl\lib\CORE"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
USE_SITECUSTOMIZE
Locally applied patches:
ActivePerl Build 1205 [294981]
c6fbf28 [perl #71806] perldb does not setup %dbline with the s
+hebang opt
ion -d
1fd8fa4 Add Wolfram Humann to AUTHORS
f120055 make string-append on win32 100 times faster
a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7
007cfe1 Don't pretend to support really old VC++ compilers
6d8f7c9 Get rid of obsolete PerlCRT.dll support
d956618 Make Term::ReadLine::findConsole fall back to STDIN if
+ /dev/tty
can't be opened
321e50c Escape patch strings before embedding them in patchlev
+el.h
Built under MSWin32
Compiled at Jun 20 2011 18:35:25
@INC:
C:/Perl/site/lib
C:/Perl/lib
.