How is the following code implemented in Perl?
sub add_item : Local { my ( $self, $c ) = @_; my $item_id = $c->req->param('item'); push @{ $c->session->{items} }, $item_id; }
I am interested in the add_item : Local part, cause I don’t think those are Perl keywords.
They are attributes. See the attribute documentation, but also Private Variable via my() and Subroutine Attributes in perlsub.