perlquestion
tomazos
I'm working on a Linux / Apache / mod_perl2 / HTML::Mason site and am having a problem getting error reports when a <code>use</code>d perl module is not compiling (due to syntax errors for example).
<p>
As a test, I wrote a file with syntax errors, "MyTestGarbage.pm" and placed it in my library path.
<p>
When I <code>use MyTestGarbage;</code> from a normal .pl script it dies during compilation complaining of syntax errors as expected.
<p>
However when I include it from the <code><%init></code> section of a Mason component, Mason (or mod_perl) silently ignore the errors and keep running.
<p>
I don't find out it hasn't loaded until I actually try to use the syntax errored module and find missing functions in its namespace.
<p>
I've tested die and warn and they show up just fine in the apache logs or the mason-generated error response page.
<p>
Does anyone have any idea why the module's compilation problems are not being reported, and if there is a way to see them?
<p>
Thanks,<br>
Andrew.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-78023">
<hr>Andrew Tomazos | <a href="mailto:andrew@tomazos.com">andrew@tomazos.com</a> | <a href="http://www.tomazos.com">www.tomazos.com</a>
</div></div>