NAME
Dancer::Plugin::ProxyPath::Proxy - Provides user-perspective paths
VERSION
Version 0.03
SYNOPSIS
This object provides the method uri_for to provide user perspective paths. See Dancer::Plugin::ProxyPath
use Dancer::Plugin::ProxyPath;
my $external_path = proxy->uri_for("/path/to/elsewhere");
# http://public.server.com/dancer-app/path/to/elsewhere
...
# and in your templates: (assuming a passed variable $background)
<body style="background-image: url('<% proxy.uri_for(background) %>')">
</body>
If no proxy information is found, proxy->path and proxy->uri for will return the same paths as request->path an request->uri_for, making it work in development as well.
METHODS
uri_for( path, parameters )
Returns a fully qualified url for a path, as seen by the user.
secure_uri_for( path, parameters )
Returns a fully qualified url for a path, as seen by the user, with the scheme set to https.
instance
Returns a singleton instance of this class
is_absolute
Determines whether the path passed to it is absolute by whether or not it has a leading slash
AUTHOR
Alex Kalderimis, <alex kalderimis at gmail dot com>
BUGS
Please report any bugs or feature requests to bug-dancer-plugin-proxypath at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer-Plugin-ProxyPath. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Dancer::Plugin::ProxyPath::Proxy
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dancer-Plugin-ProxyPath
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Dancer obviously, for being a great way to write a web-app.
LICENSE AND COPYRIGHT
Copyright 2011 Alex Kalderimis.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.