{
    "mode": "info",
    "parameter": "Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Moose%3A%3ACookbook%3A%3ABasics%3A%3ADateTime_ExtendingNonMooseParent/json",
    "generated": "2026-07-05T13:18:36Z",
    "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": {
        "Moose::Cookbook:Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent(3pm)": {
            "content": "",
            "subsections": []
        },
        "NAME": {
            "content": "Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent - Extending a\nnon-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\nnot Moose based. This recipe only works if the parent class uses a\nblessed hash reference for object instances. If your parent is doing\nsomething funkier, you should check out MooseX::NonMoose::InsideOut and\nMooseX::InsideOut.\n\nThe meat of this recipe is contained in MooseX::NonMoose, which does\nall the grunt work for you.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "o   Stevan Little <stevan@cpan.org>\n\no   Dave Rolsky <autarch@urth.org>\n\no   Jesse Luehrs <doy@cpan.org>\n\no   Shawn M Moore <sartak@cpan.org>\n\no    ' (Yuval Kogman) <nothingmuch@woobling.org>\n\no   Karen Etheridge <ether@cpan.org>\n\no   Florian Ragwitz <rafl@debian.org>\n\no   Hans Dieter Pearcey <hdp@cpan.org>\n\no   Chris Prather <chris@prather.org>\n\no   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\nthe same terms as the Perl 5 programming language system itself.\n\nperl v5.34.0    Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent(3pm)",
            "subsections": []
        }
    },
    "summary": "Moose::Cookbook::Basics::DateTimeExtendingNonMooseParent - Extending a non-Moose parent class",
    "flags": [],
    "examples": [],
    "see_also": []
}