< Programming with Moose < Syntax

To override a function use the Moose keyword override.

override 'target' => &with;
##-or-
override 'target' => sub {};


An Example

Exports to override

super

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

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.