NAME
Devel::CoverX::Covered::Db - Covered database collection and reporting
DESCRIPTION
Error handling model
Failures will result in a die.
PROPERTIES
dir
The directory for the cover_db.
db
DBIx::Simple $db object. Created lazily under "dir".
METHODS
connect_to_db() : DBIx::Simple $db
Connect to the covered db and return the new DBIx::Simple object.
If there is no db at all, create it first.
create_db($db_file) : DBIx::Simple $db
Create $db_file with the correct schema.
Return newly created DBIx::Simple $db object.
in_transaction($subref) : $ret
Run $subref->() in a transaction and return the return value of $subref in scalar context.
If anything dies inside $subref, roll back and rethrow exception.
collect_runs() : 1
Collect coverage statistics for test runs in "dir".
get_run_dirs() : @dirs
Return list of directories for test runs under the "dir".
collect_run($cover_db) : 1
Collect coverage statistics for the test run Devel::Cover::DB $cover_db.
Don't collect coverage for eval (-e).
reset_calling_file($calling_file_name) : 1
Clear out the stored data related to $calling_file_name.
report_metric_coverage(metric_type, calling_file, covered_file, covered_row, covered_sub_name, metric) : 1
Report the coverage metric defined by the parameters.
Make all file paths relative to "dir" if possible.
test_files_covering($source_file_name) : @test_file_names
Return list of test files that cover any line in $source_file_name.
test_files() : @test_file_names
Return list of test files in the db.
covered_files() : @source_file_names
Return list of source files in the db.
relative_file($file) : Path::Class::File $relative_file
Return $file relative to cover_db/.. if possible, otherwise just return $file.