{
    "content": [
        {
            "type": "text",
            "text": "# version::Internals (perldoc)\n\n## NAME\n\nversion::Internals - Perl extension for Version Objects\n\n## DESCRIPTION\n\nOverloaded version objects for all modern versions of Perl. This documents the internal data\nrepresentation and underlying code for version.pm. See version.pod for daily usage. This\ndocument is only useful for users interested in the gory details.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (4 subsections)\n- **IMPLEMENTATION DETAILS** (4 subsections)\n- **USAGE DETAILS** (4 subsections)\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "version::Internals",
        "section": "",
        "mode": "perldoc",
        "summary": "version::Internals - Perl extension for Version Objects",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 34,
                "subsections": [
                    {
                        "name": "Decimal Versions",
                        "lines": 24
                    },
                    {
                        "name": "Dotted-Decimal Versions",
                        "lines": 19
                    },
                    {
                        "name": "Alpha Versions",
                        "lines": 16
                    },
                    {
                        "name": "Regular Expressions for Version Parsing",
                        "lines": 64
                    }
                ]
            },
            {
                "name": "IMPLEMENTATION DETAILS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Equivalence between Decimal and Dotted-Decimal Versions",
                        "lines": 23
                    },
                    {
                        "name": "Quoting Rules",
                        "lines": 51
                    },
                    {
                        "name": "Version Object Internals",
                        "lines": 38
                    },
                    {
                        "name": "Replacement UNIVERSAL::VERSION",
                        "lines": 42
                    }
                ]
            },
            {
                "name": "USAGE DETAILS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Using modules that use version.pm",
                        "lines": 34
                    },
                    {
                        "name": "Object Methods",
                        "lines": 1
                    },
                    {
                        "name": "new",
                        "lines": 38
                    },
                    {
                        "name": "qv",
                        "lines": 151
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "version::Internals - Perl extension for Version Objects\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Overloaded version objects for all modern versions of Perl. This documents the internal data\nrepresentation and underlying code for version.pm. See version.pod for daily usage. This\ndocument is only useful for users interested in the gory details.\n\nWHAT IS A VERSION?\nFor the purposes of this module, a version \"number\" is a sequence of positive integer values\nseparated by one or more decimal points and optionally a single underscore. This corresponds to\nwhat Perl itself uses for a version, as well as extending the \"version as number\" that is\ndiscussed in the various editions of the Camel book.\n\nThere are actually two distinct kinds of version objects:\n\nDecimal versions\nAny version which \"looks like a number\", see \"Decimal Versions\". This also includes versions\nwith a single decimal point and a single embedded underscore, see \"Alpha Versions\", even\nthough these must be quoted to preserve the underscore formatting.\n\nDotted-Decimal versions\nAlso referred to as \"Dotted-Integer\", these contains more than one decimal point and may\nhave an optional embedded underscore, see Dotted-Decimal Versions. This is what is commonly\nused in most open source software as the \"external\" version (the one used as part of the tag\nor tarfile name). A leading 'v' character is now required and will warn if it missing.\n\nBoth of these methods will produce similar version objects, in that the default stringification\nwill yield the version \"Normal Form\" only if required:\n\n$v  = version->new(1.002);     # 1.002, but compares like 1.2.0\n$v  = version->new(1.002003);  # 1.002003\n$v2 = version->new(\"v1.2.3\");  # v1.2.3\n\nIn specific, version numbers initialized as \"Decimal Versions\" will stringify as they were\noriginally created (i.e. the same string that was passed to \"new()\". Version numbers initialized\nas \"Dotted-Decimal Versions\" will be stringified as \"Normal Form\".\n",
                "subsections": [
                    {
                        "name": "Decimal Versions",
                        "content": "These correspond to historical versions of Perl itself prior to 5.6.0, as well as all other\nmodules which follow the Camel rules for the $VERSION scalar. A Decimal version is initialized\nwith what looks like a floating point number. Leading zeros are significant and trailing zeros\nare implied so that a minimum of three places is maintained between subversions. What this means\nis that any subversion (digits to the right of the decimal place) that contains less than three\ndigits will have trailing zeros added to make up the difference, but only for purposes of\ncomparison with other version objects. For example:\n\n# Prints     Equivalent to\n$v = version->new(      1.2);    # 1.2        v1.200.0\n$v = version->new(     1.02);    # 1.02       v1.20.0\n$v = version->new(    1.002);    # 1.002      v1.2.0\n$v = version->new(   1.0023);    # 1.0023     v1.2.300\n$v = version->new(  1.00203);    # 1.00203    v1.2.30\n$v = version->new( 1.002003);    # 1.002003   v1.2.3\n\nAll of the preceding examples are true whether or not the input value is quoted. The important\nfeature is that the input value contains only a single decimal. See also \"Alpha Versions\".\n\nIMPORTANT NOTE: As shown above, if your Decimal version contains more than 3 significant digits\nafter the decimal place, it will be split on each multiple of 3, so 1.0003 is equivalent to\nv1.0.300, due to the need to remain compatible with Perl's own 5.00503 == 5.5.30\ninterpretation. Any trailing zeros are ignored for mathematical comparison purposes.\n"
                    },
                    {
                        "name": "Dotted-Decimal Versions",
                        "content": "These are the newest form of versions, and correspond to Perl's own version style beginning with\n5.6.0. Starting with Perl 5.10.0, and most likely Perl 6, this is likely to be the preferred\nform. This method normally requires that the input parameter be quoted, although Perl's after\n5.8.1 can use v-strings as a special form of quoting, but this is highly discouraged.\n\nUnlike \"Decimal Versions\", Dotted-Decimal Versions have more than a single decimal point, e.g.:\n\n# Prints\n$v = version->new( \"v1.200\");    # v1.200.0\n$v = version->new(\"v1.20.0\");    # v1.20.0\n$v = qv(\"v1.2.3\");               # v1.2.3\n$v = qv(\"1.2.3\");                # v1.2.3\n$v = qv(\"1.20\");                 # v1.20.0\n\nIn general, Dotted-Decimal Versions permit the greatest amount of freedom to specify a version,\nwhereas Decimal Versions enforce a certain uniformity.\n\nJust like \"Decimal Versions\", Dotted-Decimal Versions can be used as \"Alpha Versions\".\n"
                    },
                    {
                        "name": "Alpha Versions",
                        "content": "For module authors using CPAN, the convention has been to note unstable releases with an\nunderscore in the version string. (See CPAN.) version.pm follows this convention and alpha\nreleases will test as being newer than the more recent stable release, and less than the next\nstable release. Only the last element may be separated by an underscore:\n\n# Declaring\nuse version 0.77; our $VERSION = version->declare(\"v1.23\");\n\n# Parsing\n$v1 = version->parse(\"v1.23\");\n$v1 = version->parse(\"1.002003\");\n\nNote that you must quote the version when writing an alpha Decimal version. The stringified form\nof Decimal versions will always be the same string that was used to initialize the version\nobject.\n"
                    },
                    {
                        "name": "Regular Expressions for Version Parsing",
                        "content": "A formalized definition of the legal forms for version strings is included in the\n\"version::regex\" class. Primitives are included for common elements, although they are scoped to\nthe file so they are useful for reference purposes only. There are two publicly accessible\nscalars that can be used in other code (not exported):\n\n$version::LAX\nThis regexp covers all of the legal forms allowed under the current version string parser.\nThis is not to say that all of these forms are recommended, and some of them can only be\nused when quoted.\n\nFor dotted decimals:\n\nv1.2\n1.2345.6\nv1.234\n\nThe leading 'v' is optional if two or more decimals appear. If only a single decimal is\nincluded, then the leading 'v' is required to trigger the dotted-decimal parsing. A leading\nzero is permitted, though not recommended except when quoted, because of the risk that Perl\nwill treat the number as octal. A trailing underscore plus one or more digits denotes an\nalpha or development release (and must be quoted to be parsed properly).\n\nFor decimal versions:\n\n1\n1.2345\n1.234501\n\nan integer portion, an optional decimal point, and optionally one or more digits to the\nright of the decimal are all required. A trailing underscore is permitted and a leading zero\nis permitted. Just like the lax dotted-decimal version, quoting the values is required for\nalpha/development forms to be parsed correctly.\n\n$version::STRICT\nThis regexp covers a much more limited set of formats and constitutes the best practices for\ninitializing version objects. Whether you choose to employ decimal or dotted-decimal for is\na personal preference however.\n\nv1.234.5\nFor dotted-decimal versions, a leading 'v' is required, with three or more sub-versions\nof no more than three digits. A leading 0 (zero) before the first sub-version (in the\nabove example, '1') is also prohibited.\n\n2.3456\nFor decimal versions, an integer portion (no leading 0), a decimal point, and one or\nmore digits to the right of the decimal are all required.\n\nBoth of the provided scalars are already compiled as regular expressions and do not contain\neither anchors or implicit groupings, so they can be included in your own regular expressions\nfreely. For example, consider the following code:\n\n($pkg, $ver) =~ /\n^[ \\t]*\nuse [ \\t]+($PKGNAME)\n(?:[ \\t]+($version::STRICT))?\n[ \\t]*;\n/x;\n\nThis would match a line of the form:\n\nuse Foo::Bar::Baz v1.2.3;       # legal only in Perl 5.8.1+\n\nwhere $PKGNAME is another regular expression that defines the legal forms for package names.\n"
                    }
                ]
            },
            "IMPLEMENTATION DETAILS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Equivalence between Decimal and Dotted-Decimal Versions",
                        "content": "When Perl 5.6.0 was released, the decision was made to provide a transformation between the\nold-style decimal versions and new-style dotted-decimal versions:\n\n5.6.0    == 5.006000\n5.00504 == 5.5.40\n\nThe floating point number is taken and split first on the single decimal place, then each group\nof three digits to the right of the decimal makes up the next digit, and so on until the number\nof significant digits is exhausted, plus enough trailing zeros to reach the next multiple of\nthree.\n\nThis was the method that version.pm adopted as well. Some examples may be helpful:\n\nequivalent\ndecimal    zero-padded    dotted-decimal\n-------    -----------    --------------\n1.2        1.200          v1.200.0\n1.02       1.020          v1.20.0\n1.002      1.002          v1.2.0\n1.0023     1.002300       v1.2.300\n1.00203    1.002030       v1.2.30\n1.002003   1.002003       v1.2.3\n"
                    },
                    {
                        "name": "Quoting Rules",
                        "content": "Because of the nature of the Perl parsing and tokenizing routines, certain initialization values\nmust be quoted in order to correctly parse as the intended version, especially when using the\n\"declare\" or \"qv()\" methods. While you do not have to quote decimal numbers when creating\nversion objects, it is always safe to quote all initial values when using version.pm methods, as\nthis will ensure that what you type is what is used.\n\nAdditionally, if you quote your initializer, then the quoted value that goes in will be exactly\nwhat comes out when your $VERSION is printed (stringified). If you do not quote your value,\nPerl's normal numeric handling comes into play and you may not get back what you were expecting.\n\nIf you use a mathematic formula that resolves to a floating point number, you are dependent on\nPerl's conversion routines to yield the version you expect. You are pretty safe by dividing by a\npower of 10, for example, but other operations are not likely to be what you intend. For\nexample:\n\n$VERSION = version->new((qw$Revision: 1.4)[1]/10);\nprint $VERSION;          # yields 0.14\n$V2 = version->new(100/9); # Integer overflow in decimal number\nprint $V2;               # yields something like 11.111.111.100\n\nPerl 5.8.1 and beyond are able to automatically quote v-strings but that is not possible in\nearlier versions of Perl. In other words:\n\n$version = version->new(\"v2.5.4\");  # legal in all versions of Perl\n$newvers = version->new(v2.5.4);    # legal only in Perl >= 5.8.1\n\nWhat about v-strings?\nThere are two ways to enter v-strings: a bare number with two or more decimal points, or a bare\nnumber with one or more decimal points and a leading 'v' character (also bare). For example:\n\n$vs1 = 1.2.3; # encoded as \\1\\2\\3\n$vs2 = v1.2;  # encoded as \\1\\2\n\nHowever, the use of bare v-strings to initialize version objects is strongly discouraged in all\ncircumstances. Also, bare v-strings are not completely supported in any version of Perl prior to\n5.8.1.\n\nIf you insist on using bare v-strings with Perl > 5.6.0, be aware of the following limitations:\n\n1) For Perl releases 5.6.0 through 5.8.0, the v-string code merely guesses, based on some\ncharacteristics of v-strings. You must use a three part version, e.g. 1.2.3 or v1.2.3 in order\nfor this heuristic to be successful.\n\n2) For Perl releases 5.8.1 and later, v-strings have changed in the Perl core to be magical,\nwhich means that the version.pm code can automatically determine whether the v-string encoding\nwas used.\n\n3) In all cases, a version created using v-strings will have a stringified form that has a\nleading 'v' character, for the simple reason that sometimes it is impossible to tell whether one\nwas present initially.\n"
                    },
                    {
                        "name": "Version Object Internals",
                        "content": "version.pm provides an overloaded version object that is designed to both encapsulate the\nauthor's intended $VERSION assignment as well as make it completely natural to use those objects\nas if they were numbers (e.g. for comparisons). To do this, a version object contains both the\noriginal representation as typed by the author, as well as a parsed representation to ease\ncomparisons. Version objects employ overload methods to simplify code that needs to compare,\nprint, etc the objects.\n\nThe internal structure of version objects is a blessed hash with several components:\n\nbless( {\n'original' => 'v1.2.34',\n'alpha' => 1,\n'qv' => 1,\n'version' => [\n1,\n2,\n3,\n4\n]\n}, 'version' );\n\noriginal\nA faithful representation of the value used to initialize this version object. The only time\nthis will not be precisely the same characters that exist in the source file is if a short\ndotted-decimal version like v1.2 was used (in which case it will contain 'v1.2'). This form\nis STRONGLY discouraged, in that it will confuse you and your users.\n\nqv  A boolean that denotes whether this is a decimal or dotted-decimal version. See \"isqv()\" in\nversion.\n\nalpha\nA boolean that denotes whether this is an alpha version. NOTE: that the underscore can only\nappear in the last position. See \"isalpha()\" in version.\n\nversion\nAn array of non-negative integers that is used for comparison purposes with other version\nobjects.\n"
                    },
                    {
                        "name": "Replacement UNIVERSAL::VERSION",
                        "content": "In addition to the version objects, this modules also replaces the core UNIVERSAL::VERSION\nfunction with one that uses version objects for its comparisons. The return from this operator\nis always the stringified form as a simple scalar (i.e. not an object), but the warning message\ngenerated includes either the stringified form or the normal form, depending on how it was\ncalled.\n\nFor example:\n\npackage Foo;\n$VERSION = 1.2;\n\npackage Bar;\n$VERSION = \"v1.3.5\"; # works with all Perl's (since it is quoted)\n\npackage main;\nuse version;\n\nprint $Foo::VERSION; # prints 1.2\n\nprint $Bar::VERSION; # prints 1.003005\n\neval \"use foo 10\";\nprint $@; # prints \"foo version 10 required...\"\neval \"use foo 1.3.5; # work in Perl 5.6.1 or better\nprint $@; # prints \"foo version 1.3.5 required...\"\n\neval \"use bar 1.3.6\";\nprint $@; # prints \"bar version 1.3.6 required...\"\neval \"use bar 1.004\"; # note Decimal version\nprint $@; # prints \"bar version 1.004 required...\"\n\nIMPORTANT NOTE: This may mean that code which searches for a specific string (to determine\nwhether a given module is available) may need to be changed. It is always better to use the\nbuilt-in comparison implicit in \"use\" or \"require\", rather than manually poking at\n\"class->VERSION\" and then doing a comparison yourself.\n\nThe replacement UNIVERSAL::VERSION, when used as a function, like this:\n\nprint $module->VERSION;\n\nwill also exclusively return the stringified form. See \"Stringification\" for more details.\n"
                    }
                ]
            },
            "USAGE DETAILS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Using modules that use version.pm",
                        "content": "As much as possible, the version.pm module remains compatible with all current code. However, if\nyour module is using a module that has defined $VERSION using the version class, there are a\ncouple of things to be aware of. For purposes of discussion, we will assume that we have the\nfollowing module installed:\n\npackage Example;\nuse version;  $VERSION = qv('1.2.2');\n...module code here...\n1;\n\nDecimal versions always work\nCode of the form:\n\nuse Example 1.002003;\n\nwill always work correctly. The \"use\" will perform an automatic $VERSION comparison using\nthe floating point number given as the first term after the module name (e.g. above\n1.002.003). In this case, the installed module is too old for the requested line, so you\nwould see an error like:\n\nExample version 1.002003 (v1.2.3) required--this is only version 1.002002 (v1.2.2)...\n\nDotted-Decimal version work sometimes\nWith Perl >= 5.6.2, you can also use a line like this:\n\nuse Example 1.2.3;\n\nand it will again work (i.e. give the error message as above), even with releases of Perl\nwhich do not normally support v-strings (see \"What about v-strings?\" above). This has to do\nwith that fact that \"use\" only checks to see if the second term *looks like a number* and\npasses that to the replacement UNIVERSAL::VERSION. This is not true in Perl 5.00504,\nhowever, so you are strongly encouraged to always use a Decimal version in your code, even\nfor those versions of Perl which support the Dotted-Decimal version.\n"
                    },
                    {
                        "name": "Object Methods",
                        "content": ""
                    },
                    {
                        "name": "new",
                        "content": "Like many OO interfaces, the new() method is used to initialize version objects. If two\narguments are passed to \"new()\", the second one will be used as if it were prefixed with\n\"v\". This is to support historical use of the \"qw\" operator with the CVS variable $Revision,\nwhich is automatically incremented by CVS every time the file is committed to the\nrepository.\n\nIn order to facilitate this feature, the following code can be employed:\n\n$VERSION = version->new(qw$Revision: 2.7 $);\n\nand the version object will be created as if the following code were used:\n\n$VERSION = version->new(\"v2.7\");\n\nIn other words, the version will be automatically parsed out of the string, and it will be\nquoted to preserve the meaning CVS normally carries for versions. The CVS $Revision$\nincrements differently from Decimal versions (i.e. 1.10 follows 1.9), so it must be handled\nas if it were a Dotted-Decimal Version.\n\nA new version object can be created as a copy of an existing version object, either as a\nclass method:\n\n$v1 = version->new(12.3);\n$v2 = version->new($v1);\n\nor as an object method:\n\n$v1 = version->new(12.3);\n$v2 = $v1->new(12.3);\n\nand in each case, $v1 and $v2 will be identical. NOTE: if you create a new object using an\nexisting object like this:\n\n$v2 = $v1->new();\n\nthe new object will not be a clone of the existing object. In the example case, $v2 will be\nan empty object of the same type as $v1.\n"
                    },
                    {
                        "name": "qv",
                        "content": "An alternate way to create a new version object is through the exported qv() sub. This is\nnot strictly like other q? operators (like qq, qw), in that the only delimiters supported\nare parentheses (or spaces). It is the best way to initialize a short version without\ntriggering the floating point interpretation. For example:\n\n$v1 = qv(1.2);         # v1.2.0\n$v2 = qv(\"1.2\");       # also v1.2.0\n\nAs you can see, either a bare number or a quoted string can usually be used interchangeably,\nexcept in the case of a trailing zero, which must be quoted to be converted properly. For\nthis reason, it is strongly recommended that all initializers to qv() be quoted strings\ninstead of bare numbers.\n\nTo prevent the \"qv()\" function from being exported to the caller's namespace, either use\nversion with a null parameter:\n\nuse version ();\n\nor just require version, like this:\n\nrequire version;\n\nBoth methods will prevent the import() method from firing and exporting the \"qv()\" sub.\n\nFor the subsequent examples, the following three objects will be used:\n\n$ver   = version->new(\"1.2.3.4\"); # see \"Quoting Rules\"\n$alpha = version->new(\"1.2.34\"); # see \"Alpha Versions\"\n$nver  = version->new(1.002);     # see \"Decimal Versions\"\n\nNormal Form\nFor any version object which is initialized with multiple decimal places (either quoted or\nif possible v-string), or initialized using the qv() operator, the stringified\nrepresentation is returned in a normalized or reduced form (no extraneous zeros), and with a\nleading 'v':\n\nprint $ver->normal;         # prints as v1.2.3.4\nprint $ver->stringify;      # ditto\nprint $ver;                 # ditto\nprint $nver->normal;        # prints as v1.2.0\nprint $nver->stringify;     # prints as 1.002,\n# see \"Stringification\"\n\nIn order to preserve the meaning of the processed version, the normalized representation\nwill always contain at least three sub terms. In other words, the following is guaranteed to\nalways be true:\n\nmy $newver = version->new($ver->stringify);\nif ($newver eq $ver ) # always true\n{...}\n\nNumification\nAlthough all mathematical operations on version objects are forbidden by default, it is\npossible to retrieve a number which corresponds to the version object through the use of the\n$obj->numify method. For formatting purposes, when displaying a number which corresponds a\nversion object, all sub versions are assumed to have three decimal places. So for example:\n\nprint $ver->numify;         # prints 1.002003004\nprint $nver->numify;        # prints 1.002\n\nUnlike the stringification operator, there is never any need to append trailing zeros to\npreserve the correct version value.\n\nStringification\nThe default stringification for version objects returns exactly the same string as was used\nto create it, whether you used \"new()\" or \"qv()\", with one exception. The sole exception is\nif the object was created using \"qv()\" and the initializer did not have two decimal places\nor a leading 'v' (both optional), then the stringified form will have a leading 'v'\nprepended, in order to support round-trip processing.\n\nFor example:\n\nInitialized as          Stringifies to\n==============          ==============\nversion->new(\"1.2\")       1.2\nversion->new(\"v1.2\")     v1.2\nqv(\"1.2.3\")               1.2.3\nqv(\"v1.3.5\")             v1.3.5\nqv(\"1.2\")                v1.2   ### exceptional case\n\nSee also UNIVERSAL::VERSION, as this also returns the stringified form when used as a class\nmethod.\n\nIMPORTANT NOTE: There is one exceptional cases shown in the above table where the\n\"initializer\" is not stringwise equivalent to the stringified representation. If you use the\n\"qv\"() operator on a version without a leading 'v' and with only a single decimal place, the\nstringified output will have a leading 'v', to preserve the sense. See the \"qv()\" operator\nfor more details.\n\nIMPORTANT NOTE 2: Attempting to bypass the normal stringification rules by manually applying\nnumify() and normal() will sometimes yield surprising results:\n\nprint version->new(version->new(\"v1.0\")->numify)->normal; # v1.0.0\n\nThe reason for this is that the numify() operator will turn \"v1.0\" into the equivalent\nstring \"1.000000\". Forcing the outer version object to normal() form will display the\nmathematically equivalent \"v1.0.0\".\n\nAs the example in \"new()\" shows, you can always create a copy of an existing version object\nwith the same value by the very compact:\n\n$v2 = $v1->new($v1);\n\nand be assured that both $v1 and $v2 will be completely equivalent, down to the same\ninternal representation as well as stringification.\n\nComparison operators\nBoth \"cmp\" and \"<=>\" operators perform the same comparison between terms (upgrading to a\nversion object automatically). Perl automatically generates all of the other comparison\noperators based on those two. In addition to the obvious equalities listed below, appending\na single trailing 0 term does not change the value of a version for comparison purposes. In\nother words \"v1.2\" and \"1.2.0\" will compare as identical.\n\nFor example, the following relations hold:\n\nAs Number        As String           Truth Value\n-------------    ----------------    -----------\n$ver >  1.0      $ver gt \"1.0\"       true\n$ver <  2.5      $ver lt             true\n$ver != 1.3      $ver ne \"1.3\"       true\n$ver == 1.2      $ver eq \"1.2\"       false\n$ver == 1.2.3.4  $ver eq \"1.2.3.4\"   see discussion below\n\nIt is probably best to chose either the Decimal notation or the string notation and stick\nwith it, to reduce confusion. Perl6 version objects may only support Decimal comparisons.\nSee also \"Quoting Rules\".\n\nWARNING: Comparing version with unequal numbers of decimal points (whether explicitly or\nimplicitly initialized), may yield unexpected results at first glance. For example, the\nfollowing inequalities hold:\n\nversion->new(0.96)     > version->new(0.95); # 0.960.0 > 0.950.0\nversion->new(\"0.96.1\") < version->new(0.95); # 0.096.1 < 0.950.0\n\nFor this reason, it is best to use either exclusively \"Decimal Versions\" or \"Dotted-Decimal\nVersions\" with multiple decimal points.\n\nLogical Operators\nIf you need to test whether a version object has been initialized, you can simply test it\ndirectly:\n\n$vobj = version->new($something);\nif ( $vobj )   # true only if $something was non-blank\n\nYou can also test whether a version object is an alpha version, for example to prevent the\nuse of some feature not present in the main release:\n\n$vobj = version->new(\"1.23\"); # MUST QUOTE\n...later...\nif ( $vobj->isalpha )       # True\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "John Peacock <jpeacock@cpan.org>\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "perl.\n",
                "subsections": []
            }
        }
    }
}