sub test_package_method { my ($package, $method) = @_; my $code_ref = sub{ return $package->$method() }; run_test( $code_ref ); }