line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Video::Embed::Site::Youtu_be; |
2
|
11
|
|
|
11
|
|
7085
|
use Moo; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
89
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
extends 'HTML::Video::Embed::Site::Youtube'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub _build_domain_reg{ |
7
|
11
|
|
|
11
|
|
459
|
return qr/youtu\.be/; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _build_validate_reg{ |
11
|
1
|
|
|
1
|
|
547
|
return qr|^/([a-zA-Z0-9-_]{11})|; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub process{ |
15
|
6
|
|
|
6
|
0
|
11
|
my ( $self, $embeder, $uri ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
|
|
34
|
my ( $vid ) = $uri->path =~ m/${ \$self->validate_reg }/; |
|
6
|
|
|
|
|
99
|
|
18
|
6
|
|
|
|
|
223
|
return $self->_process( $embeder, $vid, $uri ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |