Schema/TypeLibrary.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.3% 26 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/ElementLibrary.pm ↑ Summary
1 package XML::Validator::Schema::TypeLibrary;
2 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 ▶use XML::Validator::Schema::Util qw(XSD _err);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use XML::Validator::Schema::SimpleType;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use base 'XML::Validator::Schema::Library';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 =head1 NAME
10  
11 XML::Validator::Schema::TypeLibrary
12  
13 =head1 DESCRIPTION
14  
15 Internal module used to implement a library of types, simple and
16 complex.
17  
18 =head1 USAGE
19  
20 # get a new type library, containing just the builtin types
21 $library = XML::Validator::Schema::TypeLibrary->new();
22  
23 # add a new type
24 $library->add(name => 'myString',
25 ns => 'http://my/ns',
26 obj => $type_obj);
27  
28 # lookup a type
29 my $type = $library->find(name => 'myString',
30 ns => 'http://my/ns');
31  
32 =cut
33  
34 52 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
35 52 my $pkg = shift;
36 52 my $self = $pkg->SUPER::new(what => 'type', @_);
37
38 # load builtin simple types into XSD namespace
39 52 $self->{stacks}{XSD()} = { %XML::Validator::Schema::SimpleType::BUILTIN };
40  
41 52 return $self;
42 }
43  
44  
45  
46 6 1;
47  
« Schema/ElementLibrary.pm ↑ Summary