Dave Mitchell wrote: > I will point out > that the new ops are restricted in where they can be used, in that > they assume that the lexical var being created is undef/empty, non-magical > etc. In general, code like 'my $x = $_[3]' can't assume that, due to > closure tricks etc. Do you mean like this? package T { sub TIESCALAR{bless[]} sub STORE { warn "Storing $_[1]" } } foo(); my $x = 3; sub foo { tie $x, "T" } That outputs: Storing 3 at - line 1. But it is easily translated into code using signatures: package T { sub TIESCALAR{bless[]} sub STORE { warn "Storing $_[1]" } } foo(); use experimental "signatures"; sub bar ($x=3) { sub foo { tie $x, "T" } } bar(); Same output. That is with blead, not with your branch.Thread Previous | Thread Next