Perfect. Here's some proof of concept code:
#!/usr/bin/perl
package Caller;
sub new { bless {}, 'Caller' }
sub call {
my( $self, $one ) = @_;
$one->output;
}
sub output { "I am the Caller\n" }
1;
package Called;
use PadWalker 'peek_my';
sub new { bless {}, 'Called' }
sub output {
my $caller = peek_my( 1 )->{ '$self' }; #$h->{ '$self' };
print STDOUT $$caller->output();
}
1;
package main;
my $one = new Caller;
my $two = new Called;
$one->call( $two );
This prints:
I am the Caller.
--
Love justice; desire mercy.