Flea

 view release on metacpan or  search on metacpan

lib/Flea.pm  view on Meta::CPAN

=head2 uri($request, $path)

Returns a canonical L<URI> representing the path you passed with
$request->base welded onto the front.  Does the Right Thing if $request->base
or $path have leading/trailing slashes.  Handy for links which are internal to
your app, because it will still behave if you mount your app somewhere other
than C</>.

=head2 json($str)

Returns a full C<200 OK>, C<content-type application/json; charset=UTF-8>
response.  Pass it something that JSON::encode_json can turn into a string.

=head2 text($str)

text/plain; charset=UTF-8.

=head2 html($str)

text/html; charset=UTF-8.  Seeing a pattern?



( run in 1.782 second using v1.01-cache-2.11-cpan-524268b4103 )