
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.

Originally by Simon Cozens, simon@cpan.org
Maintained by Scott Penrose, scott@cpan.org

java.