[Melbourne-pm] Interface Classes

Andrew Savige ajsavige at yahoo.com.au
Thu Mar 23 13:07:55 PST 2006


--- Scott Penrose wrote:
> But... in Perl we don't have the Interface that Java does...

I just stumbled on this node today:

 http://www.perlmonks.org/?node_id=379101

Notice that Perl 6 prefers the concept of "roles" to "interfaces",
AFAICT because, though interfaces are great for enforcing a
consistent interface across classes, they don't provide any
help at all with code reuse.

To get a feel for Perl6-style roles in Perl 5, have a look at:

 http://search.cpan.org/dist/Class-Trait/
 http://search.cpan.org/dist/Perl6-Roles/
 http://search.cpan.org/dist/Class-Role/
 http://search.cpan.org/dist/Class-Roles/

/-\



	

	
		
____________________________________________________ 
On Yahoo!7 
Messenger - Make free PC-to-PC calls to your friends overseas. 
http://au.messenger.yahoo.com 



More information about the Melbourne-pm mailing list