Attribute::Final - Provides Java-style finalized methods
use Attribute::Final; package Beverage::Hot; sub serve :final { ... } package Tea; use base 'Beverage::Hot'; sub Tea::serve { # Compile-time error. }
Final methods are methods which cannot be overriden in derived classes. This module will allow you to mark some methods as :final; prior to running the script, Perl will check that no packages which derive from classes with marked methods override those methods.
:final
Originally by Simon Cozens, simon@cpan.org
simon@cpan.org
Maintained by Scott Penrose, scott@cpan.org
scott@cpan.org
java.
To install Attribute::Final, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Attribute::Final
CPAN shell
perl -MCPAN -e shell install Attribute::Final
For more information on module installation, please visit the detailed CPAN module installation guide.