mandog has asked for the wisdom of the Perl Monks concerning the following question:
We're moving our SQL to a separate SQL::Library file, for the same sorts of reasons our HTML is in HTML::Template files.
We're also separating out our .pm files into a cpan package. We are feel standards-complaint and smug about running tests from t/ and listing dependencies in Build.PL. However, we haven't actually built the package yet.
Our application files *.pl, some static html, html templates are in a seperate directory. The application files depend on library but the library files (*.pm) & their tests shouldn't depend on the application files.
We could put the SQL::Library in the application conf dir, but then any (eventual) cpan module will have external dependencies.
We could put them in the same place as ..../lib-our-app/lib/*.pm. Then when our module is installed by cpan or make/make install, we'll have to search through @INC to find our SQL::Library file at runtime.
Thinking about it, the same reasoning applies to the HTML::Template files
I'm inclined to believe that a web application is a square peg for the round cpan module hole and that our application *.pm files should go in /var/lib/our-app-name/lib/ and our template and SQL::Library files should go in /var/lib/our-app-name/templates/
Thoughts?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: put SQL::Library file where?
by jakobi (Pilgrim) on Oct 03, 2009 at 18:11 UTC | |
Re: put SQL::Library file where?
by SilasTheMonk (Chaplain) on Oct 03, 2009 at 17:20 UTC | |
by mandog (Curate) on Oct 03, 2009 at 20:38 UTC | |
by mandog (Curate) on Oct 03, 2009 at 17:48 UTC | |
by SilasTheMonk (Chaplain) on Oct 03, 2009 at 18:52 UTC |