As it turns out, they’re attributes, one of the newer and less well understood additions to Perl. You won’t see them everywhere, but they’re starting to appear in a number of places; many people — including the anonymous perlmonk — first encounter them in the Catalyst MVC framework.
Attributes allow you to add extra semantics to any Perl subroutine or variable. The typical example — given in both the perlmonks thread linked above, and in the Attribute::Handlers docs linked below, is an attribute
:Loud which makes any subroutine called with it behave as if it only knew how to shout:
… prints “GOOD MORNING”;
You can also declare variables using attributes:
To learn more about attributes and how to write them: