Alexis Kalderimis > Dancer-Plugin-ProxyPath-0.03 > Dancer::Plugin::ProxyPath::Proxy

Download:
Dancer-Plugin-ProxyPath-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.03   Source  

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:

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.

syntax highlighting: