packageMy::Tee;useIO::Handle;# see PerlIO::viaour$copyfh;subPUSHED{open($copyfh,'>',"$::opt_vardir/log/stdout.log")ordie"open(>$::opt_vardir/log/stdout.log): $!"unless$copyfh;bless{},shift;}subWRITE{my($obj,$buf,$fh)=@_;print$fh$buf;$fh->flush;print$copyfh$buf;returnlength($buf);}1;