File: | lib/Code/Statistics/Target/Block.pm |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | 2 2 2 | 0 0 0 | use strict; | ||||
2 | 2 2 2 | 0 0 0 | use warnings; | ||||
3 | |||||||
4 | package Code::Statistics::Target::Block; | ||||||
5 | |||||||
6 | # ABSTRACT: represents a block in perl code | ||||||
7 | |||||||
8 | 2 2 2 | 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::Structure::Block' ); | ||||||
18 | } | ||||||
19 | |||||||
20 | 1; |