{
    "content": [
        {
            "type": "text",
            "text": "# base (man)\n\n## NAME\n\nbase - Establish an ISA relationship with base classes at compile time\n\n## SYNOPSIS\n\npackage Baz;\nuse base qw(Foo Bar);\n\n## DESCRIPTION\n\nUnless you are using the \"fields\" pragma, consider this module discouraged in favor of the\nlighter-weight \"parent\".\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DIAGNOSTICS**\n- **HISTORY**\n- **CAVEATS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "base",
        "section": "",
        "mode": "man",
        "summary": "base - Establish an ISA relationship with base classes at compile time",
        "synopsis": "package Baz;\nuse base qw(Foo Bar);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 34,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "base - Establish an ISA relationship with base classes at compile time\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "package Baz;\nuse base qw(Foo Bar);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Unless you are using the \"fields\" pragma, consider this module discouraged in favor of the\nlighter-weight \"parent\".\n\nAllows you to both load one or more modules, while setting up inheritance from those modules\nat the same time.  Roughly similar in effect to\n\npackage Baz;\nBEGIN {\nrequire Foo;\nrequire Bar;\npush @ISA, qw(Foo Bar);\n}\n\nWhen \"base\" tries to \"require\" a module, it will not die if it cannot find the module's file,\nbut will die on any other error.  After all this, should your base class be empty, containing\nno symbols, \"base\" will die. This is useful for inheriting from classes in the same file as\nyourself but where the filename does not match the base module name, like so:\n\n# in Bar.pm\npackage Foo;\nsub exclaim { \"I can have such a thing?!\" }\n\npackage Bar;\nuse base \"Foo\";\n\nThere is no Foo.pm, but because \"Foo\" defines a symbol (the \"exclaim\" subroutine), \"base\"\nwill not die when the \"require\" fails to load Foo.pm.\n\n\"base\" will also initialize the fields if one of the base classes has it.  Multiple\ninheritance of fields is NOT supported, if two or more base classes each have inheritable\nfields the 'base' pragma will croak. See fields for a description of this feature.\n\nThe base class' \"import\" method is not called.\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "Base class package \"%s\" is empty.\nbase.pm was unable to require the base package, because it was not found in your path.\n\nClass 'Foo' tried to inherit from itself\nAttempting to inherit from yourself generates a warning.\n\npackage Foo;\nuse base 'Foo';\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "This module was introduced with Perl 5.00404.\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "Due to the limitations of the implementation, you must use base before you declare any of\nyour own fields.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "fields\n\n\n\nperl v5.34.0                                 2025-07-25                                  base(3perl)",
                "subsections": []
            }
        }
    }
}