LinkEmbedder/Link/Pastebin.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 2 SCAR 15.4
CC
2
Cov
0%
_learn_from_dom
6.0
BEGIN
2.0
CRAP 4.7
1 package LinkEmbedder::Link::Pastebin;
2 use Mojo::Base 'LinkEmbedder::Link';
3  
4 has provider_name => 'Pastebin';
5 has provider_url => sub { Mojo::URL->new('https://pastebin.com') };
6  
7 sub _learn_from_dom {
8 my ($self, $dom) = @_;
9 $self->SUPER::_learn_from_dom($dom);
10  
11 if (my $e = $dom->at('.post-view textarea')) {
12 $self->{paste} = $e->text;
13 $self->template->[1] = 'paste.html.ep';
14 }
15 }
16  
17 1;