This is a CGI Perl application. Components I have are main script (main.pl) and a module I import at the top of the script (use somemodule;). I call a subroutine within the module, passing it all the parameters it needs. In the main script I create an anonymous subroutine and pass it to a subroutine within the module such as :
$anonyFunc = sub { my ($aFirst, $aLast, ....) = @_; }; ... somemodule::subname(..... , $anonyFunc.......);
In the subroutine I call I then try using the subroutine that was passed such as :
$passedFunction->($firstParm $secondParm,.....);
When I run my application and leave out the above line of the call to the anonymous function passed it does everything and finished (except what's in the anonymous function of course). If I include that line the CGI application just returns with a blank page. I can't post the source code but was hoping someone has experienced this before and what is the normal, typical cause of an anoymous function like this not to work? Is there something I can put in the code to help debug it? Any help would be appreciated. Thanks.

In reply to Anonymous subroutine by rpike

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.