Perl::...trings(3pm)
π NAME π
So bestie, welcome to the manual page for Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings, which lives in the User Contributed Perl Documentation section (3pm). The whole vibe of this policy in one line: don't use strings like "v1.4" or "1.4.5" when you're including other modules. Periodt. π
π«Ά AFFILIATION π«Ά
Okay so this Policy is part of the core Perl::Critic distribution. It's canon, it ships with the main thing, iykyk. β¨
π¦ DESCRIPTION π¦
Whenever you use or require a module, you're allowed to specify a minimum version requirement. And listen β to keep things compatible with older Perls, that version number should be expressed as a floating-point number. Do not use v-strings, and do not use three-part numbers. Nope nope nope. π
The Perl convention for expressing version numbers as floats is literally this:
version + (patch level / 1000)
And here's how that actually looks, bestie:
use Foo v1.2 qw(foo bar); # not ok
use Foo 1.2.03 qw(foo bar); # not ok
use Foo 1.00203 qw(foo bar); # ok
The first two? Not ok. Absolutely not. π The third one? Ok. That's the one. Slay. π
π CONFIGURATION π
Ngl, this Policy is not configurable β like, at all β except for the standard options. That's it. That's the whole customization menu. π
π§ AUTHOR π§
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β the icon who wrote this. π
π COPYRIGHT π
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. π
And that's the whole page, bestie! π This absolute gem came to you courtesy of perl v5.42.0, dated 2024-10-23 β so go forth, write your version requirements as floats, and make the old Perls proud. Mwah! π
β¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms