Acme::CatalystX::ILoveDebug - Make all uris generated by an application trigger the debug page.


Acme-CatalystX-ILoveDebug documentation Contained in the Acme-CatalystX-ILoveDebug distribution.

Index


Code Index:

NAME

Top

Acme::CatalystX::ILoveDebug - Make all uris generated by an application trigger the debug page.

DESCRIPTION

Top

Frivolous Catalyst application class role to demonstrate a trivial application class role.

METHODS

Top

uri_for

Wraps the normal uri_for call, injecting a parameter of dump_info => 1 into the call so that all URIs generated will cause the debug screen..

AUTHOR

Top

Tomas Doran (t0m) <bobtfish@bobtfish.net>.

COPYRIGHT & LICENSE

Top


Acme-CatalystX-ILoveDebug documentation Contained in the Acme-CatalystX-ILoveDebug distribution.

package Acme::CatalystX::ILoveDebug;
use Moose::Role;
use namespace::autoclean;

our $VERSION = '0.01';

requires 'uri_for';

around uri_for => sub {
    my ($orig, $self) = (shift, shift);
    my $params = ref($_[-1]) eq 'HASH' ? pop @_ : {};
    $params->{dump_info} = 1;
    $self->$orig(@_, $params); 
};

1;