in reply to RFC: Win32::API API
I don't care for returning an empty string to signify the conversion error. I think I'd return undef or die on all errors so the user can catch it in an eval block. The empty string is too close to being legitimate, as the user might've passed an empty string *in*. If you want to split your errors into groups, I'd suggest returning undef for one group, and die for the other.
Having said all that, keep in mind that these are my opinions, and they're worth exactly what you paid for 'em. ;^)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: Win32::API API (names)
by tye (Sage) on Aug 16, 2012 at 23:17 UTC | |
by roboticus (Chancellor) on Aug 16, 2012 at 23:50 UTC | |
by bulk88 (Priest) on Aug 18, 2012 at 15:09 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2012 at 22:31 UTC | |
by bulk88 (Priest) on Aug 19, 2012 at 07:01 UTC | |
| |
by roboticus (Chancellor) on Aug 19, 2012 at 01:52 UTC | |
by bulk88 (Priest) on Aug 19, 2012 at 08:06 UTC |