1Mock::Quick::Object::CoUnsterrolC(o3nptmr)ibuted Perl DoMcoucmke:n:tQautiicokn::Object::Control(3pm)
2
3
4

NAME

6       Mock::Quick::Object::Control - Control a mocked object after creation
7

DESCRIPTION

9       Control a mocked object after creation.
10

SYNOPSIS

12           my $obj = Mock::Quick::Object->new( ... );
13           my $control = Mock::Quick::Object::Control->new( $obj );
14
15           $control->set_methods( foo => sub { 'foo' });
16           $control->set_attributes( bar => 'baz' );
17
18           # Make an attribute exist so that it can be used for get/set operations.
19           $control->set_attributes( empty => undef );
20

METHODS

22       $control = $CLASS->new( $obj )
23       $control->set_methods( name => sub { ... }, ... )
24           Set/Create methods
25
26       $control->set_attributes( name => $val, ... )
27           Set/Create attributes (simple get/set accessors)
28
29       $control->clear( $name1, $name2, ... )
30           Remove attributes/methods.
31
32       $control->strict( $BOOL )
33           Enable/Disable strict mode.
34
35       $data = $control->metrics()
36           Returns a hash where keys are method names, and values are the
37           number of times the method has been called. When a method is
38           altered or removed the key is deleted.
39

AUTHORS

41       Chad Granum exodist7@gmail.com
42
44       Copyright (C) 2011 Chad Granum
45
46       Mock-Quick is free software; Standard perl licence.
47
48       Mock-Quick is distributed in the hope that it will be useful, but
49       WITHOUT ANY WARRANTY; without even the implied warranty of
50       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license
51       for more details.
52
53
54
55perl v5.38.0                      2023-07-20 Mock::Quick::Object::Control(3pm)
Impressum