Open p5pRT opened 12 years ago
perl -T -E 'delete $ENV{PATH}; package D { sub TIESCALAR { return bless {}\, shift } sub FETCH { say ++$y; } } tie $x\, "D"; system $x; say ""; exec $x'
Which calls FETCH 4 times\, not 2. Also\, I might be missing something/being particularly thick today\, but the output doesn't make sense to me: 1 2
2 3
Shouldn't that be 1\, 2\, 3\, 4\, not 1\, 2\, 2\, 3?
On Sat Nov 19 16:47:51 2011\, Hugmeir wrote:
perl -T -E 'delete $ENV{PATH}; package D { sub TIESCALAR { return bless {}\, shift } sub FETCH { say ++$y; } } tie $x\, "D"; system $x; say ""; exec $x'
Which calls FETCH 4 times\, not 2. Also\, I might be missing something/being particularly thick today\, but the output doesn't make sense to me: 1 2
2 3
Shouldn't that be 1\, 2\, 3\, 4\, not 1\, 2\, 2\, 3?
That second part reminds me of #96332\, but I donāt think itās related. system() seems to be clearing $y somehow\, even without threads.
--
Father Chrysostomos
The RT System itself - Status changed from 'new' to 'open'
On Sat Nov 19 22:18:02 2011\, sprout wrote:
On Sat Nov 19 16:47:51 2011\, Hugmeir wrote:
perl -T -E 'delete $ENV{PATH}; package D { sub TIESCALAR { return bless {}\, shift } sub FETCH { say ++$y; } } tie $x\, "D"; system $x; say ""; exec $x'
Which calls FETCH 4 times\, not 2. Also\, I might be missing something/being particularly thick today\, but the output doesn't make sense to me: 1 2
2 3
Shouldn't that be 1\, 2\, 3\, 4\, not 1\, 2\, 2\, 3?
That second part reminds me of #96332\, but I donāt think itās related. system() seems to be clearing $y somehow\, even without threads.
Er\, I meant even without taint.
--
Father Chrysostomos
On Sat\, Nov 19\, 2011 at 04:47:52PM -0800\, Brian Fraser wrote:
perl -T -E 'delete $ENV{PATH}; package D { sub TIESCALAR { return bless {}\, shift } sub FETCH { say ++$y; } } tie $x\, "D"; system $x; say ""; exec $x'
Which calls FETCH 4 times\, not 2. Also\, I might be missing something/being particularly thick today\, but the output doesn't make sense to me: 1 2
2 3
Shouldn't that be 1\, 2\, 3\, 4\, not 1\, 2\, 2\, 3?
The first "2" is inside a forked child\, so the change isn't visible in the parent.
Tony
Migrated from rt.perl.org#104084 (status was 'open')
Searchable as RT104084$