use strict; package Foo; sub new { my $self = {}; bless $self, 'Foo'; } sub bar { my $self = shift(); if (@_ == 0) { return "Call \$foo->bar()"; } else { return "Call \$foo->bar( '" . join("', '", @_) . "')"; } } package main; my $foo = new Foo; use Interpolation 'foo:$@->$' => sub { my $cmd = shift(); no strict 'refs'; $foo->$cmd(@_); }; # this creates a tied PACKAGE variable %main::foo !!! print "x $foo{bar}\n"; print "x $foo{bar}{1}\n"; print "x $foo{bar}{1,2}\n"; # if you want the arrow just create a reference to the %main::foo my $Foo = \%foo; print "x $Foo->{bar}\n"; print "x $Foo->{bar}{1}\n"; print "x $Foo->{bar}{1,2}\n";