CPAN::Version(3pm)

✨ CPAN::Version ✨

Okay bestie, so this is a page from the Perl Programmers Reference Guide β€” it's CPAN::Version, and no it's not the version module you're thinking of, it's the other one. Sit down, I gotchu 🫢


🌸 NAME 🌸

CPAN::Version β€” literally just a bunch of utility functions to compare CPAN versions. That's the whole gig. Comparing version strings so you don't have to. Iconic behaviour, honestly.


πŸŽ€ SYNOPSIS πŸŽ€

Here's the whole vibe in code, copied exactly, don't @ me:

use CPAN::Version;

CPAN::Version->vgt("1.1","1.1.1");    # 1 bc. 1.1 > 1.001001

CPAN::Version->vlt("1.1","1.1");      # 0 bc. 1.1 not < 1.1

CPAN::Version->vcmp("1.1","1.1.1");   # 1 bc. first is larger

CPAN::Version->vcmp("1.1.1","1.1");   # -1 bc. first is smaller

CPAN::Version->readable(v1.2.3);      # "v1.2.3"

CPAN::Version->vstring("v1.2.3");     # v1.2.3

CPAN::Version->float2vv(1.002003);    # "v1.2.3"

Like, vgt says "is the first one greater?", vlt says "is the first one lesser?", vcmp gives you the whole 1 / -1 situation β€” and then there's the glow-up squad: readable, vstring, and float2vv who translate between formats. Slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this module is the middleman. It mediates between some version that perl sees in a package and the version that gets published by the CPAN indexer. Two different worlds, one tiny module holding them together. 🧚

It's only written as a helper module for both CPAN.pm and CPANPLUS.pm β€” so like, it's not out here trying to be a main character on its own. It's the supportive best friend. Respect.

And ngl, as it stands it predates version.pm, but it's got the exact same goal: make version strings visible and comparable. Same dream, different era. Periodt. ⭐


πŸ’œ LICENSE πŸ’œ

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


πŸ’– quick vibe check: everything above is exactly what the page says β€” no extra lore, no invented features. Just here for the aesthetics.

And that's the whole page, bestie! πŸ“ Sign-off time: this was CPAN::Version(3pm) from perl v5.42.3, dated 2026-11-03 β€” go forth and compare versions responsibly 😭πŸ”₯

πŸ“¦ where this page comes from