make t/01_simple.t work for pushbutton testing
use strict+warnings in inline package

When using inlined packages in a file, one must either place 'use strict; use warnings;'
before the first 'package' line in the file, or else must place a separate 'use strict;
use warnings;' line within each inlined package.

Since I almost always end up moving inline packages to their own files on disk, I chose
to make Test::Stub::Driver get strict+warnings by adding uselines within that package.
Moving the lines 2 and 3 of this file to be lines 1 and 2 would have worked also.
stub($object)->$method only works if $object->can($method)

Previously, the objects returned from stub($object) were always able
to perform whichever method was called on them. This would be bad:
consider this hypothetical implementation:

    package Production::Code;

    sub fetch_via_lwp {
        my ($class, $user_agent, $url, @parameters) = @_;

        my $response =
            $user_agent->gte($url, @parameters);  # whoops, misspelled ->get as ->gte!

        if ($response->is_success) {
            # ... handle successful response
        } else {
            # ... handle failed response
        }

    }

Imagine a unit test for fetch_via_lwp() which passes in a stubbed-out
$user_agent object:

    my $stub_lwp = stub(LWP::UserAgent->new);

Now if $stub_lwp is passed in to Production::Code->fetch_via_lwp, the bug
in ->fetch_via_lwp will not be exposed during testing: the code will have to
fail in production instead.

This delta modifies Test::Driver::AUTOLOAD to ensure that it throws the same
type of error that perl throws when you call some random non-existant method
on an object.
Show how stub() works when many instances of a class exist.

If you have:

      +------------------------+
      |     Some::Class        |
      |                        |
      |     sub foo { 'foo' }  |
      |                        |
      |     sub bar { 'bar' }  |
      |                        |
      +------------------------+

and then have an instance of that class:

      my $object_1 = Some::Class->new;

which you then stub() out in some fashion:

      stub($object_1)->foo('quack');
      is( $object_1->foo, 'quack', 'changed implementation of ->foo for $object_1' );

then creating subsequent objects from Some::Class will give
them the class's behavior, not the stubbed-out behavior:

      my $object_2 = Some::Class->new;
      is( $object_2->foo, 'foo', 'I still get the default behavior of ->foo' );

This seems to be a strength of this current Test:: library.
add a test to prove stacking works correctly
remove my pushbutton test changes
Merge pull request #1 from belden/feature/usability-fixes

Don't allow stub($object)->some_method to work unless $object->can('some_method')