Help for this page

Select Code to Download


  1. or download this
    sub tee_print { print MYLOGFILE $_[0]; print $_[0] }
    eval {
    ...
        $h->method($params) or tee_print("oops: " . $h->errstr());
    };
    if ($@) { tee_print("error: $@") }
    
  2. or download this
    my $h = MyModule->new(PrintHandler => \&tee_print,
                          WarnHandler  => \&tee_print,
                          ErrMode      => 'return');
    $h->method($params) or tee_print("oops: " . $h->errstr());