package Stuff; use strict; use Event; sub new { my $class = shift; my $self = {}; $self->{args} = [@_]; bless $self, $class; $self->{event} = Event->timer( interval => 1, cb => [$self, "read"], ); return $self; } sub read { my $self = shift; my $e = shift; # do work that uses values from $self }