Subject: | Typo in XML::Validator::Schema::SimpleType |
Date: | Wed, 22 Mar 2017 14:55:34 +0000 |
To: | <bug-XML-Validator-Schema [...] rt.cpan.org> |
From: | Nik Mitev <nik.mitev [...] jisc.ac.uk> |
Subject: | Typo in XML::Validator::Schema::SimpleType |
To: | bug-XML-Validator-Schema [...] rt.cpan.org |
From: | Nik Mitev <nik.mitev [...] jisc.ac.uk> |
Hi,
As distributed the module died with
"Found illegal restriction 'enumeration' on type derived from 'decimal'"
On inspection found a typo which when corrected fixes the error:
---
a/perls/perl-5.22.3/lib/site_perl/5.22.3/XML/Validator/Schema/SimpleType.pm
+++
b/perls/perl-5.22.3/lib/site_perl/5.22.3/XML/Validator/Schema/SimpleType.pm
@@ -326,7 +326,7 @@ sub restrict {
# is this a legal restriction? (base types can do whatever they
want
_err("Found illegal restriction '$key' on type derived from
'$root->{name}'.")
unless ($self == $root) or
- ($FACET{$key} & $root->{facets});
+ ($FACET{$key} && $root->{facets});
push @{$self->{restrict}{$key} ||= []}, $value;
}
Nik
--
Nik Mitev
eduroam UK Technical Support, Jisc
www.eduroam.uk
Message body not shown because it is not plain text.