| Next | Program
Repair Shop ![]() |
20 |
sub GrabFileList {
for my $dir (@InputDIR) {
opendir (FILELISTDIR,$dir);
push @FileList, map "$dir/$_", readdir FILELISTDIR;
closedir FILELISTDIR;
}
}
Here, each filename has its directory attached
Formerly, the directories were implicit
Items in @FileList1 were in directory @InputDir1
Items in @FileList2 were in directory @InputDir2
Every implicit relationship is one more thing the maintainer must remember
Also one more chance to screw up
Also one more chance to lose the information
Make relationships explicit
| Next | ![]() |
Copyright © 2002 M. J. Dominus |