http://www.perlmonks.org?node_id=794168


in reply to Re^2: initialise state variable from list context, NOT!
in thread initialise state variable from list context, NOT!

One of border cases is:
sub foo { (my $foo, state $bar) = (f(), g()); ... } foo; foo; # Should g() be called?
As for state %record;, that is allowed. It's state in a list assignment that is disallowed. But note that
state %record; %record = ( ... );
doesn't give you any benefits over
my %record = ( ... );
You will have to write it as
state %record; %record = ( ... ) unless keys %record;