IPC::Run::Debug(3)

πŸ’– IPC::Run::Debug(3) πŸ’–

okay bestie, welcome to the IPC::Run::Debug page β€” it's part of the User Contributed Perl Documentation situation, and it's literally just the debugging routines for IPC::Run. no cap. let's get into it ✨


🌸 NAME 🌸

IPC::Run::Debug β€” debugging routines for IPC::Run


πŸŽ€ SYNOPSIS πŸŽ€

##
## Environment variable usage
##
## To force debugging off and shave a bit of CPU and memory
## by compile-time optimizing away all debugging code in IPC::Run
## (debug => ...) options to IPC::Run will be ignored.
export IPCRUNDEBUG=none

## To force debugging on (levels are from 0..10)
export IPCRUNDEBUG=basic

## Leave unset or set to "" to compile in debugging support and
## allow runtime control of it using the debug option.

πŸ¦‹ DESCRIPTION πŸ¦‹

so this page controls IPC::Run debugging. the tea is that debugging levels are now set with words, but the numbers are still supported for backwards compatibility (we love a legacy queen πŸ‘‘):

   0  none         disabled (special, see below)
   1  basic        what's running
   2  data         what's being sent/received
   3  details      what's going on in more detail
   4  gory         way too much detail for most uses
  10 all          use this when submitting bug reports
     noopts       optimizations forbidden due to inherited STDIN

the "none" level is special when the environment variable IPCRUNDEBUG is set to it the first time IPC::Run::Debug is loaded: it stops the debugging code from being compiled in to the remaining IPC::Run modules, which saves a bit of cpu. iconic efficiency behaviour, honestly πŸ’…

to do this in a script, here's a way that allows it to be overridden:

BEGIN {
   unless ( defined $ENV{IPCRUNDEBUG} ) {
      eval 'local $ENV{IPCRUNDEBUG} = "none"; require IPC::Run::Debug"'
         or die $@;
   }
}

this should force IPC::Run to not be debuggable unless somebody sets the IPCRUNDEBUG flag; modify this formula to grep @ARGV if need be:

BEGIN {
   unless ( grep /^--debug/, @ARGV ) {
      eval 'local $ENV{IPCRUNDEBUG} = "none"; require IPC::Run::Debug"'
      or die $@;
   }
}
😭 bestie listen β€” Both of those are untested. so like, they might slay, they might not. you've been warned 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Barrie Slaymaker <barries@slaysys.com>, with numerous suggestions by p5p.


and that's the whole page, bestie β€” we ate and left no crumbs 🌈 this was perl v5.42.0, dated 2025-08-11, and it's the IPC::Run::Debug(3) manpage. periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from