#!/usr/bin/perl use strict; use warnings; use diagnostics; package purge_proddoc_script; use Getopt::Std; # use Sys::Hostname; use POSIX qw(setuid setgid); use English; use Carp; use Cwd 'abs_path'; use DBD::Oracle qw(:ora_session_modes); use DBI; use File::Basename; use IO::Handle; use Log::Log4perl qw( :easy ); use Text::Diff; local $SIG{__WARN__} = \&Carp::cluck; $SIG{__DIE__} = sub { # return if $^S; # ignore die in an eval block # Get the actual caller for the "die" and not the wrapper local $Log::Log4perl::caller_depth; $Log::Log4perl::caller_depth++; LOGDIE($_[0]); }; # possible log values: DEBUG, INFO, WARN, ERROR, FATAL my $debug_level="INFO"; # my $error_mail_list='bbyrd@aires.com, ASayed@aires.com, vkamins@aires.com, RKatru@aires.com'; my $error_mail_list='bbyrd@aires.com'; # Unbuffer STDOUT and STDERR select STDERR; $| = 1; select STDOUT; $| = 1;