package SomeClass; use strict; use warnings; use Class::Std; { # Attributes my %whatever: ATTR; # this initializes the class in place of new sub BUILD { my ($self, $ident, $arg_ref) = @_; ... # Do some initialization stuff here } # here's a method that's private. It throws an exception when called from outside the class it's declared. sub some_method: PRIVATE { my ($self) = @_; ... # Some class stuff here } }