File Coverage

blib/lib/RDF/Simple/Parser/Attribs.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition 1 3 33.3
subroutine 4 4 100.0
pod 0 1 0.0
total 21 24 87.5


line stmt bran cond sub pod time code
1              
2             package RDF::Simple::Parser::Attribs;
3              
4 8     8   55 use Carp;
  8         18  
  8         454  
5 8     8   51 use Data::Dumper;
  8         16  
  8         374  
6              
7             # Use a hash to implement objects of this type:
8             use Class::MethodMaker [
9 8         62 scalar => [ qw( qnames x ) ],
10 8     8   4360 ];
  8         135122  
11              
12             our
13             $VERSION = 1.31;
14              
15             sub new {
16 104     104 0 1080 my ($class, $attrs) = @_;
17              
18 104   33     469 my $self = bless {}, ref $class || $class;
19 104         183 while (my ($k,$v) = each %{$attrs}) {
  187         713  
20              
21 83         199 my ($p,$n) = ($v->{NamespaceURI},$v->{LocalName});
22 83         351 $self->{$p.$n} = $v->{Value};
23             }
24 104         254 return $self;
25             }
26              
27             1;