perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Class::Singleton dies on "warn"?
Date Fri, 21 Dec 2001 18:05:54 GMT


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.

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


Wes Sheldahl

View raw message