Skip Menu |

This queue is for tickets about the XML-Bare CPAN distribution.

Report information
The Basics
Id: 127009
Status: new
Priority: 0/
Queue: XML-Bare

People
Owner: Nobody in particular
Requestors: dkurzelewski [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Founds few bugs in 0.53
Date: Fri, 31 Aug 2018 21:05:03 +0200
To: bug-XML-Bare [...] rt.cpan.org
From: Dariusz Kurzelewski <dkurzelewski [...] gmail.com>
Hi I found few bugs in XML-Bare v0.53 1. Documentation mistake in SYNOPS There is mention argument "schema" should be "scheme" 2. Running fixed code I've got error: # Load xml and verify against XBS ( XML Bare Schema ) my $xml_text = '<xml><item name=bob/></xml>'' my $schema_text = '<xml><item* name=[a-z]+></item*></xml>' my $ob = new XML::Bare( text => $xml_text, scheme => { text => $schema_text } ); $ob->parse(); # this will error out if schema is invalid Undefined subroutine &XML::Bare::Object::readxbs called at ../lib/XML/Bare.pm line 106. Object $ob is blessed as XML::Bare::Object but function "readxbs" is in XML::Bare package. #> cat s.pl use XML::Bare; use Data::Dumper; my $xml_text = '<xml><item names=b/></xml>'; my $schema_text = '<xml><item* name=[a-z]+></item*></xml>'; my $ob = new XML::Bare( text => $xml_text, scheme => { text => $schema_text } ); print Dumper $ob; $ob->parse(); # this will error out if schema is invalid #> perl s.pl $VAR1 = bless( { 'scheme' => { 'text' => '<xml><item* name=[a-z]+></item*></xml>' }, 'text' => '<xml><item names=b/></xml>', 'i' => 0, 'parser' => 30273376 }, 'XML::Bare::Object' ); Undefined subroutine &XML::Bare::Object::readxbs called at /usr/lib/x86_64-linux-gnu/perl5/5.22/XML/Bare.pm line 106. Dariusz Kurzelewski