Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/memowe/mojolicious-plugin-relativeurlfor
relative links in Mojolicious, really.
https://github.com/memowe/mojolicious-plugin-relativeurlfor
Last synced: 14 days ago
JSON representation
relative links in Mojolicious, really.
- Host: GitHub
- URL: https://github.com/memowe/mojolicious-plugin-relativeurlfor
- Owner: memowe
- License: mit
- Created: 2012-01-12T17:35:53.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-07-21T12:15:43.000Z (over 8 years ago)
- Last Synced: 2023-04-20T13:59:25.672Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
- License: MIT-LICENSE
Awesome Lists containing this project
README
Mojolicious::Plugin::RelativeUrlFor - relative links in Mojolicious, really.
This plugin adds two useful helpers to Mojolicious, that help you using URLs
relative to the request URL: relative_url_for and rel_url_for. It's also
possible to replace the url_for helper which influences link_to and form_for.Installation:
perl Makefile.PL
make
make test
make installBasic usage:
# Mojolicious
$self->plugin('RelativeUrlFor');# Mojolicious::Lite
plugin 'RelativeUrlFor';# In your actions:
$rel_url = $self->rel_url_for('foo', bar => 'baz');# In your templates:
<%= rel_url_for 'foo', bar => 'baz' %>For more informations, see the inlined POD documentation in
lib/Mojolicious/Plugin/RelativeUrlFor.pm or view it in the terminal with
perldoc Mojolicious::Plugin::RelativeUrlForCopyright Mirko Westermeier
This software is released under the MIT license. See MIT-LICENSE for details.