I have determined the cause of the problem. Here are more details to the calls made for the problem seen when adding a new call in AA.pm to BB.pm.
AA.pm use strict use warning sub Abug1 {} sub Asub2 { BB::Bsub1(1,2,3); BB::Bsub2(hostname); # hostname is a "bareword" } sub Asub3 {}

Asub2() is only invoked at runtime via CGI::Applicaton run_modes(). The problem is that with "strict" enabled, barewords are not allowed as parameters to subroutine calls. Instead of reporting an error, the compilation is quietly aborted in the *next* subroutine when a single quote is found: resulting in all subsequent subroutines not being compiled. It also results in the program running for code that compiled and the offending subroutine working just fine. I could see that the other subroutines were missing in the debugger, I just couldn't figure out why. The key was running:

perl -MO=Terse AA.pm

It reports the offending line and where compilation is terminated. I'm glad I ignored the module description I found on perl.org:

"This module is useful for people who are writing their own back end, or who are learning about the Perl internals. It's not useful to the average programmer."

I expect that this is an unusual case because:

1. The resolution of the function doesn't occur until the specific web page is selected and is done as a string lookup.

2. The invocation of the subroutine is protected in "eval { }" so the program keeps on running.

Thanks for the input and I hope this can help someone in the future.


In reply to Re: CGI::Appl can't find sub by jimt999
in thread CGI::Appl can't find sub by jimt999

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.