sub call { my $self = shift; my ($method, $path, $format, $query, $content, $cb) = @_; $self->{Request} = HTTP::Request->new( $method, "https://$self->{host}/cgi-bin/api/" . join('/', @$path) . (".$format") . ($query ? "?$query" : "") ); $self->{Request}->content($content) if $content; $self->_head($self->{Request}, $cb); } #### $api->call(GET => ['foo', $spam], 'json', undef, undef, sub { ... }); ## Program M, works $api->call(GET => ['bar', $spam, 'baz', $ham], 'json', undef, undef, sub { ... }); ## Program C, doesn't work