Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

mod_perl / Mason syntax errors silently ignored

by tomazos (Deacon)
on Sep 28, 2008 at 08:26 UTC ( [id://714142]=perlquestion: print w/replies, xml ) Need Help??

tomazos has asked for the wisdom of the Perl Monks concerning the following question:

I'm working on a Linux / Apache / mod_perl2 / HTML::Mason site and am having a problem getting error reports when a used perl module is not compiling (due to syntax errors for example).

As a test, I wrote a file with syntax errors, "MyTestGarbage.pm" and placed it in my library path.

When I use MyTestGarbage; from a normal .pl script it dies during compilation complaining of syntax errors as expected.

However when I include it from the <%init> section of a Mason component, Mason (or mod_perl) silently ignore the errors and keep running.

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.

I've tested die and warn and they show up just fine in the apache logs or the mason-generated error response page.

Does anyone have any idea why the module's compilation problems are not being reported, and if there is a way to see them?

Thanks,
Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

Replies are listed 'Best First'.
Re: mod_perl / Mason syntax errors silently ignored
by Anonymous Monk on Sep 28, 2008 at 08:43 UTC
Re: mod_perl / Mason syntax errors silently ignored
by andreas1234567 (Vicar) on Sep 29, 2008 at 06:11 UTC
    However when I include it from the <%init> section of a Mason component, Mason (or mod_perl) silently ignore the errors and keep running.
    Does moving the use statements to the autohandler mitigate the problem?
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://714142]
Approved by lamp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-20 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found