Mercurial > pub > Impl
diff Lib/IMPL/DOM/Schema.pm @ 232:5c82eec23bb6
Fixed degradations due refactoring
author | sergey |
---|---|
date | Tue, 09 Oct 2012 20:12:47 +0400 |
parents | 6d8092d8ce1b |
children | 7c517134c42f |
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Schema.pm Tue Oct 09 03:09:41 2012 +0400 +++ b/Lib/IMPL/DOM/Schema.pm Tue Oct 09 20:12:47 2012 +0400 @@ -17,7 +17,7 @@ Builder => 'IMPL::DOM::Navigator::Builder', XMLReader => 'IMPL::DOM::XMLReader', InflateFactory => 'IMPL::DOM::Schema::InflateFactory', - Loader => 'Code::Loader' + Loader => 'IMPL::Code::Loader' }; use parent qw(IMPL::DOM::Document); @@ -55,7 +55,10 @@ if ($class->isa('IMPL::DOM::Schema::Validator')) { $class = $validatorLoader->GetFullName($nodeName); unless (eval {$class->can('new')}) { - $validatorLoader->Require($nodeName); + eval { + $validatorLoader->Require($nodeName); + }; + my $e = $@; die new IMPL::Exception("Invalid validator",$class,$e) if $e; } } @@ -88,7 +91,7 @@ my $class = ref $this || $this; - my $reader = Reader->( + my $reader = XMLReader->new( Navigator => Builder->new( $class, $class->MetaSchema @@ -129,7 +132,7 @@ return $schema if $schema; - $schema = Schema->new(); + $schema = __PACKAGE__->new(); $schema->appendRange( ComplexNode->new(name => 'schema')->appendRange( @@ -199,7 +202,7 @@ AnyNode->new(maxOccur => 'unbounded', minOccur => 0, type=>'Validator') ), Property->new(name => 'type'), - Property->(name => 'inflator', optional => 1, inflator => 'IMPL::DOM::Schema::InflateFactory') + Property->new(name => 'inflator', optional => 1, inflator => 'IMPL::DOM::Schema::InflateFactory') ), ComplexType->new(type => 'SimpleNode', nativeType => 'IMPL::DOM::Schema::SimpleNode')->appendRange( NodeList->new()->appendRange(