Klonk

 view release on metacpan or  search on metacpan

lib/Klonk/Routes.pm  view on Meta::CPAN

            if ($encode_p) {
                utf8::encode $body unless ref $body;
                $type .= '; charset=utf-8';
            }
            my $length = ref $body
                ? -s $body || undef
                : length $body;
            return [
                $status,
                [
                    'content-type' => $type,
                    defined $length
                        ? ('content-length' => $length)
                        : (),
                    map {
                        my $k = $_;
                        my $v = $headers->{$k};
                        map +($k => $_), ref($v) eq 'ARRAY' ? @$v : $v
                    }
                    keys %{$headers // {}}
                ],



( run in 0.809 second using v1.01-cache-2.11-cpan-d7f47b0818f )