PPI::To...:Version(3)
π PPI::To...:Version(3) β User Contributed Perl Documentation π
okay bestie, welcome to the PPI::Token::Number::Version era π this is a page from the Perl docs (the "User Contributed Perl Documentation" corner of the internet, iykyk) and we're about to make it make sense.
β¨ NAME β¨
PPI::Token::Number::Version β the token class for a byte-packed number π
πΈ SYNOPSIS πΈ
$n = 1.1.0;
$n = 127.0.0.1;
$n = 10_000.10_000.10_000;
$n = v1.2.3.4
look at her go π¦ multiple dots in a number, and somehow it's still legal. iconic behaviour, no cap.
π INHERITANCE π
PPI::Token::Number::Version
isa PPI::Token::Number
isa PPI::Token
isa PPI::Element
it's giving royal lineage β she's a PPI::Token::Number, which is a PPI::Token, which is a PPI::Element. whole family tree is eating π
π DESCRIPTION π
so the PPI::Token::Number::Version class is the one that handles tokens with multiple decimal points. π
and here's the tea, bestie: in truth, these aren't treated like numbers at all by Perl. not even a little. π but they look like numbers to a parser, and honestly? the vibe check is what matters. she's serving number energy for the parser's sake, periodt. π
β¨ METHODS β¨
π base
Returns the base for the number: 256. that's it, that's the method. slay. π
π literal
Return the numeric value of this token. straightforward, no notes. β
π BUGS π
ngl there are some issues here, and we're keeping it real:
- Does not handle leading minus sign correctly. Should translate to a DashedWord. See <http://perlmonks.org/?node_id=574573>
-95.0.1.0 --> "-_\000\cA\000"
-96.0.1.0 --> Argument "`\0^A\0" isn't numeric in negation (-)
bestie that second one is genuinely cursed π the leading minus is not getting the glow-up it deserves.
π«Ά SUPPORT π«Ά
See the support section in the main module. (go check the main module, she's got the whole support situation handled π)
πΈ AUTHOR πΈ
Chris Dolan <cdolan@cpan.org> β king behaviour, we appreciate you π
π COPYRIGHT π
Copyright 2006 Chris Dolan.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
and that's the whole page, bestie π
this was perl v5.42.0, dated 2026-01-17, and it lives at PPI::To...:Version(3) β go forth and parse those multi-dotted numbers with main character energy β¨π¦π
π¦ where this page comes from
- fedora 44: perl-PPI 1.284-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms