|Subject:||inappropriate exposure of internal constants|
Extracted from an irc log, names elided to protect the guilty: <@Foo> This makes me sad.<+dipsy> urgh. long url. Try <@Foo> Nasty enough that those return vals were exposed to perl space, but.. why you do this, module author. <@Bar> Foo: wtf is with those magic numbers? <@Bar> looks like he's exposing some IS_NUMBER_IN_* constants <@Qux> it looks generally useful if it's encapsulated and maintained in Scalar::Util to me <@Bar> it's actually the result of grok_number that is being returned <@Bar> he's just taking advantage of looks_like_number returning that without canonicalizing to a bool, rather than writing an XS component to call grok_number directly <@Bar> well clearly someone needs to patch looks_like_number to return !! ...and then release my *own* library that uses these constants :p Hopefully you get the gist. Please don't abuse internals like this - use a sensible wrapper.