The
prepare
method contains custom-written Perl code that you
want Forge to call before record processing starts.
This code typically performs pre-processing tasks such as checking
data sources, initializing record counts, and so on. The code you provide here
becomes the body of the prepare method. Calling either
next_record
or
get_records
from prepare results in an error. To
signal a failure during prepare, call Perl's
die()
function. Also see the
Manipulator::finish
method.
See the Introduction's example Perl manipulator for a sample usage of this method.