Random Thoughts from Nothingmuch
11
Jan
my $x : Stashed
written by Yuval Kogman
sub foo : Local { my ( $self, $c ) = @_; my $x : Stashed; $x = 100; # updated on the stash }
sub counter : Local { my ( $self, $c ) = @_; my $counter : Session; $c->res->body( "request number " . ++$counter ); }
Catalyst::Controller::BindLex (previously called Catalyst::Plugin::StashLex) was added to Catalyst's SVN a while ago by mst.
I just updated it, adding the option to use variable attributes to let it do it's magic, and making it use aliases instead of copies so that the stash is kept in sync.
Have fun!