Subject: | on_fail always dies in XS even when PP does not |
Date: | Tue, 04 Sep 2007 11:19:05 +0900 |
To: | bug-Params-Validate [...] rt.cpan.org |
From: | "rob" <anonymous.0c630c2ac0 [...] anonymousspeech.com> |
As documented, on_fail should not die if the callback does not invoke die. The
ValidatePP works as documented, but ValidateXS always dies, even when not made
to do so. The following is an example script which works when PV_TEST_PERL is
set, but fails without it.
---
BEGIN {
package Foo;
our $error;
use Params::Validate qw(:all);
validation_options( on_fail => sub { $error = $_[0] } );
sub new {
my $class = shift;
validate( @_, { bar => 1 } );
}
}
my $foo = Foo->new;
#print $Foo::err, "\n";
***************************************************************
This email was sent via http://www.AnonymousSpeech.com,
the worlds leading <a href=http://www.anonymousspeech.com>anonymous email</a> provider.
Paid memberships do not show this footer message.
***************************************************************