Spreadsheet::Compare::Common - convenient imports for Spreadsheet::Compare Modules
This module injects various Modules and functions into the namespace of the caller:
Carp
Try::Tiny
cwd, path, tempfile, tempdir from Path::Tiny
cwd
path
tempfile
tempdir
Dump, Load, DumpFile, LoadFile from YAML
Dump
Load
DumpFile
LoadFile
Log::Log4perl in easy mode
any, max, none, pairgrep, pairmap, reduce from List::Util
any
max
none
pairgrep
pairmap
reduce
strftime from POSIX
strftime
In addition it enables the postderef feature and extends the has function of Mojo::Base with an ro option to specify that the attribute is readonly, e.g.:
has
ro
use Mojo::Base -base, -signatures; use Spreadsheet::Compare::Common; has thing => 42, ro => 1;
If the module is loaded with the "test" option set to a true value,
use Spreadsheet::Compare::Common test => 1; ... use test functions
it will additionally inject the following:
Mojo::Base with -strict and -signatures
-strict
-signatures
Test::More
Test::Exception
data_section from Mojo::Loader
data_section
$Bin and $Script from FindBin
$Bin
$Script
The test option can be extended with a "temp" option. This will create a temporary directory in the "t" directory starting with the test file name. (e.g. t/01_base_V3CQ for t/01_base.t). By default it will be cleaned up afterwards. To keep the directory set the environment variable SPREADSHEET_COMPARE_CLEANUP to a true value. The absolute name of the temp directory will be available in the environment variable SC_TMPD
SPREADSHEET_COMPARE_CLEANUP
SC_TMPD
use Spreadsheet::Compare::Common test => 1, temp => 1; ... save temp data to $ENV{SC_TMPD}
To install Spreadsheet::Compare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Spreadsheet::Compare
CPAN shell
perl -MCPAN -e shell install Spreadsheet::Compare
For more information on module installation, please visit the detailed CPAN module installation guide.