Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 5205
Status: resolved
Worked: 5 min
Priority: 0/
Queue: PAR

People
Owner: smueller [...] cpan.org
Requestors: mriedel [...] lanl.gov
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



To: bug-par [...] rt.cpan.org
From: Matthew Riedel <mriedel [...] lanl.gov>
Subject: bug in pp with system() calls
Date: Wed, 4 Feb 2004 12:16:17 -0700
Hello, I'd like to report a bug with executables compiled with pp. When making system() calls from a packaged perl script, anything with command line arguments seems to fail, where they work fine in straight perl. Here's the code snippet: sub registration { $product = $_[0]; system("/tmp/registration -p $product"); } It runs fine when just a perl script.. However, after using pp to package it, when that function runs, it returns "Unknown option: p" registration() is called by other functions that send it a string. So it's called something like this: registration("Product_Name"); "registration" is another pp'd perl script.. I've tried defining an arguments array, but no go.. if I don't leave a space between -p and $prodcut, I get output like this: (assuming $product = "test"): Unknown option: p Unknown option: t Unknown option: e Unknown option: s Unknown option: t So, in summary, system() works as expected as regular perl, but not when used from a pp archive. Any ideas? This is being compiled on a Red Hat 7.3 box with perl 5.6.1 Matt Riedel
Hi, On Mi. 04. Feb. 2004, 14:16:26, mriedel@lanl.gov wrote: Show quoted text
> I'd like to report a bug with executables compiled with pp. When > making system() calls from a packaged perl script, anything with > command line arguments seems to fail, where they work fine in straight > perl.
[Description of PAR clobbering @ARGV in a pp-ed script executed from within another pp-ed script] I know this is a late answer. But this problem will be fixed in the 0.91 release of PAR. Steffen