METHOD AUTOVIVIFYING

Sometimes you need to pass in an object that has more methods than you care to mock out, they only need to be present and return something.

Thats where the next feature of Quick Objects comes in. Quick objects will autovivify methods as they are needed. The new methods will be read/write accessors.

my $obj = qobj();
$obj->foo( 'bar' );
is( $obj->foo, 'bar', "foo attribute was set" );
is(
    $obj->foo( 'baz' ),
    'baz',
    "remembers and returns whatever argument you give it."
);
Next: https://github.com/exodist/Mock-Quick/blob/master/lib/Mock/Quick/Presentation/slideD.pod
Previous: https://github.com/exodist/Mock-Quick/blob/master/lib/Mock/Quick/Presentation/slideB.pod