Two things: getting something off the shelf that just works and avoiding agonizing over the minutiae of grep commands. And taking care of details like file locking, fast searching and making multiple changes to files in memory to make things more efficient.
I've started to patch a solution together myself with Path::Iterator::Rule for selecting files of interest and then creating a custom file object that will handle in memory search and replaces and file locking. It's probably overkill for what I need but I'd rather make sure I try to do it right. I won't be able to beat grep when it comes to raw searching speed, but I'm not too concerned about that. I'm only dealing with a few hundred files at most.
|