{
    "content": [
        {
            "type": "text",
            "text": "# MRO::Compat (perldoc)\n\n## NAME\n\nMRO::Compat - mro::* interface compatibility for Perls < 5.9.5\n\n## SYNOPSIS\n\npackage PPP;      use base qw/Exporter/;\npackage X;        use base qw/PPP/;\npackage Y;        use base qw/PPP/;\npackage Z;        use base qw/PPP/;\npackage FooClass; use base qw/X Y Z/;\npackage main;\nuse MRO::Compat;\nmy $linear = mro::getlinearisa('FooClass');\nprint join(q{, }, @$linear);\n# Prints: FooClass, X, PPP, Exporter, Y, Z\n\n## DESCRIPTION\n\nThe \"mro\" namespace provides several utilities for dealing with method resolution order and\nmethod caching in general in Perl 5.9.5 and higher.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **Functions**\n- **USING C3**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "MRO::Compat",
        "section": "",
        "mode": "perldoc",
        "summary": "MRO::Compat - mro::* interface compatibility for Perls < 5.9.5",
        "synopsis": "package PPP;      use base qw/Exporter/;\npackage X;        use base qw/PPP/;\npackage Y;        use base qw/PPP/;\npackage Z;        use base qw/PPP/;\npackage FooClass; use base qw/X Y Z/;\npackage main;\nuse MRO::Compat;\nmy $linear = mro::getlinearisa('FooClass');\nprint join(q{, }, @$linear);\n# Prints: FooClass, X, PPP, Exporter, Y, Z",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "Functions",
                "lines": 60,
                "subsections": []
            },
            {
                "name": "USING C3",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "MRO::Compat - mro::* interface compatibility for Perls < 5.9.5\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "package PPP;      use base qw/Exporter/;\npackage X;        use base qw/PPP/;\npackage Y;        use base qw/PPP/;\npackage Z;        use base qw/PPP/;\n\npackage FooClass; use base qw/X Y Z/;\n\npackage main;\nuse MRO::Compat;\nmy $linear = mro::getlinearisa('FooClass');\nprint join(q{, }, @$linear);\n\n# Prints: FooClass, X, PPP, Exporter, Y, Z\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"mro\" namespace provides several utilities for dealing with method resolution order and\nmethod caching in general in Perl 5.9.5 and higher.\n\nThis module provides those interfaces for earlier versions of Perl (back to 5.6.0 anyways).\n\nIt is a harmless no-op to use this module on 5.9.5+. That is to say, code which properly uses\nMRO::Compat will work unmodified on both older Perls and 5.9.5+.\n\nIf you're writing a piece of software that would like to use the parts of 5.9.5+'s mro::\ninterfaces that are supported here, and you want compatibility with older Perls, this is the\nmodule for you.\n\nSome parts of this code will work better and/or faster with Class::C3::XS installed (which is an\noptional prereq of Class::C3, which is in turn a prereq of this package), but it's not a\nrequirement.\n\nThis module never exports any functions. All calls must be fully qualified with the \"mro::\"\nprefix.\n\nThe interface documentation here serves only as a quick reference of what the function basically\ndoes, and what differences between MRO::Compat and 5.9.5+ one should look out for. The main docs\nin 5.9.5's mro are the real interface docs, and contain a lot of other useful information.\n",
                "subsections": []
            },
            "Functions": {
                "content": "mro::getlinearisa($classname[, $type])\nReturns an arrayref which is the linearized \"ISA\" of the given class. Uses whichever MRO is\ncurrently in effect for that class by default, or the given MRO (either \"c3\" or \"dfs\" if\nspecified as $type).\n\nThe linearized ISA of a class is a single ordered list of all of the classes that would be\nvisited in the process of resolving a method on the given class, starting with itself. It does\nnot include any duplicate entries.\n\nNote that \"UNIVERSAL\" (and any members of \"UNIVERSAL\"'s MRO) are not part of the MRO of a class,\neven though all classes implicitly inherit methods from \"UNIVERSAL\" and its parents.\n\nmro::import\nThis allows the \"use mro 'dfs'\" and \"use mro 'c3'\" syntaxes, providing you \"use MRO::Compat\"\nfirst. Please see the \"USING C3\" section for additional details.\n\nmro::setmro($classname, $type)\nSets the mro of $classname to one of the types \"dfs\" or \"c3\". Please see the \"USING C3\" section\nfor additional details.\n\nmro::getmro($classname)\nReturns the MRO of the given class (either \"c3\" or \"dfs\").\n\nIt considers any Class::C3-using class to have C3 MRO even before Class::C3::initialize() is\ncalled.\n\nmro::getisarev($classname)\nReturns an arrayref of classes who are subclasses of the given classname. In other words,\nclasses in whose @ISA hierarchy we appear, no matter how indirectly.\n\nThis is much slower on pre-5.9.5 Perls with MRO::Compat than it is on 5.9.5+, as it has to\nsearch the entire package namespace.\n\nmro::isuniversal($classname)\nReturns a boolean status indicating whether or not the given classname is either \"UNIVERSAL\"\nitself, or one of \"UNIVERSAL\"'s parents by @ISA inheritance.\n\nAny class for which this function returns true is \"universal\" in the sense that all classes\npotentially inherit methods from it.\n\nmro::invalidateallmethodcaches\nIncrements \"PLsubgeneration\", which invalidates method caching in all packages.\n\nPlease note that this is rarely necessary, unless you are dealing with a situation which is\nknown to confuse Perl's method caching.\n\nmro::methodchangedin($classname)\nInvalidates the method cache of any classes dependent on the given class. In MRO::Compat on\npre-5.9.5 Perls, this is an alias for \"mro::invalidateallmethodcaches\" above, as pre-5.9.5\nPerls have no other way to do this. It will still enforce the requirement that you pass it a\nclassname, for compatibility.\n\nPlease note that this is rarely necessary, unless you are dealing with a situation which is\nknown to confuse Perl's method caching.\n\nmro::getpkggen($classname)\nReturns an integer which is incremented every time a local method of or the @ISA of the given\npackage changes on Perl 5.9.5+. On earlier Perls with this MRO::Compat module, it will probably\nincrement a lot more often than necessary.\n",
                "subsections": []
            },
            "USING C3": {
                "content": "While this module makes the 5.9.5+ syntaxes \"use mro 'c3'\" and \"mro::setmro(\"Foo\", 'c3')\"\navailable on older Perls, it does so merely by passing off the work to Class::C3.\n\nIt does not remove the need for you to call \"Class::C3::initialize()\",\n\"Class::C3::reinitialize()\", and/or \"Class::C3::uninitialize()\" at the appropriate times as\ndocumented in the Class::C3 docs. These three functions are always provided by MRO::Compat,\neither via Class::C3 itself on older Perls, or directly as no-ops on 5.9.5+.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Class::C3\n\nmro\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Brandon L. Black, <blblack@gmail.com>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "Copyright 2007-2008 Brandon L. Black <blblack@gmail.com>\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}