| blib/lib/Duadua/Parser/Bot/Huawei.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 13 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 20 | 20 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Duadua::Parser::Bot::Huawei; | ||||||
| 2 | 6 | 6 | 78 | use strict; | |||
| 6 | 14 | ||||||
| 6 | 154 | ||||||
| 3 | 6 | 6 | 28 | use warnings; | |||
| 6 | 11 | ||||||
| 6 | 118 | ||||||
| 4 | 6 | 6 | 26 | use Duadua::Util qw//; | |||
| 6 | 353 | ||||||
| 6 | 690 | ||||||
| 5 | |||||||
| 6 | sub try { | ||||||
| 7 | 292 | 292 | 1 | 588 | my ($class, $d) = @_; | ||
| 8 | |||||||
| 9 | 292 | 100 | 652 | if ( index($d->ua, 'AspiegelBot') > -1 ) { | |||
| 10 | 1 | 5 | my $h = { | ||||
| 11 | name => 'AspiegelBot', | ||||||
| 12 | is_bot => 1, | ||||||
| 13 | }; | ||||||
| 14 | |||||||
| 15 | 1 | 4 | return Duadua::Util->set_os($d, $h); | ||||
| 16 | } | ||||||
| 17 | } | ||||||
| 18 | |||||||
| 19 | 1; | ||||||
| 20 | |||||||
| 21 | __END__ |