WWW/Scraper/Opcode/BR.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.0
CC
2
Cov
0%
scrape
6.0
newX
2.0
BEGIN
2.0
CRAP 3.3
1  
2 use strict;
3  
4 package WWW::Scraper::Opcode::BR;
5 use base qw(WWW::Scraper::Opcode);
6 use vars qw($VERSION);
7  
8 # new() Scraper::Opcode
9 # $cls - Op class
10 # $scaffold - current scaffold
11 # $params - ref to array of parames in the 'OP()' portion of the scaffold.
12 sub newX {
13 my ($cls, $scaffold, $params) = @_;
14 my $self = bless {};
15 $self->{'fieldsDiscovered'} = ['content'];
16 return $self;
17 }
18  
19 sub scrape {
20 my ($self, $scraper, $scaffold, $TidyXML, $hit) = @_;
21
22 my $sub_string = ${$TidyXML->asString()};
23 return undef unless $sub_string =~ s{(<BR>(.*?))<BR>}{}gsi;
24 my $dat = $2;
25 $hit->description(\$dat);
26  
27 return ($self->_next_scaffold($scaffold), $sub_string, undef);
28 }
29  
30  
31 1;