[Bioperl-guts-l] bioperl-live/Bio/DB SeqHound.pm,1.5,1.6
Heikki Lehvaslaiho
heikki at dev.open-bio.org
Thu Sep 28 14:32:12 EDT 2006
Update of /home/repository/bioperl/bioperl-live/Bio/DB
In directory dev.open-bio.org:/tmp/cvs-serv10233
Modified Files:
SeqHound.pm
Log Message:
using lexically scoped file handles
Index: SeqHound.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqHound.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SeqHound.pm 26 Sep 2006 22:03:06 -0000 1.5
--- SeqHound.pm 28 Sep 2006 18:32:10 -0000 1.6
***************
*** 520,573 ****
#set up verbosity level if need record in the log file
! #$self->verbose(1);
! open (LOG, ">>shoundlog")
! and print STDERR "Writing into the log file shoundlog\n" if $self->verbose > 0;
! my $now = strftime("%a %b %e %H:%M:%S %Y", localtime);
! if ($lcontent eq ""){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname. No reply.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
return;
! }
! elsif ($lcontent =~ /HTTP::Request error/){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname. Http::Request error problem.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
return;
! }
! elsif ($lcontent =~ /SEQHOUND_ERROR/){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname error. SEQHOUND_ERROR found.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
return;
! }
! elsif ($lcontent =~ /SEQHOUND_NULL/){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname Value not found in the database. SEQHOUND_NULL found.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
return;
! }
! else{
chomp $lcontent;
my @lines = split(/\n/, $lcontent, 2);
! if ($lines[1] =~ /^-1/){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname Value not found in the database. -1 found.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
! return;
! }
! elsif ($lines[1] =~ /^0/){
! open (LOG, ">>shoundlog")
! and print LOG "$now $funcname failed.\n" if $self->verbose>0;
! close (LOG) if $self->verbose>0;
! return;
! }
! else{
! $result = $lines[1];
}
! }
! close (LOG) if $self->verbose>0 ;
!
#a list of functions in SeqHound which can wrap into Bio::seqIO object
if ($outtype eq 'Bio::SeqIO'){
--- 520,569 ----
#set up verbosity level if need record in the log file
! $self->verbose(1);
!
!
! if ($self->verbose>0) {
! my $now = strftime("%a %b %e %H:%M:%S %Y", localtime);
! if ($lcontent eq "") {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname. No reply.\n";
return;
! } elsif ($lcontent =~ /HTTP::Request error/) {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname. Http::Request error problem.\n";
return;
! } elsif ($lcontent =~ /SEQHOUND_ERROR/) {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname error. SEQHOUND_ERROR found.\n";
return;
! } elsif ($lcontent =~ /SEQHOUND_NULL/) {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname Value not found in the database. SEQHOUND_NULL found.\n";
return;
! } else {
chomp $lcontent;
my @lines = split(/\n/, $lcontent, 2);
! if ($lines[1] =~ /^-1/) {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname Value not found in the database. -1 found.\n";
! return;
! } elsif ($lines[1] =~ /^0/) {
! print STDERR "Writing into the log file shoundlog\n";
! open (my $LOG, ">>shoundlog");
! print $LOG "$now $funcname failed.\n";
! return;
! } else {
! $result = $lines[1];
}
! }
!
! }
!
#a list of functions in SeqHound which can wrap into Bio::seqIO object
if ($outtype eq 'Bio::SeqIO'){
More information about the Bioperl-guts-l
mailing list