Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 71725
Status: rejected
Priority: 0/
Queue: Params-Validate

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

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



Subject: Ugly failure message for reference type parameters
A reference type parameter like type => ARRAYREF gives an error message like The 'foo' parameter (\"ARRAY(0x817ca38)\") to action did not pass the 'array' callback
On Sun Oct 16 16:54:55 2011, GRAF wrote: Show quoted text
> A reference type parameter like > type => ARRAYREF > gives an error message like > > The 'foo' parameter (\"ARRAY(0x817ca38)\") to action did not pass the > 'array' callback
What would you prefer?
Subject: Re: [rt.cpan.org #71725] Ugly failure message for reference type parameters
Date: Sun, 16 Sep 2012 19:10:46 +0200
To: bug-Params-Validate [...] rt.cpan.org
From: Bernhard Graf <graf [...] movingtarget.de>
Hi Dave Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71725 > > > On Sun Oct 16 16:54:55 2011, GRAF wrote:
>> A reference type parameter like >> type => ARRAYREF >> gives an error message like >> >> The 'foo' parameter (\"ARRAY(0x817ca38)\") to action did not pass the >> 'array' callback
> > What would you prefer?
Omitting (\"ARRAY(0xXXX)\"). Actually I'd like to return the messages to the interface user, so personally I would prefer even lesser technical messages - something without "'array' callback" in this case, or no "did not pass regex check" elsewhere. A general "did not pass the parameter specification" is sufficiant to make the user RTFM. Bernhard
Subject: Re: [rt.cpan.org #71725] Ugly failure message for reference type parameters
Date: Sun, 16 Sep 2012 12:14:37 -0500 (CDT)
To: Bernhard Graf via RT <bug-Params-Validate [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Sun, 16 Sep 2012, Bernhard Graf via RT wrote: Show quoted text
>> On Sun Oct 16 16:54:55 2011, GRAF wrote:
>>> A reference type parameter like >>> type => ARRAYREF >>> gives an error message like >>> >>> The 'foo' parameter (\"ARRAY(0x817ca38)\") to action did not pass the >>> 'array' callback
>> >> What would you prefer?
> > Omitting (\"ARRAY(0xXXX)\"). > > Actually I'd like to return the messages to the interface user, so > personally I would prefer even lesser technical messages - something > without "'array' callback" in this case, or no "did not pass regex > check" elsewhere. A general "did not pass the parameter specification" > is sufficiant to make the user RTFM.
You could use the Moose type constraint system with MooseX::Params::Validate (or wait for me to release a production-ready Type distro). Both of these allow you to provide an error message generator with a type. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
I'm no longer going to make any non-bugfix changes to P::V so I'm closing old wishlist tickets.