Help for this page

Select Code to Download


  1. or download this
    use Log::Log4perl qw/:easy :no_extra_logdie_message/;
    $SIG{__DIE__} = sub {
    ...
            
            LOGDIE($_[0]);
        };
    
  2. or download this
    perl -v
    This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x
    +86-multi-thread
    (with 1 registered patch, see perl -V for more detail)
    ...
    
    Binary build 1603 [296746] provided by ActiveState http://www.ActiveSt
    +ate.com
    Built Mar 13 2013 11:29:21
    
  3. or download this
    $SIG{__DIE__} = sub {
        my ($message) = @_;
    ...
        my $log = get_logger('');
        $log->logdie($message);
    };
    
  4. or download this
    # the new $SIG{__DIE__} causes everything to die here:
    eval{ do_something(\@args) or die "'do_something()' failed: $!"; };
    
    ...
        warn "Could not do_something(): [$@]";
        something_else();
    }
    
  5. or download this
    use YAML qw/LoadFile/;
    
    # dies with the following error:
    # Can't locate Mo/builder.pm in @INC (@INC contains: C:/Perl/site/lib 
    +C:/Perl/lib .) at (eval 65) line 2, <$IN> line 1.
    my $yaml = LoadFile('./config.yml');
    
  6. or download this
    $SIG{__DIE__} = sub {
        return if $^S; # ignore die in an eval block
        ...
    };
    
  7. or download this
    #!/usr/bin/perl
    use Log::Log4perl qw/get_logger :no_extra_logdie_message/;
    ...
    log4perl.appender.LogScreen.utf8    = 1
    log4perl.appender.LogScreen.layout  = ${layout_class}
    log4perl.appender.LogScreen.layout.ConversionPattern = ${debug_layout_
    +pattern}