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