- or download this
#!/usr/bin/perl -w
use strict;
...
package main;
my $foo = new Foo;
- or download this
my $do_it = \&Foo::do_it;
$do_it->('direct call');
- or download this
my $ref = ref($foo);
my $do_it2;
eval "\$do_it2 = \\&${ref}::do_it";
$do_it2->('indirect call');