package TestApp::Controller::Leaktest; use strict; use warnings; use Moose; use utf8; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller' } sub index :Path :Args(0) { my ($self, $context) = @_; my $model = $context->model(); $c->response->body(""); $c->response->status(400); 1; } sub modules :Local { my( $self, $c, @path ) = @_; { no strict; # We're accessing $VERSION by symbolic reference no warnings 'uninitialized'; # The $VERSION might not be defined $c->response->body(join "\n", map { s!/!::!g; # We're getting a file name... s!.pm$!!; # ...and want a module name sprintf "%-80s %s", $_, ${"${_}::VERSION"} } sort keys %INC); } $c->response->content_type("text/plain"); $c->stash->{current_view} = 'Nop'; 1; } sub exit :Local :Args(0) { exit(0); } 1;