On Sun Dec 27 15:43:56 2015, gfldex wrote:
> role R { method Str() {'hidden!'} };
> my $i = 1 but R;
> sub f(\bound){ put bound };
> f($i);
> $i++;
> f($i);
> 
> # OUTPUT«hidden!␤2␤»

20:45 < [Coke]> https://rt.perl.org/Ticket/Display.html?id=127050 - this
                appears to be a DIHWIDT - the role is applied to the literal 1,
                making a new object; when you ++ you're getting a new instance,
                a (fresh) 2. No?
20:49 < jnthn> [Coke]: It's correct behavior. The ticket is confused.
20:49 < jnthn> (So yes, you're correct. :))
20:50 < [Coke]> jnthn: ok, I'll reject.



-- 
Will "Coke" Coleda

Reply via email to