NAME
App::URIUtils - Utilities related to URI/URL
VERSION
This document describes version 0.003 of App::URIUtils (from Perl distribution App-URIUtils), released on 2021-06-30.
DESCRIPTION
This distributions provides the following command-line utilities:
FUNCTIONS
parse_url
Usage:
parse_url(%args) -> any
Parse URL string into a hash of information.
Examples:
Example #1:
parse_url(url => "https://www.tokopedia.com/search?st=product&q=soundmagic%20e10");
Result:
{ authority => "www.tokopedia.com", base => undef, canonical => "https://www.tokopedia.com/search?st=product&q=soundmagic%20e10", default_port => 443, fragment => undef, full_path => "/search?st=product&q=soundmagic%20e10", has_recognized_scheme => 1, host => "www.tokopedia.com", opaque => "//www.tokopedia.com/search?st=product&q=soundmagic%20e10", orig => "https://www.tokopedia.com/search?st=product&q=soundmagic%20e10", path => "/search", port => 443, query => "st=product&q=soundmagic e10", scheme => "https", }
Just parse the query parameters into hash:
parse_url( url => "https://www.tokopedia.com/search?st=product&q=soundmagic%20e10", parse_type => "query-params" );
Result:
{ q => "soundmagic e10", st => "product" }
This function is not exported.
Arguments ('*' denotes required arguments):
base => str
parse_type => str (default: "url")
url* => str
Return value: (any)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-URIUtils.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-URIUtils.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-URIUtils
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.