Skip Menu |

This queue is for tickets about the Data-Domain CPAN distribution.

Report information
The Basics
Id: 71188
Status: resolved
Priority: 0/
Queue: Data-Domain

People
Owner: Nobody in particular
Requestors: timk [...] jtse.com
Cc:
AdminCc:

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



Subject: Data::Domain::String accepts non-scalar data
With the following code: my $errors = String()->inspect({}); $errors will be undef. It ought to be an INVALID error message. Code like the following should be added near the top of Data::Domain::String::_inspect: not ref $data or return $self->msg(INVALID => 'non-string data of type '.ref($data)); -TimK
Le Ven 23 Sep 2011 10:06:03, timk a écrit : Show quoted text
> With the following code: > > my $errors = String()->inspect({}); > > $errors will be undef. It ought to be an INVALID error message. > > Code like the following should be added near the top of > Data::Domain::String::_inspect: > > not ref $data > or return $self->msg(INVALID => 'non-string data of type > '.ref($data)); > > -TimK
Thanks -- fixed in v0.15, just shipped to CPAN. Non-scalar data will still be accepted if it is an object with a stringification operator; otherwise it will be rejected.