Subject: | on_fail always dies in XS, but behaves properly in PP |
Date: | Mon, 3 Sep 2007 22:46:49 +0200 (CEST) |
To: | bug-Params-Validate [...] rt.cpan.org |
From: | Anonymous <cripto [...] ecn.org> |
the following example demonstrates inconsistency between XS
and PP regarding on_fail.
run with and without PV_TEST_PERL=1
--
use strict;
use warnings;
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::error, "\n";