File Coverage: lib/Code/Statistics/Target/Sub.pm

# File Coverage

File: | lib/Code/Statistics/Target/Sub.pm
Coverage: | 100.0%

line | stmt | bran | cond | sub | pod | time | code
--- | --- | --- | --- | --- | --- | --- | ---
1 | 1 1 1 |  |  | 1 |  | 0 0 0 | use strict;
2 | 1 1 1 |  |  | 1 |  | 0 0 0 | use warnings;
3 |
4 |  |  |  |  |  |  | package Code::Statistics::Target::Sub;
5 |
6 |  |  |  |  |  |  | # ABSTRACT: represents a sub in perl code
7 |
8 | 1 1 1 |  |  | 1 |  | 0 0 0 | use Moose;
9 |  |  |  |  |  |  | extends 'Code::Statistics::Target';
10 |
11 - 13 |  |
    =head2 find_targets
        Returns all PPI::Structure::Block elements found in the given file.
    =cut
14 |
15 |  |  |  |  |  |  | sub find_targets {
16 |  |  |  |  |  |  | my ( $class, $file ) = @_;
17 |  |  |  |  |  |  | return $file->ppi->find( 'PPI::Statement::Sub' );
18 |  |  |  |  |  |  | }
19 |
20 |  |  |  |  |  |  | 1;