You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by ws...@lexmark.com on 2001/12/21 19:05:54 UTC

Class::Singleton dies on "warn"?


Hi,

I just started experimenting with Class::Singleton to store some static config
information. I subclassed it, put a couple test variables in it, and loaded in
my HTML::Mason page. Everything seemed fine. Then I added a simple warn
statement to the _instance_new() method so I could verify exactly when it got
instantiated from scratch, and it basically got treated like a "die" statement,
spewing the standard Mason stack trace that Mason normally does on run-time
errors. Is this a bug or a feature? The solution seems to be to avoid warning
statements like the plague in any Singleton objects.

Versions:
Apache:   1.3.20
mod_perl  1.26
perl      5.6.1
HTML::Mason    1.03
Class::Singleton    1.03
OS:       Linux, kernel 2.2.19

Thanks,

Wes Sheldahl