Sometimes, you need to replace an entire module.
use Test::MockObject;
my $mock_cgi = Test::MockObject->new();
$mock_cgi->set_series( 'param', qw( param1 param2 param3 ) );
is( get_param( $mock_cgi ), 'param1', 'get_param() should fetch first parameter' );