News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.