Programming with Moose/Syntax/override

From Wikibooks, open books for an open world
< Programming with Moose‎ | Syntax
Jump to: navigation, search

To override a function use the Moose keyword override.

override 'target' => &with;
override 'target' => sub {};

An Example[edit]

Exports to override[edit]


Super passes the original @_. If you want to alter the args (@_), see around().