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
Download (untitled) / with headers
text/plain 333b
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
Download (untitled) / with headers
text/plain 581b
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.


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.