[Bioperl-guts-l] bioperl-live/Bio/DB/GFF/Adaptor berkeleydb.pm, 1.26, 1.27

Heikki Lehvaslaiho heikki at dev.open-bio.org
Thu Sep 28 14:38:01 EDT 2006


Update of /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor
In directory dev.open-bio.org:/tmp/cvs-serv10515

Modified Files:
	berkeleydb.pm 
Log Message:
using lexically scoped file handles


Index: berkeleydb.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/GFF/Adaptor/berkeleydb.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** berkeleydb.pm	28 Sep 2006 11:23:53 -0000	1.26
--- berkeleydb.pm	28 Sep 2006 18:37:59 -0000	1.27
***************
*** 183,189 ****
    my $maxfatime = 0;
  
!   opendir (D,$autodir) or $self->throw("Couldn't open directory $autodir for reading: $!");
  
!   while (defined (my $node = readdir(D))) {
      next if $node =~ /^\./;
      my $path      = "$dir/$node";
--- 183,189 ----
    my $maxfatime = 0;
  
!   opendir (my $D,$autodir) or $self->throw("Couldn't open directory $autodir for reading: $!");
  
!   while (defined (my $node = readdir($D))) {
      next if $node =~ /^\./;
      my $path      = "$dir/$node";
***************
*** 195,199 ****
    }
  
!   close D;
  
    my $timestamp_time  = _mtime($self->_timestamp_file) || 0;
--- 195,199 ----
    }
  
!   close $D;
  
    my $timestamp_time  = _mtime($self->_timestamp_file) || 0;
***************
*** 248,253 ****
              : "<";
  
!   open (F,$mode,$self->_notes_file) or $self->throw($self->_notes_file.": $!");
!   $self->{notes} = \*F;
  }
  
--- 248,253 ----
              : "<";
  
!   open (my $F,$mode,$self->_notes_file) or $self->throw($self->_notes_file.": $!");
!   $self->{notes} = $F;
  }
  
***************
*** 366,373 ****
    my $loaded = 0;
  
!   open (F,">>$file") or $self->throw("Couldn't open $file for writing: $!");
  
    if (defined $id) {
!     print F ">$id\n";
      $loaded++;
    }
--- 366,373 ----
    my $loaded = 0;
  
!   open (my $F,">>$file") or $self->throw("Couldn't open $file for writing: $!");
  
    if (defined $id) {
!     print $F ">$id\n";
      $loaded++;
    }
***************
*** 492,498 ****
    my $self = shift;
    my $tsf = $self->_timestamp_file;
!   open (F,">$tsf") or $self->throw("Couldn't open $tsf: $!");
!   print F scalar(localtime);
!   close F;
  }
  
--- 492,497 ----
    my $self = shift;
    my $tsf = $self->_timestamp_file;
!   open (my $F,">$tsf") or $self->throw("Couldn't open $tsf: $!");
!   print $F scalar(localtime);
  }
  
***************
*** 1022,1028 ****
              : "<";
  
!   open (F,$mode,$dbname) or $class->throw("$dbname: $!");
    my $self = bless {
! 		    fh        => \*F,
  		    next_idx  => 0,
  		    last_id   => 0,
--- 1021,1027 ----
              : "<";
  
!   open (my $F,$mode,$dbname) or $class->throw("$dbname: $!");
    my $self = bless {
! 		    fh        => $F,
  		    next_idx  => 0,
  		    last_id   => 0,



More information about the Bioperl-guts-l mailing list