#!/usr/bin/perl use strict; use warnings; { package Foo; our %HASH; $HASH{blah} = sub { my $self = shift; print $self->{value}; }; sub new { bless { crefs => \%HASH, value => 'telcontar' } => shift } sub access { my $self = shift; my $coderef = $self->{crefs}{+shift}; $self->$coderef(@_) } } my $x = Foo->new; $x->access('blah');