List Info

Thread: Re: Change 31835: when anon subs are cloned, the 'assign once only' flag should be




Re: Change 31835: when anon subs are cloned, the 'assign once only' flag should be
user name
2007-09-10 08:53:37
Dave Mitchell wrote:
> +    push f, sub { $x; state $s = $_[0]; $s } for
1..2;

This is producing the following warning:

> ./perl.exe -Ilib t/op/state.t
Useless use of private variable in void context at
t/op/state.t line 341.
1..123
ok 1 - state vars are undef by default
[...SNIP...]

Re: Change 31835: when anon subs are cloned, the 'assign once only' flag should be
user name
2007-09-10 09:03:26
On Mon, Sep 10, 2007 at 09:53:37AM -0400, Jerry D. Hedden
wrote:
> Dave Mitchell wrote:
> > +    push f, sub { $x; state $s = $_[0]; $s } for
1..2;
> 
> This is producing the following warning:
> 
> > ./perl.exe -Ilib t/op/state.t
> Useless use of private variable in void context at
t/op/state.t line 341.
> 1..123
> ok 1 - state vars are undef by default
> [...SNIP...]

Whoops thanks for spotting that. Fixed by #31840

-- 
Never work with children, animals, or actors.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )