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

Hey Monks! I recently built PAR(0.65) on my Solaris system and everything went fine. However, when I run "pp" I get the following:
develop-escanaba (1) pp Bareword "desiredCompressionMethod" not allowed while "strict subs" in + use at /usr/local/bin/pp line 103. Bareword "desiredCompressionLevel" not allowed while "strict subs" in +use at /usr/local/bin/pp line 103. BEGIN not safe after errors--compilation aborted at /usr/local/bin/pp +line 226.
Any suggestions? Is this a bug in the "pp" script?

Replies are listed 'Best First'.
Re: PAR bug?
by Enlil (Parson) on Mar 18, 2003 at 18:48 UTC
    Put quotes around desiredCompressionMethod and desiredCompressionLevel and strict should stop complaining.

    update:Sorry was trying to fix different strict complaint above. Change desiredCompressionMethod to desiredCompressionMethod() and desiredCompressionLevel to desiredCompressionMethod()

    update2 Perchance I should take better look at the script in question before I write something blindly. I looked at the source for pp and the lines in question are

    my %zip_args = ( desiredCompressionMethod => Archive::Zip::COMPRESSION_DEFLATED(), desiredCompressionLevel => Archive::Zip::COMPRESSION_LEVEL_BEST_COMPRESSION(), );
    so putting the () after them won't help as they aren't supposed to call a sub but are rather the keys to a hash. And thus, I don't know how to help your problem, as strict should not complain about it (and did not when I ran a shortened version here). Sorry for a misleading I might have done.

    -enlil