{
    "mode": "perldoc",
    "parameter": "Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Moose%3A%3ACookbook%3A%3ABasics%3A%3ADateTime_ExtendingNonMooseParent/json",
    "generated": "2026-06-10T14:18:43Z",
    "synopsis": "package My::DateTime;\nuse Moose;\nuse MooseX::NonMoose;\nuse DateTime::Calendar::Mayan;\nextends qw( DateTime );\nhas 'mayandate' => (\nis        => 'ro',\nisa       => 'DateTime::Calendar::Mayan',\ninitarg  => undef,\nlazy      => 1,\nbuilder   => 'buildmayandate',\nclearer   => 'clearmayandate',\npredicate => 'hasmayandate',\n);\nafter 'set' => sub {\n$[0]->clearmayandate;\n};\nsub buildmayandate {\nDateTime::Calendar::Mayan->fromobject( object => $[0] );\n}",
    "sections": {
        "NAME": {
            "content": "Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent - Extending a non-Moose parent class\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2200\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package My::DateTime;\n\nuse Moose;\nuse MooseX::NonMoose;\nuse DateTime::Calendar::Mayan;\nextends qw( DateTime );\n\nhas 'mayandate' => (\nis        => 'ro',\nisa       => 'DateTime::Calendar::Mayan',\ninitarg  => undef,\nlazy      => 1,\nbuilder   => 'buildmayandate',\nclearer   => 'clearmayandate',\npredicate => 'hasmayandate',\n);\n\nafter 'set' => sub {\n$[0]->clearmayandate;\n};\n\nsub buildmayandate {\nDateTime::Calendar::Mayan->fromobject( object => $[0] );\n}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This recipe demonstrates how to use Moose to subclass a parent which is not Moose based. This\nrecipe only works if the parent class uses a blessed hash reference for object instances. If\nyour parent is doing something funkier, you should check out MooseX::NonMoose::InsideOut and\nMooseX::InsideOut.\n\nThe meat of this recipe is contained in MooseX::NonMoose, which does all the grunt work for you.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "*   Stevan Little <stevan@cpan.org>\n\n*   Dave Rolsky <autarch@urth.org>\n\n*   Jesse Luehrs <doy@cpan.org>\n\n*   Shawn M Moore <sartak@cpan.org>\n\n*   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>\n\n*   Karen Etheridge <ether@cpan.org>\n\n*   Florian Ragwitz <rafl@debian.org>\n\n*   Hans Dieter Pearcey <hdp@cpan.org>\n\n*   Chris Prather <chris@prather.org>\n\n*   Matt S Trout <mstrout@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2006 by Infinity Interactive, Inc.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
            "subsections": []
        }
    },
    "summary": "Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent - Extending a non-Moose parent class",
    "flags": [],
    "examples": [],
    "see_also": []
}