[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32, Thu Jan 5 22:26:54 2006 UTC revision 1.33, Fri Jan 6 00:41:48 2006 UTC
# Line 174  Line 174 
174      # Presume category-based tracing until we learn otherwise.      # Presume category-based tracing until we learn otherwise.
175      $AllTrace = 0;      $AllTrace = 0;
176      # Build the category hash. Note that if we find a "*", we turn on non-category      # Build the category hash. Note that if we find a "*", we turn on non-category
177      # tracing.      # tracing. We must also clear away any pre-existing data.
178        %Categories = ();
179      for my $category (@categoryData) {      for my $category (@categoryData) {
180          if ($category eq '*') {          if ($category eq '*') {
181              $AllTrace = 1;              $AllTrace = 1;
# Line 526  Line 527 
527  Open a directory and return all the file names. This function essentially performs  Open a directory and return all the file names. This function essentially performs
528  the functions of an C<opendir> and C<readdir>. If the I<$filtered> parameter is  the functions of an C<opendir> and C<readdir>. If the I<$filtered> parameter is
529  set to TRUE, all filenames beginning with a period (C<.>), dollar sign (C<$>),  set to TRUE, all filenames beginning with a period (C<.>), dollar sign (C<$>),
530  or pound sign (C<#>) will be filtered out of the return list. If the directory  or pound sign (C<#>) and all filenames ending with a tilde C<~>) will be
531  does not open and I<$flag> is not set, an exception is thrown. So,  filtered out of the return list. If the directory does not open and I<$flag> is not
532  for example,  set, an exception is thrown. So, for example,
533    
534      my @files = OpenDir("/Volumes/fig/contigs", 1);      my @files = OpenDir("/Volumes/fig/contigs", 1);
535    
536  is effectively the same as  is effectively the same as
537    
538      opendir(TMP, "/Volumes/fig/contigs") || Confess("Could not open /Volumes/fig/contigs.");      opendir(TMP, "/Volumes/fig/contigs") || Confess("Could not open /Volumes/fig/contigs.");
539      my @files = grep { $_ !~ /^[\.\$\#]/ } readdir(TMP);      my @files = grep { $_ !~ /^[\.\$\#]/ && $_ !~ /~$/ } readdir(TMP);
540    
541  Similarly, the following code  Similarly, the following code
542    
# Line 573  Line 574 
574          # The directory opened successfully. Get the appropriate list according to the          # The directory opened successfully. Get the appropriate list according to the
575          # strictures of the filter parameter.          # strictures of the filter parameter.
576          if ($filtered) {          if ($filtered) {
577              @retVal = grep { $_ !~ /^[\.\$\#]/ } readdir $dirHandle;              @retVal = grep { $_ !~ /^[\.\$\#]/ && $_ !~ /~$/ } readdir $dirHandle;
578          } else {          } else {
579              @retVal = readdir $dirHandle;              @retVal = readdir $dirHandle;
580          }          }

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3