Controlling Archive Location
When creating or reproducing an archive, a status message gets printed to STDERR
indicating the archive's location. For example:
Reproducing archive: /path/to/repro-archive/rlog-sample.pl-20140321.144307
Created new archive: /path/to/repro-archive/rlog-sample.pl-20140321.144335
Default
By default, runs are archived in a directory called repro-archive
that is created in the current working directory (i.e., whichever directory you were in when you executed your script).
Global
You can set a global archive directory with the environmental variable REPRO_DIR
. Just add the following line to ~/.bash_profile
:
export REPRO_DIR=/path/to/archive
Script
You can set a script-level archive directory by passing the desired directory when importing the Log::Reproducible
module:
use Log::Reproducible '/path/to/archive';
This approach overrides the global archive directory settings.
Via Command Line
You can override all other archive directory settings by passing the desired directory on the command line when you run your script:
perl sample.pl --reprodir /path/to/archive