Help for this page

Select Code to Download


  1. or download this
    use constant DEBUG => 1;
    
    ...
        return unless DEBUG >= 1;
        print 'DEBUG: ', @_, "\n";
    }
    
  2. or download this
    sub debug {
        return unless DEBUG >= 1;
    ...
            ( ref $_[0] eq 'CODE' ? $_[0]->() : @_ ),
            "\n";
    }
    
  3. or download this
    debug( sub { Data::Dumper->new([$variable], ["variable"])->Dump } );