++ed by:
ABRAXXA WREIS

2 PAUSE users

יובל קוג'מן (Yuval Kogman)

NAME

Catalyst::Controller::LeakTracker - Inspect leaks found by Catalyst::Plugin::LeakTracker

SYNOPSIS

    # in MyApp.pm

        package MyApp;

        use Catalyst qw(
                LeakTracker
        );

        #### in SomeController.pm

        package MyApp::Controller::Leaks;
    use Moose;

    use parent qw(Catalyst::Controller::LeakTracker);

    sub index :Path :Args(0) {
        my ( $self, $c ) = @_;
        $c->forward("list_requests"); # redirect to request listing view
    }

DESCRIPTION

This controller uses Catalyst::Controller::LeakTracker to display leak info on a per request basis.

ACTIONS

list_requests

List the leaking requests this process has handled so far.

If the all parameter is set to a true value, then all requests (even non leaking ones) are listed.

request $request_id

Detail the leaks for a given request, and also dump the event log for that request.

object $request_id $event_id

Detail the object created in $event_id.

Displays a stack dump, a Devel::Cycle report, and a Data::Dumper output.

If the maxdepth param is set, $Data::Dumper::Maxdepth is set to that value.

make_leak [ $how_many ]

Artificially leak some objects, to make sure everything is working properly

CAVEATS

In forking environments each child will have it's own leak tracking. To avoid confusion run your apps under the development server or temporarily configure fastcgi or whatever to only use one child process.

TODO

This is yucky example code. But it's useful. Patches welcome.

Template::Declare

Instead of yucky HTML strings

CSS

I can't do that well, I didn't bother trying

Nicer displays
    <pre> ... </pre>

Only goes so far...

The event log is in most dire need for this.

Sorting, filtering etc

Of objects, requests, etc. Javascript or serverside, it doesn't matter.

JSON/YAML/XML feeds

Maybe it's useful for someone.

SEE ALSO

Devel::Events, Catalyst::Plugin::Leaktracker, http://blog.jrock.us/articles/Plugging%20a%20leaky%20whale.pod, Devel::Size, Devel::Cycle

VERSION CONTROL

http://github.com/nothingmuch/Catalyst-Controller-Leaktracker

AUTHOR

Yuval Kogman <nothingmuch@woobling.org>

COPYRIGHT & LICENSE

        Copyright (c) 2007 Yuval Kogman. All rights reserved
        This program is free software; you can redistribute it and/or modify it
        under the terms of the MIT license or the same terms as Perl itself.