I have a web application that uses a parser created with Parse::RecDescent. A parser object is needed in several parts of the application and since the parser takes quite a bit of memory I have up to now treated the parser object as a singleton. This works well in a pure CGI environment since only one expression is parsed by the same object at one time. I am however unsure if this will still work when running in an environment where the same object parser is parsing more than one string at the time.
For instance if I try to run the application under FastCGI can it it become a problem if two request at the same time use the same parser object to parse to different strings?
If I need to I can change the application so that the parser is no longer a singleton, however I would prefer not as the current solution is simpler.