in reply to Refactoring challenge.
This code is a mess, but works. Can you refactor it?
Sure. First, show me your unit tests, so that I can have confidence that my refactorings aren't breaking any unstated assumptions. In particular, on first read of the code, I'd want to see the tests that demonstrate (and document) what you expect
to do and not do. Otherwise, I'd be left making educated guesses. That might work, or it might not.$str =~ s[^.{$pos1}\s*][];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Refactoring challenge.
by BrowserUk (Patriarch) on Mar 06, 2005 at 18:32 UTC | |
|
Re^2: Refactoring challenge.
by BrowserUk (Patriarch) on Mar 07, 2005 at 01:03 UTC |