Attribute::Final - Provides Java-style finalized methods


Attribute-Final documentation  | view source Contained in the Attribute-Final distribution.

Index


NAME

Top

Attribute::Final - Provides Java-style finalized methods

SYNOPSIS

Top

    use Attribute::Final;

    package Beverage::Hot; 
    sub serve :final { ... } 

    package Tea; 
    use base 'Beverage::Hot'; 

    sub Tea::serve { # Compile-time error. 
    } 

DESCRIPTION

Top

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.

AUTHOR

Top

Originally by Simon Cozens, simon@cpan.org

Maintained by Scott Penrose, scott@cpan.org

SEE ALSO

Top

java.


Attribute-Final documentation  | view source Contained in the Attribute-Final distribution.