package Subs::SWCheckInput; ############################################################################## # # DESCRIPTION: Check and input files and record some info # # HISTORY: # HISTORY: $Log: SWCheckInput.pm,v $ # HISTORY: Revision 1.7 2006/02/13 18:23:09 apsop # HISTORY: Add "/" to the list of acceptable characters in object and PI names and job titles. # HISTORY: # HISTORY: Revision 1.6 2006/02/10 16:29:46 apsop # HISTORY: Better checking before sanatizing. # HISTORY: # HISTORY: Revision 1.5 2006/02/10 15:08:34 apsop # HISTORY: Remove process_flags method. Add sanitize_names method # HISTORY: # HISTORY: Revision 1.4 2005/09/26 21:09:50 apsop # HISTORY: Get timeline start and stop times from the queue file. # HISTORY: # HISTORY: Revision 1.3 2005/09/06 20:16:30 apsop # HISTORY: Fix bug in populating the DATALIST hash. # HISTORY: # HISTORY: Revision 1.2 2005/08/31 16:23:05 apsop # HISTORY: Set finalproc parameter in jobpar file as appropriate. # HISTORY: # HISTORY: Revision 1.1 2005/06/01 14:04:17 apsop # HISTORY: New module calls subroutine to store information from the processing flags produced by pipline. # HISTORY: # # # VERSION: 0.0 # ############################################################################# use Subs::Sub; use Subs::CheckInput; @ISA = qw(Subs::CheckInput); use strict; ######################################### # constructor ######################################### sub new { my $proto=shift; my $self=$proto->SUPER::new(); return $self; } sub body { my $self=shift; $self->verify_input(); $self->sanitize_names(); } # end of subroutine body sub sanitize_names { my $self=shift; my $filename=$self->filename(); my $log =$self->log(); my $jobpar =$self->jobpar(); foreach my $par ('object', 'job_title', 'pi'){ my $val = $jobpar->read($par); $val =~ s/[^\w\.\-\(\)\+\/ ]//g; $jobpar->set({$par => $val}); } }