blib/lib/AxKit/Provider/HTML.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 # $Id: HTML.pm,v 1.1.1.1 2002/05/29 22:03:41 matt Exp $
2  
3 package AxKit::Provider::HTML;
4  
5 @ISA = qw(Apache::AxKit::Provider::File);
6 $VERSION = '1.0';
7  
8 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use XML::LibXML;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 0 ▶use Apache::AxKit::Provider::File;
Subroutine BEGIN: called CC=1 SCAR=2.6
11 use Apache::AxKit::Exception;
12  
13 sub get_fh {
14 throw Apache::AxKit::Exception ( -text => "get_fh not supported for HTML provider" );
15 }
16  
17 sub get_strref {
18 my $self = shift;
19
20 my $file = $self->{file};
21 my $parser = XML::LibXML->new();
22 my $doc = $parser->parse_html_file($file);
23 my $str = $doc->toString;
24 return \$str;
25 }
26  
27 1;
28 __END__
↑ Summary