CGI::Carp fatalsToBrowser alternative

Discussion in 'Perl Misc' started by Xho Jingleheimerschmidt, Mar 24, 2013.

  1. I'd like a kinder, gentler version of the die implemented by CGI::Carp
    qw(fatalsToBrowser), for calling explicitly when I detect invalid user
    input of some sort. I can use the existing features of CGI::Carp to
    change the footer for the message displayed, but can't seem to change
    the header of "Software error:" to be something more like "Invalid user
    input, please fix and try again:"

    I'd like to keep the other features of CGI::Carp's die if I can, like
    teeing to stderr with a timestamp, printing a header if necessary,
    protecting special characters in the message, and the things that I
    don't understand which seem to be designed to work with MOD_PERL.

    Is the best bet just to copy fatalsToBrowser and make some changes to
    the copy?

    Xho
     
    Xho Jingleheimerschmidt, Mar 24, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Louis Erickson
    Replies:
    2
    Views:
    224
    James Willmore
    Sep 3, 2003
  2. Jo Oberman
    Replies:
    5
    Views:
    234
    Ilya Zakharevich
    Sep 14, 2003
  3. Gunnar Hjalmarsson

    CGI::Carp and "useless quotes"

    Gunnar Hjalmarsson, Apr 4, 2004, in forum: Perl Misc
    Replies:
    12
    Views:
    226
    Gunnar Hjalmarsson
    Apr 16, 2004
  4. Moritz Karbach

    using CGI::Carp

    Moritz Karbach, Apr 26, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    181
    Tad McClellan
    Apr 26, 2005
  5. Bennett Haselton
    Replies:
    2
    Views:
    538
    Gunnar Hjalmarsson
    Mar 2, 2008
Loading...

Share This Page