% pp hello.pl # Pack 'hello.pl' into executable 'a.out'
% pp -o hello hello.pl # Pack 'hello.pl' into executable 'hello'
# (or 'hello.exe' on Win32)
% pp -o foo foo.pl bar.pl # Pack 'foo.pl' and 'bar.pl' into 'foo'
% ./foo # Run 'foo.pl' inside 'foo'
% mv foo bar; ./bar # Run 'bar.pl' inside 'foo'
% mv bar baz; ./baz # Error: Can't open perl script "baz"
% pp -p file # Creates a PAR file, 'a.par'
% pp -o hello a.par # Pack 'a.par' to executable 'hello'
% pp -S -o hello file # Combine the two steps above
% pp -p -o out.par file # Creates 'out.par' from 'file'
% pp -B -p -o out.par file # same as above, but bundles core modules
# and removes any local paths from @INC
% pp -P -o out.pl file # Creates 'out.pl' from 'file'
% pp -B -p -o out.pl file # same as above, but bundles core modules
# and removes any local paths from @INC
# (-B is assumed when making executables)
% pp -e "print 123" # Pack a one-liner into 'a.out'
% pp -p -e "print 123" # Creates a PAR file 'a.par'
% pp -P -e "print 123" # Creates a perl script 'a.pl'
% pp -c hello # Check dependencies from "perl -c hello"
% pp -x hello # Check dependencies from "perl hello"
% pp -n -x hello # same as above, but skips static scanning
% pp -I /foo hello # Extra include paths
% pp -M Foo::Bar hello # Extra modules in the include path
% pp -M abbrev.pl hello # Extra libraries in the include path
% pp -X Foo::Bar hello # Exclude modules
% pp -a data.txt hello # Additional data files
% pp -r hello # Pack 'hello' into 'a.out', runs 'a.out'
% pp -r hello a b c # Pack 'hello' into 'a.out', runs 'a.out'
# with arguments 'a b c'
% pp hello --log=c # Pack 'hello' into 'a.out', logs
# messages into 'c'
# Pack 'hello' into a console-less 'out.exe' with icon (Win32 only)
% pp --gui --icon hello.ico -o out.exe hello
% pp @file hello.pl # Pack 'hello.pl' but read _additional_
# options from file 'file'
In the examples, I don't see any file names that are to the left of an option. Based on that observation, I would be disinclined to put a file name to the left of an option.
Typically, unix commands are ordered like this:
command -option option_value FILENAME_THAT_IS_TARGET_OF_COMMAND
For the pp command, the default output file is named a.out, however you can use the -o option to specify another name for the output file. So using the unix command template:
command -option option_value FILENAME_THAT_IS_TARGET_OF_COMMAND
pp -o test.exe test.pl
Also, based on the second example in the docs, I think the option_value should be just test. See if that works.
|