This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse: handle state attributes
authorDavid Mitchell <davem@iabyn.com>
Wed, 22 Nov 2017 16:03:29 +0000 (16:03 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 23 Nov 2017 08:52:16 +0000 (08:52 +0000)
commit4a4aa6e0f79d1ce5f279a245ef7a700805da3c48
tree9b2b1dc2a9b2c7048e2b814b80bc58e79225351f
parentc4874d8a25094b3c3426b7831ebba86fc934a652
Deparse: handle state attributes

It already correctly deparses e.g.

    my $x :shared = 1;

Now that attributes are legal on state vars, extend deparsing to them too:

    state $x :shared = 1;

Also, rename maybe_my_attr() to maybe_var_attr() to reflect its widened
role.
lib/B/Deparse.pm
lib/B/Deparse.t