[Catalyst] [ANNOUNCE] CatalystX::DebugFilter

Brian Phillips bpphillips+ml at gmail.com
Mon Mar 29 21:07:04 GMT 2010


For those who have looked for this in the past, the Catalyst 5.80022 release
provided the appropriate hooks to allow custom filters to be applied to the
debug logs as well as the error screen.  This can be useful if you have
sensitive data (i.e. a password) that you don't want inadvertently ending up
in an plain text file or in your browser cache (of course, TMTOWTDI
applies).

Here's a simple example:

        package MyCatalystApp;
        use Moose;

        use Catalyst;
        extends 'Catalyst';
        with 'CatalystX::DebugFilter';

         __PACKAGE__->config(
            'CatalystX::DebugFilter' =3D> {
                # filter all parameters named "password" or whose names
match qr/SECRET/
                Request =3D> { params =3D> [ 'password', qr/SECRET/ ] },
             }
        );

There are other means to specify filters (including callbacks) that are
documented in the POD (which is still on its way through the intertubes at
the moment):
http://search.cpan.org/dist/CatalystX-DebugFilter/

Happy Catalyzing,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100329/5a129=
692/attachment.htm


More information about the Catalyst mailing list