Subject: | [perl5.8.0/win32] Use of uninitialized value in length at Perl/site/lib/XML/Schema/Type/Builtin.pm line 197 |
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;
}