Subject: | Readonly variable doesn't work with piped open |
Date: | Sun, 16 Jan 2011 00:44:47 +0100 (CET) |
To: | bug-Readonly [...] rt.cpan.org |
From: | Hauke D <haukex [...] zero-g.net> |
Hello,
Please find attached some test code that shows an apparent bug that causes
the following code to fail:
Readonly my $PROG => '/bin/cat';
open my $fh, '|-', $PROG or die $!;
with the following errors:
Missing command in piped open at ./bug_Readonly.pl line 20.
Broken pipe at ./bug_Readonly.pl line 20.
This seems to be related to this bug:
https://rt.cpan.org/Public/Bug/Display.html?id=63234
but I've also found some strange cases (like using Readonly::Scalar or
doing "-e $PROG" before the "open") that might help...
Perl version information is also in the attached file (in short: Perl
5.10.1 on Ubuntu 10.04 64-bit). I also have Readonly::XS installed.
Thanks,
-- Hauke D