Limper::Differences - differences between Limper and Dancer
version 0.013
This document describes the differences between Limper and Dancer, as well as planned features, what will never happen, etc.
This just covers the basic differences of what is described on the main documentation page for Dancer, and not deeper differences. More about use, less about design.
Limper also has trace.
Limper's any really matches any. The following syntax is not supported:
any ['get', 'post'] => '/myaction' => sub { ... };
Instead, you can chain routes together:
get post => '/myaction' => sub { ... };
This is both cleaner code and cleaner syntax.
Limper does not support prefix, and likely never will.
Limper has three hooks: after, request_handler, and response_handler.
Limper's after is similar to Dancer's after.
Other hooks may be added as needed.
Limper has info and warning. They send to STDOUT and STDERR, respectively.
Dancer also has debug and error, which Limper might get.
There is currently no way to configure these.
Limper does not currently use a config file.
Dancer's setting (and it's alias set) allow you to get/set config setting, though it also accesses some sort of current settings under some condition.
Limper and Dancer both have headers. Limper's will also return the current headers as a list or arrayref.
However, Limper will currently replace all headers with whatever is passed to it.
Dancer's header is just an alias for headers.
Something like push_header is currently not supported, but could be supported by a plugin.
Limper's status can also set a custom phrase to return with the code (will likely only work with the built-in server).
Dancer's status can take a code's standard name in lower case instead of the code.
Limper's request is just a simple hashref.
Limper will never have 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
Limper does not define true or false. Dancer's true and false is just 1 and 0, which is annoying because then you can't use boolean;.
use boolean;
See "send_file" in Limper::SendFile and "mime_types" in Limper::SendFile.
These are all implemented in Limper::Sugar:
limper_version load captures dirname halt send_error uri_for redirect content_type path
The following are currently unsupported, and may or may not be supported later, either in Limper itself or via a plugin.
This should be trivial enough to implement in Limper.
There should be a plugin for this.
Something like this would be nice. Currently the following will work, though:
get qr{^/file/([^/]+)\.([^/]+)$} => sub { my ($file, $extension) = ($1, $2); ... };
Yes, it's hideous. "megasplat" is much more complex.
Unknown complexity.
Unknown complexity. Perhaps a plugin.
Unknown complexity. Will be a plugin.
Unknown complexity. Perhaps a plugin. Related to template.
Unknown complexity. Without prefix, I'm not sure how useful this really is. Limper does not have the degree of containment that Dancer has.
This returns a hashref of what the current response will be when the route ends. It can be inspected and modified as needed. I don't know how to get at any of these values easily under Dancer, outside of a hook.
Copyright (C) 2014 by Ashley Willis <ashley+perl@gitable.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.4 or, at your option, any later version of Perl 5 you may have available.
Limper::Extending
To install Limper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Limper
CPAN shell
perl -MCPAN -e shell install Limper
For more information on module installation, please visit the detailed CPAN module installation guide.