Re:Tour De Babel -- Rant about programming languages
by jrockway on Tuesday September 02, 2008 @02:14AM
(#292455)
Perl 5 has had OO forever. Here's how it works:
package Class;
sub new { my $class = shift; bless {} => $class }
sub method { my $self = shift; $self->{attribute} = 'value' };
package Subclass;
our @ISA = qw(Class);
sub method { my $self = shift; $self->SUPER::method(...); ... }
package main;
my $class = Subclass->new;
$class->method;
This is built into the core.
Has the situation changed? Are there OO things included with the default dist of Perl?