|Keep It Simple, Stupid|
put SQL::Library file where?by mandog (Curate)
|on Oct 03, 2009 at 14:05 UTC||Need Help??|
mandog has asked for the
wisdom of the Perl Monks concerning the following question:
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/