package Article; use strict; use warnings; sub new { my $class = shift; return bless { @_ }, $class; } sub title { my $self = shift; $self->{title} = shift if @_; return $self->{title}; } sub body { my $self = shift; $self->{body} = shift if @_; return $self->{body}; } # Interesting stuff ...