[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.42, Wed Mar 29 19:41:02 2006 UTC revision 1.43, Mon Apr 24 21:05:17 2006 UTC
# Line 1933  Line 1933 
1933      my ($dirName) = @_;      my ($dirName) = @_;
1934      if (! -d $dirName) {      if (! -d $dirName) {
1935          Trace("Creating $dirName directory.") if T(2);          Trace("Creating $dirName directory.") if T(2);
1936          mkpath $dirName;          eval { mkpath $dirName; };
1937            if ($@) {
1938                Confess("Error creating $dirName: $@");
1939            }
1940        }
1941    }
1942    
1943    =head3 ChDir
1944    
1945    C<< ChDir($dirName); >>
1946    
1947    Change to the specified directory.
1948    
1949    =over 4
1950    
1951    =item dirName
1952    
1953    Name of the directory to which we want to change.
1954    
1955    =back
1956    
1957    =cut
1958    
1959    sub ChDir {
1960        my ($dirName) = @_;
1961        if (! -d $dirName) {
1962            Confess("Cannot change to directory $dirName: no such directory.");
1963        } else {
1964            Trace("Changing to directory $dirName.") if T(4);
1965            my $okFlag = chdir $dirName;
1966            if (! $okFlag) {
1967                Confess("Error switching to directory $dirName.");
1968            }
1969      }      }
1970  }  }
1971    

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3