NAME
    Mojolicious::Plugin::UrlWith - Preserve parts of the url

VERSION
    0.03

DESCRIPTION
    This helper provides the same method as "url_for" in
    Mojolicious::Controller with the difference that it keeps the query
    string.

SYNOPSIS
        package MyApp;
        sub startup {
            my $self = shift;
            $self->plugin('Mojolicious::Plugin::UrlWith');
            # ...
        }

ATTRIBUTES
  parse_fragment
    Will remove the '#fragment' part from the first arugment to "url_with",
    and use it use it for "fragment" in Mojo::URL.

HELPERS
  url_with
    The examples below has this current request url:
    "http://somedomain.com/search?page=1".

    $controller->url_with({ name => 'bob' });
        Will result in "http://somedomain.com/search?page=1&name=bob".

    $controller->url_with({ page => undef });
        Will result in "http://somedomain.com/search".

    $controller->url_with('named', { age => 42 });
        Will result in
        "http://somedomain.com/some/named/route?page=1&age=42".

    $controller->url_with('/path', { random => 24 });
        Will result in "http://somedomain.com/path?page=1&random=24".

    $controller->url_with('/path', [ c => 313 ]);
        Will result in "http://somedomain.com/path?c=313".

    Summary: A hash-ref will be merged with existing query params, while an
    array-ref will create a new set of query params.

  link_with
    Same as "link_to" in Mojolicious::Plugin::TagHelpers, but use "url_with"
    instead of "url_to" in Mojolicious::Controller to construct the hyper
    reference.

METHODS
  register
    Will register the methods under "HELPERS".

COPYRIGHT & LICENSE
    This library is free software. You can redistribute it and/or modify it
    under the same terms as Perl itself.

AUTHOR
    Jan Henning Thorsen

