Bug 107188
| Summary: | Reorganize webkitdirs.pm into modular pieces | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Farler <dfarler> |
| Component: | Tools / Tests | Assignee: | David Farler <dfarler> |
| Status: | ASSIGNED | ||
| Severity: | Enhancement | CC: | ddkilzer |
| Priority: | P3 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
David Farler
webkitdirs.pm is currently too state-oriented and overloaded in functionality to easily extend. I propose the following:
- Separate ports and extend a common interface
- Separate the concerns of command line options, utility functions, etc.
- Recommend rewrite in something like Python
- Automatically generate usage help using something like argparse
- Reduce reliance on state
- *Do not* mutate ARGV
For command line options:
- dynamically add argument sub-parsers depending on the tool and port
For utility functions:
- separate the various ports to ease merging and preventing interference
All of this might entail refactoring a lot of the tools but I think the long-term benefit would be worth it. Being able to centralize library behavior so that all ports can extend or utilize modules without interfering with each other would be a good thing.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |