Next | Program Repair Shop | 84 |
A function should do a single task
Its purpose should be clearly defined and easily explainable
xcopy should be simple:
"Recursively copy a source directory to a destination directory."
The arguments should be clearly defined and easily explainable
The arguments are $src, the path of the source directory, and $dst, the path of the destination directory.
Here the author couldn't make up his mind about the arguments
13 &xcopy($source_directory,$target_directory);
18 my ($pwd,$i)=($_[0],$i++);
51 &xcopy($source_node) if -d $source_node;
Next | Copyright © 2002 M. J. Dominus |