package Test; use strict; use warnings; sub new { my $class = shift; my $self = {}; bless $self, $class; return $self; } sub getValue { my $self = shift; print "\n~~~~~~~~getValue :$self \n"; $self{theValue}; } sub setValue { my $self = shift; my $value = shift; print "\n~~~~~~~~~~~set value: $self \n"; $self{theValue} = $value; } 1;