in reply to Request for help in method naming
I'd strongly suggest having tpv ALWAYS return metric measurements. Otherwise people using your objects always need to check which measurement system they're on (apparently by calling $object->_is_metric which looks like a private method they shouldn't be calling). This seems a recipe for disaster. You just know half the time people will just assume it's going to give them metric because that's the default.
If you want to offer imperial units too, define another method tpv_imperial to do that. People who want that, can call it by name and know reliably what they're getting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Request for help in method naming
by stevieb (Canon) on May 18, 2017 at 19:39 UTC |