use strict;
use Catalyst qw/
- MangleDollarUnderScore
+ Test::MangleDollarUnderScore
Test::Errors
Test::Headers
Test::Plugin
/;
use Catalyst::Utils;
+use Moose;
+use namespace::autoclean;
+
our $VERSION = '0.01';
TestApp->config( name => 'TestApp', root => '/some/dir' );
+if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
+ with 'CatalystX::LeakChecker';
+
+ has leaks => (
+ is => 'ro',
+ default => sub { [] },
+ );
+}
+
+sub found_leaks {
+ my ($ctx, @leaks) = @_;
+ push @{ $ctx->leaks }, @leaks;
+}
+
+sub count_leaks {
+ my ($ctx) = @_;
+ return scalar @{ $ctx->leaks };
+}
+
TestApp->setup;
sub index : Private {
@executed
);
}
-
+ no warnings 'recursion';
return $c->SUPER::execute(@_);
}
sub recursion_test : Local {
my ( $self, $c ) = @_;
+ no warnings 'recursion';
$c->forward( 'recursion_test' );
}