Skip Menu |
 

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

Report information
The Basics
Id: 3283
Status: new
Priority: 0/
Queue: XML-Schema

People
Owner: Nobody in particular
Requestors: muenalan [...] cpan.org
Cc:
AdminCc:

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



Subject: [perl5.8.0/win32] Use of uninitialized value in length at Perl/site/lib/XML/Schema/Type/Builtin.pm line 197
Download (untitled) / with headers
text/plain 657b
In sub prepare $3 isnt filled always because its optional in the regexp. Code snippet appended. Greetings, Murat --- sub prepare { my ($instance, $type) = @_; my $value = $instance->{ value }; return $type->error('value is empty') unless length $value; return $type->error("value is not a decimal") unless $value =~ / ^ ([+-])? # sign ($1) 0*(\d+) # integer ($2) (?:\.(\d+)0*)? # fraction ($3) $ /x; @$instance{ qw( sign integer fraction ) } = ($1, $2, $3); $instance->{ scale } = length $3; $instance->{ precision } = $instance->{ scale } + length $2; return 1; }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.