- SEE ALSO
- COPYRIGHT AND LICENSE
CPAN::Dist::FromURL - Extract CPAN distribution name from a URL
This document describes version 0.092 of CPAN::Dist::FromURL (from Perl distribution CPAN-Info-FromURL), released on 2020-10-02.
extract_cpan_dist_from_url($url) -> str
Extract CPAN distribution name from a URL.
Example #1 (mcpan/pod/MOD):
extract_cpan_dist_from_url("https://metacpan.org/pod/Foo::Bar"); # -> undef
Example #2 (mcpan/pod/release/AUTHOR/DIST-VERSION/lib/MOD.pm):
extract_cpan_dist_from_url("http://metacpan.org/pod/release/SRI/Mojolicious-6.46/lib/Mojo.pm"); # -> "Mojolicious"
Example #3 (unknown):
extract_cpan_dist_from_url("https://www.google.com/"); # -> undef
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
$url* => str
Return value: (str)
Please visit the project's homepage at https://metacpan.org/release/CPAN-Info-FromURL.
Source repository is at https://github.com/perlancar/perl-CPAN-Info-FromURL.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Info-FromURL
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.
CPAN::Info::FromURL, the more generic module which is used by this module.
This software is copyright (c) 2020, 2018, 2017, 2016 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.