sub new { my $self = {}; bless $self, $_[0]; $self->{f} = sub { &foo ($self, @_); }; return $self; }