Help for this page

Select Code to Download


  1. or download this
    use Your::Module( $log_file );
    
  2. or download this
    use Your::Module;
    Your::Module->set_log_file( $log_file );
    
  3. or download this
    package Your::Module;
    # ...
    ...
        my( $we, $log_file ) = @_;
        Log::Log4perl->init( \"... $log_file ..." );
    }
    
  4. or download this
    package main;
    use strict;
    ...
    
    our $log_file = ...;
    Log::Log4perl->init( ... );
    
  5. or download this
    package Your::Module;
    
    Log::Log4perl->init( \qq< ... $main::log_file ... > );
    
  6. or download this
    package main;
    use strict;
    ...
    Log::Log4perl->init( ... );
    
    use Your::Module; # Must happen after $log_file is set. DON'T MOVE UP!