{
    "mode": "perldoc",
    "parameter": "IPC::Run::Debug",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/IPC%3A%3ARun%3A%3ADebug/json",
    "generated": "2026-06-14T00:37:00Z",
    "synopsis": "##\n## Environment variable usage\n##\n## To force debugging off and shave a bit of CPU and memory\n## by compile-time optimizing away all debugging code in IPC::Run\n## (debug => ...) options to IPC::Run will be ignored.\nexport IPCRUNDEBUG=none\n## To force debugging on (levels are from 0..10)\nexport IPCRUNDEBUG=basic\n## Leave unset or set to \"\" to compile in debugging support and\n## allow runtime control of it using the debug option.",
    "sections": {
        "NAME": {
            "content": "IPC::Run::Debug - debugging routines for IPC::Run\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "##\n## Environment variable usage\n##\n## To force debugging off and shave a bit of CPU and memory\n## by compile-time optimizing away all debugging code in IPC::Run\n## (debug => ...) options to IPC::Run will be ignored.\nexport IPCRUNDEBUG=none\n\n## To force debugging on (levels are from 0..10)\nexport IPCRUNDEBUG=basic\n\n## Leave unset or set to \"\" to compile in debugging support and\n## allow runtime control of it using the debug option.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Controls IPC::Run debugging. Debugging levels are now set by using words, but the numbers shown\nare still supported for backwards compatibility:\n\n0  none         disabled (special, see below)\n1  basic        what's running\n2  data         what's being sent/received\n3  details      what's going on in more detail\n4  gory         way too much detail for most uses\n10 all          use this when submitting bug reports\nnoopts       optimizations forbidden due to inherited STDIN\n\nThe \"none\" level is special when the environment variable IPCRUNDEBUG is set to this the first\ntime IPC::Run::Debug is loaded: it prevents the debugging code from being compiled in to the\nremaining IPC::Run modules, saving a bit of cpu.\n\nTo do this in a script, here's a way that allows it to be overridden:\n\nBEGIN {\nunless ( defined $ENV{IPCRUNDEBUG} ) {\neval 'local $ENV{IPCRUNDEBUG} = \"none\"; require IPC::Run::Debug\"'\nor die $@;\n}\n}\n\nThis should force IPC::Run to not be debuggable unless somebody sets the IPCRUNDEBUG flag;\nmodify this formula to grep @ARGV if need be:\n\nBEGIN {\nunless ( grep /^--debug/, @ARGV ) {\neval 'local $ENV{IPCRUNDEBUG} = \"none\"; require IPC::Run::Debug\"'\nor die $@;\n}\n\nBoth of those are untested.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Barrie Slaymaker <barries@slaysys.com>, with numerous suggestions by p5p.\n",
            "subsections": []
        }
    },
    "summary": "IPC::Run::Debug - debugging routines for IPC::Run",
    "flags": [],
    "examples": [],
    "see_also": []
}