You said...
Well, I don't quite follow your explanation (I'm not sure where set_message() appears - it's not in your sample code), so instead I'll just describe what happens.
Ooops... I forgot that I provided a code snippet rather than my "real" code... I started with the template that's in the CGI::Carp doc, which illustrates how to use set_message() by setting a function. In my live code, I use an if statement to test if the browser has a cookie that says whether to output error text, but forgot to include it in my code segment (to keep it brief). That's what I was referring to in my reply that you couldn't reconcile. Anyway, your explanation was perfectly clear, and confirms my explanation as well.
I will include my entire BEGIN block in a separate posting (which you can find in posting #421127), which takes a slightly different tack than my question here. The reason is that I have a separate, unrelated question.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.