{
    "mode": "perldoc",
    "parameter": "Pod::Simple::Methody",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Pod%3A%3ASimple%3A%3AMethody/json",
    "generated": "2026-06-10T13:50:22Z",
    "synopsis": "require 5;\nuse strict;\npackage SomePodFormatter;\nuse base qw(Pod::Simple::Methody);\nsub handletext {\nmy($self, $text) = @;\n...\n}\nsub starthead1 {\nmy($self, $attrs) = @;\n...\n}\nsub endhead1 {\nmy($self) = @;\n...\n}\n...and start/end methods for whatever other events you want to catch.",
    "sections": {
        "NAME": {
            "content": "Pod::Simple::Methody -- turn Pod::Simple events into method calls\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "require 5;\nuse strict;\npackage SomePodFormatter;\nuse base qw(Pod::Simple::Methody);\n\nsub handletext {\nmy($self, $text) = @;\n...\n}\n\nsub starthead1 {\nmy($self, $attrs) = @;\n...\n}\nsub endhead1 {\nmy($self) = @;\n...\n}\n\n...and start/end methods for whatever other events you want to catch.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is of interest to people writing Pod formatters based on Pod::Simple.\n\nThis class (which is very small -- read the source) overrides Pod::Simple's\nhandleelementstart, handletext, and handleelementend methods so that parser events are\nturned into method calls. (Otherwise, this is a subclass of Pod::Simple and inherits all its\nmethods.)\n\nYou can use this class as the base class for a Pod formatter/processor.\n",
            "subsections": []
        },
        "METHOD CALLING": {
            "content": "When Pod::Simple sees a \"=head1 Hi there\", for example, it basically does this:\n\n$parser->handleelementstart( \"head1\", \\%attributes );\n$parser->handletext( \"Hi there\" );\n$parser->handleelementend( \"head1\" );\n\nBut if you subclass Pod::Simple::Methody, it will instead do this when it sees a \"=head1 Hi\nthere\":\n\n$parser->starthead1( \\%attributes ) if $parser->can('starthead1');\n$parser->handletext( \"Hi there\" )   if $parser->can('handletext');\n$parser->endhead1()                 if $parser->can('endhead1');\n\nIf Pod::Simple sends an event where the element name has a dash, period, or colon, the\ncorresponding method name will have a underscore in its place. For example, \"foo.bar:baz\"\nbecomes startfoobarbaz and endfoobarbaz.\n\nSee the source for Pod::Simple::Text for an example of using this class.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Pod::Simple, Pod::Simple::Subclassing\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Questions or discussion about POD and Pod::Simple should be sent to the pod-people@perl.org mail\nlist. Send an empty email to pod-people-subscribe@perl.org to subscribe.\n\nThis module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>.\nFeel free to fork and contribute, or to clone <git://github.com/perl-pod/pod-simple.git> and\nsend patches!\n\nPatches against Pod::Simple are welcome. Please send bug reports to\n<bug-pod-simple@rt.cpan.org>.\n",
            "subsections": []
        },
        "COPYRIGHT AND DISCLAIMERS": {
            "content": "Copyright (c) 2002 Sean M. Burke.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nThis program is distributed in the hope that it will be useful, but without any warranty;\nwithout even the implied warranty of merchantability or fitness for a particular purpose.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't bother him, he's retired.\n\nPod::Simple is maintained by:\n\n*   Allison Randal \"allison@perl.org\"\n\n*   Hans Dieter Pearcey \"hdp@cpan.org\"\n\n*   David E. Wheeler \"dwheeler@cpan.org\"\n",
            "subsections": []
        }
    },
    "summary": "Pod::Simple::Methody -- turn Pod::Simple events into method calls",
    "flags": [],
    "examples": [],
    "see_also": []
}