File Coverage

blib/lib/WWW/Crawl4AI/Strategy/Plain.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 2 3 66.6
total 17 18 94.4


line stmt bran cond sub pod time code
1             package WWW::Crawl4AI::Strategy::Plain;
2             # ABSTRACT: cheapest Crawl4AI strategy — headless text mode, no escalation
3 2     2   10 use Moo;
  2         2  
  2         9  
4 2     2   523 use WWW::Crawl4AI::Request ();
  2         3  
  2         208  
5             with 'WWW::Crawl4AI::Strategy';
6              
7             our $VERSION = '0.001';
8              
9              
10 64     64 1 278 sub name { 'crawl4ai_plain' }
11              
12              
13 25     25 1 374 sub cost_class { 'cheap' }
14              
15              
16             sub build_request {
17 25     25 0 36 my ( $self, $crawler, $url ) = @_;
18 25         65 return $self->_request(
19             $url,
20             browser => { text_mode => WWW::Crawl4AI::Request::JSON_true() },
21             );
22             }
23              
24             1;
25              
26             __END__