develooper Front page | perl.perl5.porters | Postings from January 2009

[PATCH] setpgrp() should extend the stack before modifying it

Thread Next
From:
Niko Tyni
Date:
January 26, 2009 07:09
Subject:
[PATCH] setpgrp() should extend the stack before modifying it
Message ID:
20090126135732.GB25759@kuusama.it.helsinki.fi
On Fri, Jan 23, 2009 at 08:21:24PM +0000, Marcin Owsiany wrote:
> The following program dies for me on perl v5.8.8 with:
> Can't call method "foo" without a package or object reference at a line 10.
> 
> -------------------------------------------------------->8---
> package A;
> sub new { bless {}, shift }
> sub foo { }
> sub getref { setpgrp() }
> 
> package main;
> my $o = A->new;
> # my $r = A::getref;
> # $o->foo($r);
> $o->foo(A::getref);
> -------------------------------------------------------->8---
> 
> However just uncomment the commented lines, and comment the last one,
> and it works! :-O

Thanks for the report. 

This bug is still present in bleadperl. The attached patch should fix it.
-- 
Niko Tyni   ntyni@debian.org

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About