[Catalyst] Tests fail installing Catalyst::Controller::FormBuilder

Chisel Wright chisel at herlpacker.co.uk
Tue May 5 21:05:49 GMT 2009


On Tue, May 05, 2009 at 11:46:49AM -0700, Louis Erickson wrote:
> t/01-basic.........TestApp::Component::TT is trying to use NEXT, which is
> deprecated. Please see the Class::C3::Adopt::NEXT documentation for details
> at
> /Users/davebowers/.cpan/build/Catalyst-Controller-FormBuilder-0.04/t/lib/Tes
> tApp/Component/TT.pm line 19

I cleverly based some of my own test libraries in the
TestApp::Component::* modules from FormBuilder.

My fixed TestApp::Component::TT ended up looking like this:

---- cut here ----
package # hide from PAUSE
    TestApp::Component::TT;
# vim: ts=8 sts=4 et sw=4 sr sta
use strict;
use warnings;
use base 'Catalyst::View::TT';

use Class::C3;

sub new {
    my $self = shift;
    $self->config(
        {
            INCLUDE_PATH => [
                TestApp->path_to( 'root', 'src', 'tt2' ),
                TestApp->path_to( 'root', 'lib', 'tt2' ),
            ],
            TEMPLATE_EXTENSION => '.tt',
            CATALYST_VAR       => 'Catalyst',
            TIMER              => 0,
        }
    );

    return $self = $self->next::method(@_) if $self->next::can;

    return $self;
}
---- cut here ----

I'm sure I've screwed up somewhere, but all my tests pass (again) after
this change (which you may need in the other Component::* classes under
t/lib


-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  It's just a motivational meeting. I don't care if I miss it.



More information about the Catalyst mailing list