| blib/lib/Compress/Stream/Zstd/DecompressionDictionary.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 17 | 17 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | n/a | ||
| subroutine | 5 | 5 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 24 | 25 | 96.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Compress::Stream::Zstd::DecompressionDictionary; | ||||||
| 2 | 1 | 1 | 491 | use 5.008001; | |||
| 1 | 4 | ||||||
| 3 | 1 | 1 | 5 | use strict; | |||
| 1 | 1 | ||||||
| 1 | 36 | ||||||
| 4 | 1 | 1 | 6 | use warnings; | |||
| 1 | 19 | ||||||
| 1 | 28 | ||||||
| 5 | |||||||
| 6 | 1 | 1 | 10 | use Compress::Stream::Zstd (); | |||
| 1 | 3 | ||||||
| 1 | 142 | ||||||
| 7 | |||||||
| 8 | sub new_from_file { | ||||||
| 9 | 1 | 1 | 1 | 1325 | my ($class, $file) = @_; | ||
| 10 | 1 | 50 | 45 | open my $fh, '<', $file or die $!; | |||
| 11 | 1 | 6 | local $/; | ||||
| 12 | 1 | 265 | my $dict = <$fh>; | ||||
| 13 | 1 | 16 | close $fh; | ||||
| 14 | 1 | 200 | $class->new($dict); | ||||
| 15 | } | ||||||
| 16 | |||||||
| 17 | 1; | ||||||
| 18 | __END__ |