File Coverage

File:lib/Code/Statistics/Target.pm
Coverage:88.0%

linestmtbrancondsubpodtimecode
1
2
2
2
0
0
0
use strict;
2
2
2
2
0
0
0
use warnings;
3
4package Code::Statistics::Target;
5
6# ABSTRACT: base class for Code::Statistic targets
7
8
2
2
2
0
0
0
use 5.004;
9
10
2
2
2
0
0
0
use Module::Pluggable search_path => __PACKAGE__, require => 1, sub_name => 'all';
11
12 - 18
=head2 find_targets
    Returns an arrayref to a list of targets found in the given file.
    Is called with the target class name and a Code::Statistics::File object.
    This function should be overridden with specific logic to actually retrieve
    the target list.

=cut
19
20sub find_targets {
21
0
0
    my ( $class, $file ) = @_;
22
0
0
    return [];
23}
24
25 - 30
=head2 incompatible_with
    Returns true if the given metric is explicitly not supported by this target.
    Is called with the target class name and a string representing the metric
    identifiers after 'Code::Statistics::Metric::'.
    Default is that all targets are compatible with all metrics.
=cut
31
32sub incompatible_with {
33
288
0
    my ( $class, $target ) = @_;
34
288
0
    return 0;
35}
36
37 - 45
=head2 supports
    Returns true if the given metric is supported by this target.
    Is called with the target class name and a string representing the metric
    identifiers after 'Code::Statistics::Metric::'.
    Default is that all targets are compatible with all metrics.

    Has higher precedence than 'incompatible_with' and should be used to
    incompatibilities set by other metrics.
=cut
46
47sub supports {
48
288
0
    my ( $class, $target ) = @_;
49
288
0
    return 0;
50}
51
521;