{
    "content": [
        {
            "type": "text",
            "text": "# warnings (man)\n\n## NAME\n\nwarnings - Perl pragma to control optional warnings\n\n## SYNOPSIS\n\nuse warnings;\nno warnings;\nuse warnings \"all\";\nno warnings \"uninitialized\";\n# or equivalent to those last two ...\nuse warnings qw(all -uninitialized);\nuse warnings::register;\nif (warnings::enabled()) {\nwarnings::warn(\"some warning\");\n}\nif (warnings::enabled(\"void\")) {\nwarnings::warn(\"void\", \"some warning\");\n}\nif (warnings::enabled($object)) {\nwarnings::warn($object, \"some warning\");\n}\nwarnings::warnif(\"some warning\");\nwarnings::warnif(\"void\", \"some warning\");\nwarnings::warnif($object, \"some warning\");\n\n## DESCRIPTION\n\nThe \"warnings\" pragma gives control over which warnings are enabled in which parts of a Perl\nprogram.  It's a more flexible alternative for both the command line flag -w and the\nequivalent Perl variable, $^W.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (11 subsections)\n- **FUNCTIONS** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "warnings",
        "section": "",
        "mode": "man",
        "summary": "warnings - Perl pragma to control optional warnings",
        "synopsis": "use warnings;\nno warnings;\nuse warnings \"all\";\nno warnings \"uninitialized\";\n# or equivalent to those last two ...\nuse warnings qw(all -uninitialized);\nuse warnings::register;\nif (warnings::enabled()) {\nwarnings::warn(\"some warning\");\n}\nif (warnings::enabled(\"void\")) {\nwarnings::warn(\"void\", \"some warning\");\n}\nif (warnings::enabled($object)) {\nwarnings::warn($object, \"some warning\");\n}\nwarnings::warnif(\"some warning\");\nwarnings::warnif(\"void\", \"some warning\");\nwarnings::warnif($object, \"some warning\");",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": "code, or any of the modules that you use, this flag will enable warnings everywhere. See \"Backward Compatibility\" for details of how this flag interacts with lexical warnings."
            },
            {
                "flag": "-W",
                "long": null,
                "arg": null,
                "description": "program regardless of whether warnings were disabled locally using \"no warnings\" or \"$^W =0\". This includes all files that get included via \"use\", \"require\" or \"do\". Think of it as the Perl equivalent of the \"lint\" command."
            },
            {
                "flag": "-W",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 36,
                "subsections": [
                    {
                        "name": "Default Warnings and Optional Warnings",
                        "lines": 22
                    },
                    {
                        "name": "\"Negative warnings\"",
                        "lines": 31
                    },
                    {
                        "name": "What's wrong with -w and $^W",
                        "lines": 53
                    },
                    {
                        "name": "Controlling Warnings from the Command Line",
                        "lines": 3
                    },
                    {
                        "name": "-w",
                        "lines": 4,
                        "flag": "-w"
                    },
                    {
                        "name": "-W -W",
                        "lines": 4,
                        "flag": "-W"
                    },
                    {
                        "name": "-X -W",
                        "lines": 1,
                        "flag": "-W"
                    },
                    {
                        "name": "Backward Compatibility",
                        "lines": 28
                    },
                    {
                        "name": "Category Hierarchy",
                        "lines": 177
                    },
                    {
                        "name": "Fatal Warnings",
                        "lines": 92
                    },
                    {
                        "name": "Reporting Warnings from a Module",
                        "lines": 146
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 6,
                "subsections": [
                    {
                        "name": "warnings::enabled()",
                        "lines": 94
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "warnings - Perl pragma to control optional warnings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use warnings;\nno warnings;\n\nuse warnings \"all\";\nno warnings \"uninitialized\";\n\n# or equivalent to those last two ...\nuse warnings qw(all -uninitialized);\n\nuse warnings::register;\nif (warnings::enabled()) {\nwarnings::warn(\"some warning\");\n}\n\nif (warnings::enabled(\"void\")) {\nwarnings::warn(\"void\", \"some warning\");\n}\n\nif (warnings::enabled($object)) {\nwarnings::warn($object, \"some warning\");\n}\n\nwarnings::warnif(\"some warning\");\nwarnings::warnif(\"void\", \"some warning\");\nwarnings::warnif($object, \"some warning\");\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"warnings\" pragma gives control over which warnings are enabled in which parts of a Perl\nprogram.  It's a more flexible alternative for both the command line flag -w and the\nequivalent Perl variable, $^W.\n\nThis pragma works just like the \"strict\" pragma.  This means that the scope of the warning\npragma is limited to the enclosing block.  It also means that the pragma setting will not\nleak across files (via \"use\", \"require\" or \"do\").  This allows authors to independently\ndefine the degree of warning checks that will be applied to their module.\n\nBy default, optional warnings are disabled, so any legacy code that doesn't attempt to\ncontrol the warnings will work unchanged.\n\nAll warnings are enabled in a block by either of these:\n\nuse warnings;\nuse warnings 'all';\n\nSimilarly all warnings are disabled in a block by either of these:\n\nno warnings;\nno warnings 'all';\n\nFor example, consider the code below:\n\nuse warnings;\nmy @x;\n{\nno warnings;\nmy $y = @x[0];\n}\nmy $z = @x[0];\n\nThe code in the enclosing block has warnings enabled, but the inner block has them disabled.\nIn this case that means the assignment to the scalar $z will trip the \"Scalar value @x[0]\nbetter written as $x[0]\" warning, but the assignment to the scalar $y will not.\n",
                "subsections": [
                    {
                        "name": "Default Warnings and Optional Warnings",
                        "content": "Before the introduction of lexical warnings, Perl had two classes of warnings: mandatory and\noptional.\n\nAs its name suggests, if your code tripped a mandatory warning, you would get a warning\nwhether you wanted it or not.  For example, the code below would always produce an \"isn't\nnumeric\" warning about the \"2:\".\n\nmy $x = \"2:\" + 3;\n\nWith the introduction of lexical warnings, mandatory warnings now become default warnings.\nThe difference is that although the previously mandatory warnings are still enabled by\ndefault, they can then be subsequently enabled or disabled with the lexical warning pragma.\nFor example, in the code below, an \"isn't numeric\" warning will only be reported for the $x\nvariable.\n\nmy $x = \"2:\" + 3;\nno warnings;\nmy $y = \"2:\" + 3;\n\nNote that neither the -w flag or the $^W can be used to disable/enable default warnings.\nThey are still mandatory in this case.\n"
                    },
                    {
                        "name": "\"Negative warnings\"",
                        "content": "As a convenience, you can (as of Perl 5.34) pass arguments to the \"import()\" method both\npositively and negatively. Negative warnings are those with a \"-\" sign prepended to their\nnames; positive warnings are anything else. This lets you turn on some warnings and turn off\nothers in one command. So, assuming that you've already turned on a bunch of warnings but\nwant to tweak them a bit in some block, you can do this:\n\n{\nuse warnings qw(uninitialized -redefine);\n...\n}\n\nwhich is equivalent to:\n\n{\nuse warnings qw(uninitialized);\nno warnings qw(redefine);\n...\n}\n\nThe argument list is processed in the order you specify. So, for example, if you don't want\nto be warned about use of experimental features, except for \"somefeature\" that you really\ndislike, you can say this:\n\nuse warnings qw(all -experimental experimental::somefeature);\n\nwhich is equivalent to:\n\nuse warnings 'all';\nno warnings  'experimental';\nuse warnings 'experimental::somefeature';\n"
                    },
                    {
                        "name": "What's wrong with -w and $^W",
                        "content": "Although very useful, the big problem with using -w on the command line to enable warnings is\nthat it is all or nothing.  Take the typical scenario when you are writing a Perl program.\nParts of the code you will write yourself, but it's very likely that you will make use of\npre-written Perl modules.  If you use the -w flag in this case, you end up enabling warnings\nin pieces of code that you haven't written.\n\nSimilarly, using $^W to either disable or enable blocks of code is fundamentally flawed.  For\na start, say you want to disable warnings in a block of code.  You might expect this to be\nenough to do the trick:\n\n{\nlocal ($^W) = 0;\nmy $x =+ 2;\nmy $y; chop $y;\n}\n\nWhen this code is run with the -w flag, a warning will be produced for the $x line:\n\"Reversed += operator\".\n\nThe problem is that Perl has both compile-time and run-time warnings.  To disable compile-\ntime warnings you need to rewrite the code like this:\n\n{\nBEGIN { $^W = 0 }\nmy $x =+ 2;\nmy $y; chop $y;\n}\n\nAnd note that unlike the first example, this will permanently set $^W since it cannot both\nrun during compile-time and be localized to a run-time block.\n\nThe other big problem with $^W is the way you can inadvertently change the warning setting in\nunexpected places in your code.  For example, when the code below is run (without the -w\nflag), the second call to \"doit\" will trip a \"Use of uninitialized value\" warning, whereas\nthe first will not.\n\nsub doit\n{\nmy $y; chop $y;\n}\n\ndoit();\n\n{\nlocal ($^W) = 1;\ndoit()\n}\n\nThis is a side-effect of $^W being dynamically scoped.\n\nLexical warnings get around these limitations by allowing finer control over where warnings\ncan or can't be tripped.\n"
                    },
                    {
                        "name": "Controlling Warnings from the Command Line",
                        "content": "There are three Command Line flags that can be used to control when warnings are (or aren't)\nproduced:\n"
                    },
                    {
                        "name": "-w",
                        "content": "code, or any of the modules that you use, this flag will enable warnings everywhere.\nSee \"Backward Compatibility\" for details of how this flag interacts with lexical\nwarnings.\n",
                        "flag": "-w"
                    },
                    {
                        "name": "-W -W",
                        "content": "program regardless of whether warnings were disabled locally using \"no warnings\" or \"$^W\n=0\".  This includes all files that get included via \"use\", \"require\" or \"do\".  Think of\nit as the Perl equivalent of the \"lint\" command.\n",
                        "flag": "-W"
                    },
                    {
                        "name": "-X -W",
                        "content": "",
                        "flag": "-W"
                    },
                    {
                        "name": "Backward Compatibility",
                        "content": "If you are used to working with a version of Perl prior to the introduction of lexically\nscoped warnings, or have code that uses both lexical warnings and $^W, this section will\ndescribe how they interact.\n\nHow Lexical Warnings interact with -w/$^W:\n\n1.   If none of the three command line flags (-w, -W or -X) that control warnings is used and\nneither $^W nor the \"warnings\" pragma are used, then default warnings will be enabled\nand optional warnings disabled.  This means that legacy code that doesn't attempt to\ncontrol the warnings will work unchanged.\n\n2.   The -w flag just sets the global $^W variable as in 5.005.  This means that any legacy\ncode that currently relies on manipulating $^W to control warning behavior will still\nwork as is.\n\n3.   Apart from now being a boolean, the $^W variable operates in exactly the same horrible\nuncontrolled global way, except that it cannot disable/enable default warnings.\n\n4.   If a piece of code is under the control of the \"warnings\" pragma, both the $^W variable\nand the -w flag will be ignored for the scope of the lexical warning.\n\n5.   The only way to override a lexical warnings setting is with the -W or -X command line\nflags.\n\nThe combined effect of 3 & 4 is that it will allow code which uses the \"warnings\" pragma to\ncontrol the warning behavior of $^W-type code (using a \"local $^W=0\") if it really wants to,\nbut not vice-versa.\n"
                    },
                    {
                        "name": "Category Hierarchy",
                        "content": "A hierarchy of \"categories\" have been defined to allow groups of warnings to be\nenabled/disabled in isolation.\n\nThe current hierarchy is:\n\nall -+\n|\n+- closure\n|\n+- deprecated\n|\n+- exiting\n|\n+- experimental --+\n|                 |\n|                 +- experimental::alphaassertions\n|                 |\n|                 +- experimental::bitwise\n|                 |\n|                 +- experimental::constattr\n|                 |\n|                 +- experimental::declaredrefs\n|                 |\n|                 +- experimental::isa\n|                 |\n|                 +- experimental::lexicalsubs\n|                 |\n|                 +- experimental::postderef\n|                 |\n|                 +- experimental::privateuse\n|                 |\n|                 +- experimental::restrict\n|                 |\n|                 +- experimental::refaliasing\n|                 |\n|                 +- experimental::regexsets\n|                 |\n|                 +- experimental::scriptrun\n|                 |\n|                 +- experimental::signatures\n|                 |\n|                 +- experimental::smartmatch\n|                 |\n|                 +- experimental::try\n|                 |\n|                 +- experimental::unipropwildcards\n|                 |\n|                 +- experimental::vlb\n|                 |\n|                 +- experimental::win32perlio\n|\n+- glob\n|\n+- imprecision\n|\n+- io ------------+\n|                 |\n|                 +- closed\n|                 |\n|                 +- exec\n|                 |\n|                 +- layer\n|                 |\n|                 +- newline\n|                 |\n|                 +- pipe\n|                 |\n|                 +- syscalls\n|                 |\n|                 +- unopened\n|\n+- locale\n|\n+- misc\n|\n+- missing\n|\n+- numeric\n|\n+- once\n|\n+- overflow\n|\n+- pack\n|\n+- portable\n|\n+- recursion\n|\n+- redefine\n|\n+- redundant\n|\n+- regexp\n|\n+- severe --------+\n|                 |\n|                 +- debugging\n|                 |\n|                 +- inplace\n|                 |\n|                 +- internal\n|                 |\n|                 +- malloc\n|\n+- shadow\n|\n+- signal\n|\n+- substr\n|\n+- syntax --------+\n|                 |\n|                 +- ambiguous\n|                 |\n|                 +- bareword\n|                 |\n|                 +- digit\n|                 |\n|                 +- illegalproto\n|                 |\n|                 +- parenthesis\n|                 |\n|                 +- precedence\n|                 |\n|                 +- printf\n|                 |\n|                 +- prototype\n|                 |\n|                 +- qw\n|                 |\n|                 +- reserved\n|                 |\n|                 +- semicolon\n|\n+- taint\n|\n+- threads\n|\n+- uninitialized\n|\n+- unpack\n|\n+- untie\n|\n+- utf8 ----------+\n|                 |\n|                 +- nonunicode\n|                 |\n|                 +- nonchar\n|                 |\n|                 +- surrogate\n|\n+- void\n\nJust like the \"strict\" pragma any of these categories can be combined\n\nuse warnings qw(void redefine);\nno warnings qw(io syntax untie);\n\nAlso like the \"strict\" pragma, if there is more than one instance of the \"warnings\" pragma in\na given scope the cumulative effect is additive.\n\nuse warnings qw(void); # only \"void\" warnings enabled\n...\nuse warnings qw(io);   # only \"void\" & \"io\" warnings enabled\n...\nno warnings qw(void);  # only \"io\" warnings enabled\n\nTo determine which category a specific warning has been assigned to see perldiag.\n\nNote: Before Perl 5.8.0, the lexical warnings category \"deprecated\" was a sub-category of the\n\"syntax\" category.  It is now a top-level category in its own right.\n\nNote: Before 5.21.0, the \"missing\" lexical warnings category was internally defined to be the\nsame as the \"uninitialized\" category. It is now a top-level category in its own right.\n"
                    },
                    {
                        "name": "Fatal Warnings",
                        "content": "The presence of the word \"FATAL\" in the category list will escalate warnings in those\ncategories into fatal errors in that lexical scope.\n\nNOTE: FATAL warnings should be used with care, particularly \"FATAL => 'all'\".\n\nLibraries using warnings::warn for custom warning categories generally don't expect\nwarnings::warn to be fatal and can wind up in an unexpected state as a result.  For XS\nmodules issuing categorized warnings, such unanticipated exceptions could also expose memory\nleak bugs.\n\nMoreover, the Perl interpreter itself has had serious bugs involving fatalized warnings.  For\na summary of resolved and unresolved problems as of January 2015, please see this\nperl5-porters post\n<http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225235.html>.\n\nWhile some developers find fatalizing some warnings to be a useful defensive programming\ntechnique, using \"FATAL => 'all'\" to fatalize all possible warning categories -- including\ncustom ones -- is particularly risky.  Therefore, the use of \"FATAL => 'all'\" is discouraged.\n\nThe strictures module on CPAN offers one example of a warnings subset that the module's\nauthors believe is relatively safe to fatalize.\n\nNOTE: Users of FATAL warnings, especially those using \"FATAL => 'all'\", should be fully aware\nthat they are risking future portability of their programs by doing so.  Perl makes\nabsolutely no commitments to not introduce new warnings or warnings categories in the future;\nindeed, we explicitly reserve the right to do so.  Code that may not warn now may warn in a\nfuture release of Perl if the Perl5 development team deems it in the best interests of the\ncommunity to do so.  Should code using FATAL warnings break due to the introduction of a new\nwarning we will NOT consider it an incompatible change.  Users of FATAL warnings should take\nspecial caution during upgrades to check to see if their code triggers any new warnings and\nshould pay particular attention to the fine print of the documentation of the features they\nuse to ensure they do not exploit features that are documented as risky, deprecated, or\nunspecified, or where the documentation says \"so don't do that\", or anything with the same\nsense and spirit.  Use of such features in combination with FATAL warnings is ENTIRELY AT THE\nUSER'S RISK.\n\nThe following documentation describes how to use FATAL warnings but the perl5 porters\nstrongly recommend that you understand the risks before doing so, especially for library code\nintended for use by others, as there is no way for downstream users to change the choice of\nfatal categories.\n\nIn the code below, the use of \"time\", \"length\" and \"join\" can all produce a \"Useless use of\nxxx in void context\" warning.\n\nuse warnings;\n\ntime;\n\n{\nuse warnings FATAL => qw(void);\nlength \"abc\";\n}\n\njoin \"\", 1,2,3;\n\nprint \"done\\n\";\n\nWhen run it produces this output\n\nUseless use of time in void context at fatal line 3.\nUseless use of length in void context at fatal line 7.\n\nThe scope where \"length\" is used has escalated the \"void\" warnings category into a fatal\nerror, so the program terminates immediately when it encounters the warning.\n\nTo explicitly turn off a \"FATAL\" warning you just disable the warning it is associated with.\nSo, for example, to disable the \"void\" warning in the example above, either of these will do\nthe trick:\n\nno warnings qw(void);\nno warnings FATAL => qw(void);\n\nIf you want to downgrade a warning that has been escalated into a fatal error back to a\nnormal warning, you can use the \"NONFATAL\" keyword.  For example, the code below will promote\nall warnings into fatal errors, except for those in the \"syntax\" category.\n\nuse warnings FATAL => 'all', NONFATAL => 'syntax';\n\nAs of Perl 5.20, instead of \"use warnings FATAL => 'all';\" you can use:\n\nuse v5.20;       # Perl 5.20 or greater is required for the following\nuse warnings 'FATAL';  # short form of \"use warnings FATAL => 'all';\"\n\nHowever, you should still heed the guidance earlier in this section against using \"use\nwarnings FATAL =\" 'all';>.\n\nIf you want your program to be compatible with versions of Perl before 5.20, you must use\n\"use warnings FATAL => 'all';\" instead.  (In previous versions of Perl, the behavior of the\nstatements \"use warnings 'FATAL';\", \"use warnings 'NONFATAL';\" and \"no warnings 'FATAL';\" was\nunspecified; they did not behave as if they included the \"=> 'all'\" portion.  As of 5.20,\nthey do.)\n"
                    },
                    {
                        "name": "Reporting Warnings from a Module",
                        "content": "The \"warnings\" pragma provides a number of functions that are useful for module authors.\nThese are used when you want to report a module-specific warning to a calling module has\nenabled warnings via the \"warnings\" pragma.\n\nConsider the module \"MyMod::Abc\" below.\n\npackage MyMod::Abc;\n\nuse warnings::register;\n\nsub open {\nmy $path = shift;\nif ($path !~ m#^/#) {\nwarnings::warn(\"changing relative path to /var/abc\")\nif warnings::enabled();\n$path = \"/var/abc/$path\";\n}\n}\n\n1;\n\nThe call to \"warnings::register\" will create a new warnings category called \"MyMod::Abc\",\ni.e. the new category name matches the current package name.  The \"open\" function in the\nmodule will display a warning message if it gets given a relative path as a parameter.  This\nwarnings will only be displayed if the code that uses \"MyMod::Abc\" has actually enabled them\nwith the \"warnings\" pragma like below.\n\nuse MyMod::Abc;\nuse warnings 'MyMod::Abc';\n...\nabc::open(\"../fred.txt\");\n\nIt is also possible to test whether the pre-defined warnings categories are set in the\ncalling module with the \"warnings::enabled\" function.  Consider this snippet of code:\n\npackage MyMod::Abc;\n\nsub open {\nif (warnings::enabled(\"deprecated\")) {\nwarnings::warn(\"deprecated\",\n\"open is deprecated, use new instead\");\n}\nnew(@);\n}\n\nsub new\n...\n1;\n\nThe function \"open\" has been deprecated, so code has been included to display a warning\nmessage whenever the calling module has (at least) the \"deprecated\" warnings category\nenabled.  Something like this, say.\n\nuse warnings 'deprecated';\nuse MyMod::Abc;\n...\nMyMod::Abc::open($filename);\n\nEither the \"warnings::warn\" or \"warnings::warnif\" function should be used to actually display\nthe warnings message.  This is because they can make use of the feature that allows warnings\nto be escalated into fatal errors.  So in this case\n\nuse MyMod::Abc;\nuse warnings FATAL => 'MyMod::Abc';\n...\nMyMod::Abc::open('../fred.txt');\n\nthe \"warnings::warnif\" function will detect this and die after displaying the warning\nmessage.\n\nThe three warnings functions, \"warnings::warn\", \"warnings::warnif\" and \"warnings::enabled\"\ncan optionally take an object reference in place of a category name.  In this case the\nfunctions will use the class name of the object as the warnings category.\n\nConsider this example:\n\npackage Original;\n\nno warnings;\nuse warnings::register;\n\nsub new\n{\nmy $class = shift;\nbless [], $class;\n}\n\nsub check\n{\nmy $self = shift;\nmy $value = shift;\n\nif ($value % 2 && warnings::enabled($self))\n{ warnings::warn($self, \"Odd numbers are unsafe\") }\n}\n\nsub doit\n{\nmy $self = shift;\nmy $value = shift;\n$self->check($value);\n# ...\n}\n\n1;\n\npackage Derived;\n\nuse warnings::register;\nuse Original;\nour @ISA = qw( Original );\nsub new\n{\nmy $class = shift;\nbless [], $class;\n}\n\n\n1;\n\nThe code below makes use of both modules, but it only enables warnings from \"Derived\".\n\nuse Original;\nuse Derived;\nuse warnings 'Derived';\nmy $x = Original->new();\n$x->doit(1);\nmy $y = Derived->new();\n$x->doit(1);\n\nWhen this code is run only the \"Derived\" object, $y, will generate a warning.\n\nOdd numbers are unsafe at main.pl line 7\n\nNotice also that the warning is reported at the line where the object is first used.\n\nWhen registering new categories of warning, you can supply more names to warnings::register\nlike this:\n\npackage MyModule;\nuse warnings::register qw(format precision);\n\n...\n\nwarnings::warnif('MyModule::format', '...');\n"
                    }
                ]
            },
            "FUNCTIONS": {
                "content": "Note: The functions with names ending in \"atlevel\" were added in Perl 5.28.\n\nuse warnings::register\nCreates a new warnings category with the same name as the package where the call to the\npragma is used.\n",
                "subsections": [
                    {
                        "name": "warnings::enabled()",
                        "content": "Use the warnings category with the same name as the current package.\n\nReturn TRUE if that warnings category is enabled in the calling module.  Otherwise\nreturns FALSE.\n\nwarnings::enabled($category)\nReturn TRUE if the warnings category, $category, is enabled in the calling module.\nOtherwise returns FALSE.\n\nwarnings::enabled($object)\nUse the name of the class for the object reference, $object, as the warnings category.\n\nReturn TRUE if that warnings category is enabled in the first scope where the object is\nused.  Otherwise returns FALSE.\n\nwarnings::enabledatlevel($category, $level)\nLike \"warnings::enabled\", but $level specifies the exact call frame, 0 being the\nimmediate caller.\n\nwarnings::fatalenabled()\nReturn TRUE if the warnings category with the same name as the current package has been\nset to FATAL in the calling module.  Otherwise returns FALSE.\n\nwarnings::fatalenabled($category)\nReturn TRUE if the warnings category $category has been set to FATAL in the calling\nmodule.  Otherwise returns FALSE.\n\nwarnings::fatalenabled($object)\nUse the name of the class for the object reference, $object, as the warnings category.\n\nReturn TRUE if that warnings category has been set to FATAL in the first scope where the\nobject is used.  Otherwise returns FALSE.\n\nwarnings::fatalenabledatlevel($category, $level)\nLike \"warnings::fatalenabled\", but $level specifies the exact call frame, 0 being the\nimmediate caller.\n\nwarnings::warn($message)\nPrint $message to STDERR.\n\nUse the warnings category with the same name as the current package.\n\nIf that warnings category has been set to \"FATAL\" in the calling module then die.\nOtherwise return.\n\nwarnings::warn($category, $message)\nPrint $message to STDERR.\n\nIf the warnings category, $category, has been set to \"FATAL\" in the calling module then\ndie. Otherwise return.\n\nwarnings::warn($object, $message)\nPrint $message to STDERR.\n\nUse the name of the class for the object reference, $object, as the warnings category.\n\nIf that warnings category has been set to \"FATAL\" in the scope where $object is first\nused then die. Otherwise return.\n\nwarnings::warnatlevel($category, $level, $message)\nLike \"warnings::warn\", but $level specifies the exact call frame, 0 being the immediate\ncaller.\n\nwarnings::warnif($message)\nEquivalent to:\n\nif (warnings::enabled())\n{ warnings::warn($message) }\n\nwarnings::warnif($category, $message)\nEquivalent to:\n\nif (warnings::enabled($category))\n{ warnings::warn($category, $message) }\n\nwarnings::warnif($object, $message)\nEquivalent to:\n\nif (warnings::enabled($object))\n{ warnings::warn($object, $message) }\n\nwarnings::warnifatlevel($category, $level, $message)\nLike \"warnings::warnif\", but $level specifies the exact call frame, 0 being the immediate\ncaller.\n\nwarnings::registercategories(@names)\nThis registers warning categories for the given names and is primarily for use by the\nwarnings::register pragma.\n\nSee also \"Pragmatic Modules\" in perlmodlib and perldiag.\n\n\n\nperl v5.34.0                                 2025-07-25                              warnings(3perl)"
                    }
                ]
            }
        }
    }
}