I don't think I understand your question. I tried this:
use strict;
use warnings;
use Data::Dumper;
my $obj = bless {}, 'Foo';
my $action = sub { print Dumper( \@_ ) };
$obj->$action( 'hello' );
__END__
$VAR1 = [
bless( {}, 'Foo' ),
'hello'
];
...and that works. Are you saying you want to do something like "$obj->sub { do_stuff(); etc(); }( @args );" so that you don't need an explicit $action? It seems that you're basically doing something like:
{
@_ = ( $obj, @args );
# rest of 'sub' goes here
}
"Inline" code doesn't need to be made into a sub. Am I misunderstanding your question?