use threads;;
{
package junk;
sub new{bless [], $_[0] }
sub method{ printf __PACKAGE__ . ": @_" }
}
$o = junk->new;;
async{ sub{ $o->method( qw[ the quick brown fox ] ) } };;
## No output!
async \&junk::method, $o, qw[ the quick brown fox ];;
#outputs
junk: junk=ARRAY(0x1adcdec) the quick brown fox
####
... setup as above
async( $obj->can("method"), $obj, qw[ the quick brown fox ] );;
[Type of arg 1 to threads::async must be block or sub {} (not subroutine entry) at ...
####
async sub{ $o->method( qw[ the quick brown fox ] ) };;
junk: junk=ARRAY(0x1b7d5a4) the quick brown fox
async{ $o->method( qw[ the quick brown fox ] ) };;
junk: junk=ARRAY(0x1c1b4a4) the quick brown fox