Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Think about Loose Coupling
 
PerlMonks  

Re: PAR: pp No Perl script found in input

by 7stud (Deacon)
on Feb 27, 2013 at 03:40 UTC ( #1020797=note: print w/ replies, xml ) Need Help??


in reply to PAR: pp No Perl script found in input

From the docs:

    % 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.


Comment on Re: PAR: pp No Perl script found in input
Re^2: PAR: pp No Perl script found in input
by mkmal (Novice) on Feb 27, 2013 at 20:09 UTC
    I tried the above but as I expected I got the same result.

    pp -o test.exe test.pl
    No Perl script found in input

    The reason I suspected this would be the case is because as I stated in my original post the command works just fine the way I originally entered it if I move test.pl to the directory where the pp command lives, C:\Perl\site\bin.
    If I run pp from that dir I do get a working test.exe.
    I would expect a syntax error to fail no matter where you run the command. This look like some sort of a PATH issue but I'm not sure what.

    Thanks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2014-04-16 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls