{
    "content": [
        {
            "type": "text",
            "text": "# Package::DeprecationManager (perldoc)\n\n## NAME\n\nPackage::DeprecationManager - Manage deprecation warnings for your distribution\n\n## SYNOPSIS\n\npackage My::Class;\nuse Package::DeprecationManager -deprecations => {\n'My::Class::foo' => '0.02',\n'My::Class::bar' => '0.05',\n'feature-X'      => '0.07',\n};\nsub foo {\ndeprecated( 'Do not call foo!' );\n...\n}\nsub bar {\ndeprecated();\n...\n}\nsub baz {\nmy %args = @;\nif ( $args{foo} ) {\ndeprecated(\nmessage => ...,\nfeature => 'feature-X',\n);\n}\n}\npackage Other::Class;\nuse My::Class -apiversion => '0.04';\nMy::Class->new()->foo(); # warns\nMy::Class->new()->bar(); # does not warn\nMy::Class->new()->bar(); # does not warn again\n\n## DESCRIPTION\n\nThis module allows you to manage a set of deprecations for one or more modules.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DONATIONS**\n- **CREDITS**\n- **BUGS**\n- **AUTHOR**\n- **CONTRIBUTORS**\n- **COPYRIGHT AND LICENCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Package::DeprecationManager",
        "section": "",
        "mode": "perldoc",
        "summary": "Package::DeprecationManager - Manage deprecation warnings for your distribution",
        "synopsis": "package My::Class;\nuse Package::DeprecationManager -deprecations => {\n'My::Class::foo' => '0.02',\n'My::Class::bar' => '0.05',\n'feature-X'      => '0.07',\n};\nsub foo {\ndeprecated( 'Do not call foo!' );\n...\n}\nsub bar {\ndeprecated();\n...\n}\nsub baz {\nmy %args = @;\nif ( $args{foo} ) {\ndeprecated(\nmessage => ...,\nfeature => 'feature-X',\n);\n}\n}\npackage Other::Class;\nuse My::Class -apiversion => '0.04';\nMy::Class->new()->foo(); # warns\nMy::Class->new()->bar(); # does not warn\nMy::Class->new()->bar(); # does not warn again",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 58,
                "subsections": []
            },
            {
                "name": "DONATIONS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "CREDITS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CONTRIBUTORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Package::DeprecationManager - Manage deprecation warnings for your distribution\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 0.17\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "package My::Class;\n\nuse Package::DeprecationManager -deprecations => {\n'My::Class::foo' => '0.02',\n'My::Class::bar' => '0.05',\n'feature-X'      => '0.07',\n};\n\nsub foo {\ndeprecated( 'Do not call foo!' );\n\n...\n}\n\nsub bar {\ndeprecated();\n\n...\n}\n\nsub baz {\nmy %args = @;\n\nif ( $args{foo} ) {\ndeprecated(\nmessage => ...,\nfeature => 'feature-X',\n);\n}\n}\n\npackage Other::Class;\n\nuse My::Class -apiversion => '0.04';\n\nMy::Class->new()->foo(); # warns\nMy::Class->new()->bar(); # does not warn\nMy::Class->new()->bar(); # does not warn again\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module allows you to manage a set of deprecations for one or more modules.\n\nWhen you import \"Package::DeprecationManager\", you must provide a set of \"-deprecations\" as a\nhash ref. The keys are \"feature\" names, and the values are the version when that feature was\ndeprecated.\n\nIn many cases, you can simply use the fully qualified name of a subroutine or method as the\nfeature name. This works for cases where the whole subroutine is deprecated. However, the\nfeature names can be any string. This is useful if you don't want to deprecate an entire\nsubroutine, just a certain usage.\n\nYou can also provide an optional array reference in the \"-ignore\" parameter.\n\nThe values to be ignored can be package names or regular expressions (made with \"qr//\"). Use\nthis to ignore packages in your distribution that can appear on the call stack when a deprecated\nfeature is used.\n\nAs part of the import process, \"Package::DeprecationManager\" will export two subroutines into\nits caller. It provides an \"import()\" sub for the caller and a \"deprecated()\" sub.\n\nThe \"import()\" sub allows callers of *your* class to specify an \"-apiversion\" parameter. If\nthis is supplied, then deprecation warnings are only issued for deprecations with API versions\nearlier than the one specified.\n\nYou must call the \"deprecated()\" sub in each deprecated subroutine. When called, it will issue a\nwarning using \"Carp::cluck()\".\n\nThe \"deprecated()\" sub can be called in several ways. If you do not pass any arguments, it will\ngenerate an appropriate warning message. If you pass a single argument, this is used as the\nwarning message.\n\nFinally, you can call it with named arguments. Currently, the only allowed names are \"message\"\nand \"feature\". The \"feature\" argument should correspond to the feature name passed in the\n\"-deprecations\" hash.\n\nIf you don't explicitly specify a feature, the \"deprecated()\" sub uses \"caller()\" to identify\nits caller, using its fully qualified subroutine name.\n\nA given deprecation warning is only issued once for a given package. This module tracks this\nbased on both the feature name *and* the error message itself. This means that if you provide\nseveral different error messages for the same feature, all of those errors will appear.\n\nOther import() subs\nThis module works by installing an \"import\" sub in any package that uses it. If that package\n*already* has an \"import\" sub, then that \"import\" will be called after any arguments passed for\n\"Package::DeprecationManager\" are stripped out. You need to define your \"import\" sub before you\n\"use Package::DeprecationManager\" to make this work:\n\npackage HasExporter;\n\nuse Exporter qw( import );\n\nuse Package::DeprecationManager -deprecations => {\n'HasExporter::foo' => '0.02',\n};\n\nour @EXPORTOK = qw( somesub anothersub );\n",
                "subsections": []
            },
            "DONATIONS": {
                "content": "If you'd like to thank me for the work I've done on this module, please consider making a\n\"donation\" to me via PayPal. I spend a lot of free time creating free software, and would\nappreciate any support you'd care to offer.\n\nPlease note that I am not suggesting that you must do this in order for me to continue working\non this particular software. I will continue to do so, inasmuch as I have in the past, for as\nlong as it interests me.\n\nSimilarly, a donation made in this way will probably not make me work on this software much\nmore, unless I get so many donations that I can consider working on free software full time\n(let's all have a chuckle at that together).\n\nTo donate, log into PayPal and send money to autarch@urth.org, or use the button at\n<http://www.urth.org/~autarch/fs-donation.html>.\n",
                "subsections": []
            },
            "CREDITS": {
                "content": "The idea for this functionality and some of its implementation was originally created as\nClass::MOP::Deprecated by Goro Fuji.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Please report any bugs or feature requests to \"bug-package-deprecationmanager@rt.cpan.org\", or\nthrough the web interface at <http://rt.cpan.org>. I will be notified, and then you'll\nautomatically be notified of progress on your bug as I make changes.\n\nBugs may be submitted through the RT bug tracker\n<http://rt.cpan.org/Public/Dist/Display.html?Name=Package-DeprecationManager> (or\nbug-package-deprecationmanager@rt.cpan.org <mailto:bug-package-deprecationmanager@rt.cpan.org>).\n\nI am also usually active on IRC as 'drolsky' on \"irc://irc.perl.org\".\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Dave Rolsky <autarch@urth.org>\n",
                "subsections": []
            },
            "CONTRIBUTORS": {
                "content": "*   Jesse Luehrs <doy@tozt.net>\n\n*   Karen Etheridge <ether@cpan.org>\n\n*   Tomas Doran <bobtfish@bobtfish.net>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENCE": {
                "content": "This software is Copyright (c) 2016 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n",
                "subsections": []
            }
        }
    }
}