Skip Menu |

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

Maintainer(s)' notes

This is the bug queue for Data::FormValidator.

Report information
The Basics
Id: 17545
Status: resolved
Priority: 0/
Queue: Data-FormValidator

People
Owner: Nobody in particular
Requestors: frank [...] planet-interview.de
Cc:
AdminCc:

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



Subject: overload bug with Template::Stash
Using a DFV::Results object in a TT template dies: Operation `eq': no method found, left argument in overloaded package Data::FormValidator::Results, right argument has no overloaded magic at /usr/local/lib/perl/5.8.7/Template/Stash.pm line 582. It breaks only when using Template::Stash as TT stash (not with Template::Stash::XS!). A test case is attached, the fix is here: --- lib/Data/FormValidator/Results.pm 2006-01-06 03:11:00.000000000 +0100 +++ lib/Data/FormValidator/Results.pm.new 2006-02-08 21:24:35.000000000 +0100 @@ -21,7 +21,8 @@ use Data::FormValidator::Constraints (qw/:validators :matchers/); use vars qw/$AUTOLOAD $VERSION/; use overload - 'bool' => \&_bool_overload_based_on_success; + 'bool' => \&_bool_overload_based_on_success, + fallback => 1; $VERSION = 4.10;
Subject: tt_and_overload.t
use Test::More; use Data::FormValidator; eval 'use Template; use Template::Stash'; plan skip_all => 'Template Toolkit required' if $@; my $results = Data::FormValidator->check( {}, {required => 1} ); my $tt = Template->new( STASH => Template::Stash->new ); $tt->process( \'[% form.missing %]', {form => $results}, \my $out ); if ( $tt->error ) { plan tests => 1; unlike $tt->error->info, qr/Operation `eq': no method found/, 'missing fallback in DVF::Results'; }
Subject: Re: [rt.cpan.org #17545] overload bug with Template::Stash
Date: Wed, 8 Feb 2006 16:18:06 -0500
To: Guest via RT <bug-Data-FormValidator [...] rt.cpan.org>
From: Mark Stosberg <mark [...] summersault.com>
On Wed, Feb 08, 2006 at 03:26:23PM -0500, Guest via RT wrote: Show quoted text
> > Using a DFV::Results object in a TT template dies: > > Operation `eq': no method found, > left argument in overloaded package Data::FormValidator::Results, > right argument has no overloaded magic at > /usr/local/lib/perl/5.8.7/Template/Stash.pm line 582. > > It breaks only when using Template::Stash as TT stash (not with > Template::Stash::XS!).
Thanks, I'll try to get a release out with this soon. Mark
I've now uploaded 4.13, which includes this fix. Thanks. Mark