package commonRoutine; sub new { my ($class, $cacheFileName) = @_; my $this = bless({}, ref($class) || $class); # Initialize member variables. $this->{initialized} = 1; $this->{lastFlushTime} = time(); return $this; } ## # Destructor. Clean up object. # sub DESTROY { my $this = shift; $this->_func2(); } sub _func3{ print "me\n"; } 1