URI::cpan(3)

welcome to URI::cpan(3) from User Contributed Perl Documentation 🫢 bestie, this is the page for URLs that refer to things on the CPAN, and we’re gonna get into it.

πŸ’– NAME πŸ’–

URI::cpan β€” URLs that refer to things on the CPAN. That’s the whole vibe: CPAN URLs, handled. ✨

πŸŽ€ VERSION πŸŽ€

version 1.009 πŸ’… β€” that’s the version, periodt.

✨ SYNOPSIS ✨

okay so here’s the actual synopsis, no cap:

  use URI::cpan;

  my $uri = URI->new('cpan:///distfile/RJBS/URI-cpan-1.000.tar.gz');

  $uri->author;       # => RJBS
  $uri->dist_name;    # => URI-cpan
  $uri->dist_version; # => 1.000

other forms of cpan: URI include:

cpan:///author/RJBS

and these next ones are reserved for likely future use (iykyk):

cpan:///dist
cpan:///module
cpan:///package

🌸 PERL VERSION 🌸

okay so the perl version tea β˜•: this library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. that’s the rule, bestie πŸ’…

⚠️ WARNINGS ⚠️

real talk: URI objects are difficult to subclass, so I have not (yet?) taken the time to remove mutability from the objects. This means that you can probably alter a URI::cpan object into a state where it is no longer valid.

Please don’t change the contents of these objects after construction. fr fr, don’t do it 😭

πŸ¦‹ SEE ALSO πŸ¦‹

go look at URI::cpan::author and URI::cpan::distfile β€” that’s the see also, bestie. ✨

πŸ’œ THANKS πŸ’œ

This code is derived from code written at Pobox.com by Hans Dieter Pearcey. Dieter helped thrash out this new implementation, too. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Ricardo SIGNES <cpan@semiotic.systems> πŸ‘‘

🫢 CONTRIBUTOR 🫢

Ricardo Signes <rjbs@semiotic.systems> 🫢

This software is copyright (c) 2009 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


okay bye bestie πŸ’… β€” this page is from perl v5.42.0, dated 2024-03-08, and it’s the URI::cpan(3) page. mwah πŸŽ€

πŸ“¦ where this page comes from