blib/lib/Data/AMF/Parser.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | 2 | 2 | 100.0 |
subroutine | 5 | 5 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 26 | 27 | 96.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Data::AMF::Parser; | ||||||
2 | 7 | 7 | 46 | use strict; | |||
7 | 15 | ||||||
7 | 263 | ||||||
3 | 7 | 7 | 44 | use warnings; | |||
7 | 12 | ||||||
7 | 177 | ||||||
4 | |||||||
5 | 7 | 7 | 4156 | use Data::AMF::Parser::AMF0; | |||
7 | 27 | ||||||
7 | 85 | ||||||
6 | 7 | 7 | 200 | use Data::AMF::Parser::AMF3; | |||
7 | 17 | ||||||
7 | 29 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 3 | 3 | 1 | 8 | my $class = shift; | ||
10 | 3 | 50 | 17 | my $args = @_ > 1 ? {@_} : $_[0]; | |||
11 | |||||||
12 | 3 | 100 | 100 | 63 | return ($args->{version} || 0) == 3 | ||
13 | ? 'Data::AMF::Parser::AMF3' | ||||||
14 | : 'Data::AMF::Parser::AMF0'; | ||||||
15 | } | ||||||
16 | |||||||
17 | 1; | ||||||
18 | |||||||
19 | __END__ |