sub generate_hash { my $self; if ( ref $_[0] && @_ == 4 ) { # We were called as a method $self = shift; } my ($i, $j, $k) = @_; } #### sub new { my $class = shift; my $self = {}; bless $self, $class; $self->_initialize(@_); return $self; } sub _initialize { my $self = shift; # Do stuff with @_ }