spatterson has asked for the wisdom of the Perl Monks concerning the following question:
Hi, has anyone used mod_perl with AppConfig or Exporter? I'm having some rather mad intermittent errors.
I've written a DB based photo gallery system, using mod_perl2 and Apache2.
There's a core module 'Gallery.pm', package Gallery which handles
database and filesystem access, a frontend module 'Frontend.pm', no set
package, which generates the display . These are in a common include
directory.
Each site has its own index.pl to decide which subs from Frontend to call (i.e. whether to show an image, a set of search results etc).
I have a couple of intermittent problems
Gallery.pm exports all its subs using Exporter, they are only ever called by Frontend.pm
require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw/insert_image search exif image_tags all_tags path login_ok get_unique_filename check_md5_collision title/;
Frontend.pm exports its subs using Expoter too, they're only called by index.pl.
require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw/try_cookie frame_images entrypage tagpage imagepage rawthumb login logout/;
index.pl also uses AppConfig to load a config file containing database connection details, a few paths and page titles etc.
Hopefully this all makes sense, does anyone have any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Intermittent trouble with mod_perl, Apache2, AppConfig and Exporter
by perrin (Chancellor) on Jun 24, 2008 at 18:59 UTC |