PERLVER-FAST(1p)

πŸ“¦
version 0.22 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– perlver-fast πŸ’–

okay bestie, this is from the User Contributed Perl Documentation, section 1p β€” pull up a chair, we're doing version detective work πŸ•΅οΈβ€β™€οΈβœ¨


πŸŽ€ NAME πŸŽ€

perlver-fast β€” the Minimum perl version detector. That's it, that's the whole vibe. It sniffs out the oldest perl your code could possibly get away with. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

So here's the deal: it reports minimum version and minimum syntax version. And if you toss in -c, it tries to add detailed information too. Little extra for you, no big deal. 🫢

🌸 Analyze from file list 🌸

Just hand it a bunch of files and it'll tell you what each one needs:

$ perlver-fast lib/Acme/Kensiro.pm t/00.load.t
lib/Acme/Kensiro.pm: 5.008001 / 5.006
t/00.load.t: 5.006 / 5.006

See that? Two numbers per file, minimum version and minimum syntax version, slashed apart like they're in a situationship. πŸ’€

πŸ¦‹ Analyze from STDIN πŸ¦‹

Feeding it through standard input? Also valid, also iconic:

$ perlver-fast < lib/Acme/Kensiro.pm
STDIN: 5.008001 / 5.006

It literally labels it STDIN for you. Not me being proud of a label but here we are. πŸ₯Ή

⭐ Analyze from expression ⭐

And my personal fave β€” you can just throw an expression at it with -e:

$ perlver-fast -e '$a //= 42'
-e: 5.010 / 5.010

Now watch what happens when you add -v, because that's when it starts spilling:

$ perlver-fast -v -e '$a //= 42'
-e: 5.010 / 5.010
5.010      //= operator

Look at that breakdown. It's giving receipts. It's giving "here's exactly which feature bumped you up". Obsessed. πŸ”₯

And it plays nice with actual version declarations too:

$ perlver-fast -e 'use 5.24.1; $a //= 42'
-e: 5.24 / 5.010

Notice how the minimum version is 5.24 because you asked for 5.24.1, but the minimum syntax version is still hanging out at 5.010 because //= is the only syntax crime in there. Two different questions, two different answers. Main character energy tbh. πŸ‘‘


πŸ’‘ Quick vibe check on the flags you saw: -c tries to add detailed information, -v gets you that feature-by-feature breakdown, and -e takes your expression straight up. Those are the ones living in this page, bestie.

And that's the whole page, no cap. This was perl v5.40.0, dated 2025-01-11, filed under PERLVER-FAST(1p) in the User Contributed Perl Documentation. Go find out how old your perl really needs to be. Slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from