Test::Mimic::Generator - Perl module for generating mock perl packages from data recorded by Test::Mimic::Recorder.
use Test::Mimic::Generator; my $generator = Test::Mimic::Generator->new(); $generator->load('.test_mimic_recorder_data'); $generator->write('.test_mimic_data');
Constructs and returns a new generator object.
Accepts the name of a directory to load information from. Test::Mimic::Recorder must have written to this directory. Can be called multiple times. Only the information from the last call will be used. Later in development we should be able to merge multiple recordings.
Accepts the name of a directory to store the generated .pm files and other information in. This directory need not exist. The .pm files will be stored in "$write_directory/lib". Additional history information will be recorded in "$write_directory/history_for_playback.rec".
It should be mentioned that the generated .pm files require that Test::Mimic::Library be in a certain state. Specifically, Test::Mimic::Library::load_records("$write_directory/history_for_playback.rec") should have been called. Typically this is handled by the controller, Test::Mimic, but if you are using the files independently you must do this yourself.
Nothing available for export.
The latest source for the Test::Mimic suite is available at:
Brendan Roof, <email@example.com>
Copyright (C) 2009 by Brendan Roof.
Made possible by a generous contribution from WhitePages, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.