-
-
13 Feb 2021 12:57:03 UTC
- Distribution: App-url
- Module version: 1.007
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (94 / 0 / 1)
- Kwalitee
Bus factor: 1- 73.68% Coverage
- License: artistic_2
- Perl: v5.26.0
- Activity
24 month- Tools
- Download (10.87KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Encode
- I18N::Langinfo
- Mojolicious
- Net::PublicSuffixList
- String::Sprintf
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
App::url - format a URL according to a sprintf-like template
SYNOPSIS
$ url '%h' http://www.example.com/a/b/c www.example.com $ url '%H' http://www.example.com/a/b/c www $ url '%P' http://www.example.com/a/b/c /a/b/c
DESCRIPTION
Decompose the URL and reformat it according to
The formats
%a
- the path%f
- the fragment%h
- the hostname, with domain info%H
- the hostname without domain info%i
- the hostname in punycode%I
- space-separated list of IP addresses for the host%P
- the password of the userinfo portion%p
- the port%q
- the query string%s
- the scheme%S
- the public suffix%u
- the complete URL%U
- the username of the userinfo portion
There are also some bonus formats unrelated to the URL:
%n
- newline%t
- tab%%
- literal percent
Methods
run( TEMPLATE, ARRAY )
Format each URL in ARRAY according to TEMPLATE and return an array reference
COPYRIGHT
Copyright © 2020-2021, brian d foy, all rights reserved.
LICENSE
You can use this code under the terms of the Artistic License 2.
Module Install Instructions
To install App::url, copy and paste the appropriate command in to your terminal.
cpanm App::url
perl -MCPAN -e shell install App::url
For more information on module installation, please visit the detailed CPAN module installation guide.