{
    "mode": "perldoc",
    "parameter": "Class::Virtually::Abstract",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Class%3A%3AVirtually%3A%3AAbstract/json",
    "generated": "2026-06-09T21:14:21Z",
    "synopsis": "package My::Virtual::Idaho;\nuse base qw(Class::Virtually::Abstract);\nPACKAGE->virtualmethods(qw(new foo bar this that));\npackage My::Private::Idaho;\nuse base qw(My::Virtual::Idaho);\nsub new { ... }\nsub foo { ... }\nsub bar { ... }\nsub this { ... }\n# oops, forgot to implement that()!!  Whatever will happen?!\n# Meanwhile, in another piece of code!\n# KA-BLAM!  My::Private::Idaho fails to compile because it didn't\n# fully implement My::Virtual::Idaho.\nuse My::Private::Idaho;",
    "sections": {
        "NAME": {
            "content": "Class::Virtually::Abstract - Compile-time enforcement of Class::Virtual\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package My::Virtual::Idaho;\nuse base qw(Class::Virtually::Abstract);\n\nPACKAGE->virtualmethods(qw(new foo bar this that));\n\n\npackage My::Private::Idaho;\nuse base qw(My::Virtual::Idaho);\n\nsub new { ... }\nsub foo { ... }\nsub bar { ... }\nsub this { ... }\n# oops, forgot to implement that()!!  Whatever will happen?!\n\n\n# Meanwhile, in another piece of code!\n# KA-BLAM!  My::Private::Idaho fails to compile because it didn't\n# fully implement My::Virtual::Idaho.\nuse My::Private::Idaho;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This subclass of Class::Virtual provides compile-time enforcement. That means subclasses of your\nvirtual class are required to implement all virtual methods or else it will not compile.\n\nBUGS and CAVEATS\nBecause this relies on import() it is important that your classes are used instead of required.\nThis is a problem, and I'm trying to figure a way around it.\n\nAlso, if a subclass defines its own import() routine (I've done it) Class::Virtually::Abstract's\ncompile-time checking is defeated.\n\nGot to think of a better way to do this besides import().\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Original idea and code from Ben Tilly's AbstractClass\nhttp://www.perlmonks.org/index.pl?nodeid=44300&lastnodeid=45341\n\nEmbraced and Extended by Michael G Schwern <schwern@pobox.com>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Class::Virtual\n",
            "subsections": []
        }
    },
    "summary": "Class::Virtually::Abstract - Compile-time enforcement of Class::Virtual",
    "flags": [],
    "examples": [],
    "see_also": []
}