blib/lib/Algorithm/AhoCorasick/XS.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 16 | 16 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Algorithm::AhoCorasick::XS; | ||||||
2 | 5 | 5 | 231245 | use strict; | |||
5 | 11 | ||||||
5 | 134 | ||||||
3 | 5 | 5 | 26 | use warnings; | |||
5 | 8 | ||||||
5 | 130 | ||||||
4 | 5 | 5 | 1543 | use List::MoreUtils qw(uniq); | |||
5 | 31716 | ||||||
5 | 46 | ||||||
5 | require XSLoader; | ||||||
6 | our $VERSION = '0.04'; | ||||||
7 | XSLoader::load('Algorithm::AhoCorasick::XS', $VERSION); | ||||||
8 | |||||||
9 | sub unique_matches { | ||||||
10 | 1612 | 1612 | 1 | 658249 | my ($self, $input) = @_; | ||
11 | 1612 | 16130 | return uniq $self->matches($input); | ||||
12 | } | ||||||
13 | |||||||
14 | 1; | ||||||
15 | |||||||
16 | __END__ |