in reply to Creating stub methods

The test says that CGI.pm does not have a start_html() method, but calling that method succeeds. AUTOLOAD() can cause strange behaviors.

Since the pod of UNIVERSAL.pm states:

"$obj->can( METHOD )"
"CLASS->can( METHOD )"
"can( VAL, METHOD )"
"can" checks if the object or class has a method called "METHOD". If it does then a reference to the sub is returned. If it does not then undef is returned. This includes methods inherited or imported by $obj, "CLASS", or "VAL".

I have taken the approach of attempting to load the requested subroutine/method for the load module and returning the coderef if it could be loaded. Generally, if you test whether a sub/method exists, you'd also want to execute it. So it seemed the right thing to do.

Liz