Methods are not functions. If you call a method as a function, you might get the right results and you might get the wrong results. If the documentation shows you how to call a method as a method and you call it as a function and get the wrong results, that's your fault and you should stop doing it if you care about getting the right results consistently and reliably.
You should especially not file bug reports about getting the wrong results if you use the code incorrectly.
That is all.
Visuals... (Score:2)
Re: (Score:1)
At least the documentation supports that operation... but a cleaner way to perform the same behavior is to export functions that operate on an automatically-generated singleton, not to try to detect a valid invocant.
It's funny how you mention that though, as I've written patches for CGI.pm to prevent it from breaking Liskov's substitutability principle.
Response to bug report (Score:2)
This is not a bug. The documentation clearly indicates that calling $obj->routine() will return a scalar. However, calling Package::routine() is intended to throw a fatal error. This is exactly the results you are getting, and so it is not a bug.
:)
It's where you look over the three items of the bug report formula [perl.org] and verify that when the action described in point 1 is taken, the results described in point 3 are correct, and that the expectation described in point 2 is wrong.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Eek! The memories! (Score:2)
They really need a re-write.