sr/bin/env perl
# more complex example returning JSON or static content
use 5.10.0;
use strict;
use warnings;
use Limper;
use File::Slurp;
use JSON;
my $document_root = './public/';
my $static =
;
'blegh';
}
};
my $generic = sub {
headers('Content-Type' => 'application/json');
JSON->new->encode({status => 'OK'});
};
get qr{^/} => $static;
post qr{^/} => $generic;
limp(L
ave any of these, but plugins can easily be created for
them:
from_dumper to_dumper
from_json to_json
from_yaml to_yaml
from_xml to_xml
=head2 Boolean
Limper does not define B<true> or B<fa
zens that L<Dancer> pulls in.
B<Limper> is modular - support for serving files, easily returning JSON, or
using PSGI can be included if and only if needed (and these features already
exist on CPAN).
ng to Limper, see L<Limper::Sugar>.
For sending files and easily sending JSON, see L<Limper::SendFile> and L<Limper::SendJSON>.
For differences between Limper and Dancer, see L<Limper::Differences>.
ad1 SEE ALSO
L<Limper::Differences>
L<Limper::Extending>
L<Limper::Engine::PSGI>
L<Limper::SendFile>
L<Limper::SendJSON>
L<Limper::Sugar>
L<App::FatPacker>
L<IO::Socket::INET>
L<Web::Simple>