Skip Menu |
Report information
Id: 129817
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: pawelmurias [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

To: rakudobug [...]
Subject: (De)serialization of state variables is not implemented.
From: Paweł Murias <pawelmurias [...]>
Date: Thu, 6 Oct 2016 15:33:23 +0200
Download (untitled) / with headers
text/plain 557b
The contents of state variables is not preserved when serializing closures.
Bug is present b3c92baad264146f9e7dd7308f3064c3d7e18be2 and has been implemented this way.

use v6;
# works when you turn precompilation off
#no precompilation;
module Foo {
    my $closure = BEGIN {
        my $c := -> {
            state $foo = 100;
    sub foo is export {

### foo.p6
use Foo;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at