1#!perl 2 3use strict; 4use warnings; 5 6use Test::More tests => 2; 7use HTTP::Tiny; 8 9my @accessors = qw( 10 agent default_headers http_proxy https_proxy keep_alive local_address 11 max_redirect max_size proxy no_proxy timeout SSL_options verify_SSL cookie_jar 12); 13my @methods = qw( 14 new get head put post delete post_form request mirror www_form_urlencode 15); 16 17my %api; 18@api{@accessors} = (1) x @accessors; 19@api{@methods} = (1) x @methods; 20 21can_ok('HTTP::Tiny', @methods, @accessors); 22 23my @extra = 24 grep {! $api{$_} } 25 grep { $_ !~ /\A_/ } 26 grep {; no strict 'refs'; *{"HTTP::Tiny::$_"}{CODE} } 27 sort keys %HTTP::Tiny::; 28 29ok( ! scalar @extra, "No unexpected subroutines defined" ) 30 or diag "Found: @extra"; 31