Class::Interfaces 0.04
|
|||||||||||||||||||
Class::Interfaces is a Per module for defining interface classes inline.
SYNOPSIS
# define some simple interfaces
use Class::Interfaces (
Serializable => [ 'pack', 'unpack' ],
Printable => [ 'toString' ],
Iterable => [ 'iterator' ],
Iterator => [ 'hasNext', 'next' ]
);
# or some more complex ones ...
# interface can also inherit from
# other interfaces using this form
use Class::Interfaces (
BiDirectionalIterator => {
isa => 'Iterator',
methods => [ 'hasPrev', 'prev' ]
},
ResetableIterator => {
isa => 'Iterator',
methods => [ 'reset' ]
},
# we even support multiple inheritance
ResetableBiDirectionalIterator => {
isa => [ 'ResetableIterator', 'BiDirectionalIterator' ]
}
);
# it is also possible to create an
# empty interface, sometimes called
# a marker interface
use Class::Interfaces (
JustAMarker => undef
);
This module provides a simple means to define abstract class interfaces, which can be used to program using the concepts of interface polymorphism.
Requirements:
tags
Download Class::Interfaces 0.04
Authors software
|
|
|
|
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
