App-Validation-Automation
view release on metacpan or search on metacpan
lib/App/Validation/Automation/Logging.pm view on Meta::CPAN
=head2 log
Logs messages with timestamp and caller info.
=cut
sub log {
my $self = shift;
my $msg = shift;
local $OUTPUT_AUTOFLUSH = 1;
print { $self->log_file_handle }
scalar(localtime(time)).caller()." $msg"."\n" if( $msg );
return 1;
}
1;
script/app_validation.pl view on Meta::CPAN
my ($encrypted_pass, $decrypted_pass);
# Construct path of encrypted password file
my $encrypted_pass_file_loc
= $config{'COMMON.DEFAULT_HOME'}."/".$config{'COMMON.ENC_PASS_LOC'};
# Open file handle to password file
open my $enc_file_handle,"<",$encrypted_pass_file_loc
|| confess "Could Not open $encrypted_pass_file_loc :: $OS_ERROR";
{
local $INPUT_RECORD_SEPARATOR = undef;
$encrypted_pass = <$enc_file_handle>;
# Decrypt whatever is stored in $encrypted_pass with $secret_pass_phrase
$decrypted_pass = $crypt->decrypt($encrypted_pass,$secret_pphrase);
}
close $enc_file_handle;
return $decrypted_pass;
}
sub is_mtce_on {
( run in 0.382 second using v1.01-cache-2.11-cpan-64827b87656 )