blib/lib/HTML/Video/Embed/Site/Youtu_be.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 7 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 10 | 12 | 83.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package HTML::Video::Embed::Site::Youtu_be; | ||||||
2 | 9 | 9 | 3712 | use Moo; | |||
9 | 11 | ||||||
9 | 39 | ||||||
3 | |||||||
4 | extends 'HTML::Video::Embed::Site::Youtube'; | ||||||
5 | |||||||
6 | our $VERSION = '0.016000'; | ||||||
7 | $VERSION = eval $VERSION; | ||||||
8 | |||||||
9 | sub domain_reg { | ||||||
10 | 10 | 10 | 0 | 50 | qr/youtu\.be/; | ||
11 | } | ||||||
12 | |||||||
13 | sub process { | ||||||
14 | 6 | 6 | 0 | 8 | my ( $self, $embeder, $uri ) = @_; | ||
15 | |||||||
16 | 6 | 19 | my ( $vid ) = $uri->path =~ m|^/([a-zA-Z0-9-_]{11})|; | ||||
17 | 6 | 68 | return $self->_process( $embeder, $vid, $uri ); | ||||
18 | } | ||||||
19 | |||||||
20 | 1; |