Help for this page

Select Code to Download


  1. or download this
    use constant ENABLE_DEBUG => 0;
    sub debug { print $_[0]; }
    debug 'test' if ENABLE_DEBUG;
    
  2. or download this
    use constant ('ENABLE_DEBUG', 0);
    sub debug {
        print $_[0];
    }
    '???';
    
  3. or download this
    use constant ENABLE_DEBUG => 0;
    sub debug { print $_[0] if ENABLE_DEBUG(); }
    debug 'test';
    
  4. or download this
    use constant ('ENABLE_DEBUG', 0);
    sub debug {
        0;
    }
    debug 'test';