App::URIUtils - Utilities related to URI/URL
This document describes version 0.003 of App::URIUtils (from Perl distribution App-URIUtils), released on 2021-06-30.
This distributions provides the following command-line utilities:
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" );
{ 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)
Please visit the project's homepage at https://metacpan.org/release/App-URIUtils.
Source repository is at https://github.com/perlancar/perl-App-URIUtils.
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.
perlancar <perlancar@cpan.org>
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.
To install App::URIUtils, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::URIUtils
CPAN shell
perl -MCPAN -e shell install App::URIUtils
For more information on module installation, please visit the detailed CPAN module installation guide.