my $method = $a->answers->{answers_comments}; $a->answers->$method( 123, 134, 145, { order => "desc", sort => "votes", }, ); #### # in Answers.pm use Sub::Name 'subname'; *answers_comments = subname( "Net::StackExchange::V2::Answer::answers_comments", one_param("answers","comments"), ); #### $a->answers->answers_comments( 123, 134, 145, { order => "desc", sort => "votes", }, );