GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mock::Quick::Object::Control(3) User Contributed Perl Documentation Mock::Quick::Object::Control(3)

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

Control a mocked object after creation.

    my $obj = Mock::Quick::Object->new( ... );
    my $control = Mock::Quick::Object::Control->new( $obj );

    $control->set_methods( foo => sub { 'foo' });
    $control->set_attributes( bar => 'baz' );

    # Make an attribute exist so that it can be used for get/set operations.
    $control->set_attributes( empty => undef );

$control = $CLASS->new( $obj )
$control->set_methods( name => sub { ... }, ... )
Set/Create methods
$control->set_attributes( name => $val, ... )
Set/Create attributes (simple get/set accessors)
$control->clear( $name1, $name2, ... )
Remove attributes/methods.
$control->strict( $BOOL )
Enable/Disable strict mode.
$data = $control->metrics()
Returns a hash where keys are method names, and values are the number of times the method has been called. When a method is altered or removed the key is deleted.

Chad Granum exodist7@gmail.com

Copyright (C) 2011 Chad Granum

Mock-Quick is free software; Standard perl licence.

Mock-Quick is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.

2022-04-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.