iaw4 has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a little website with Mojolicious::Lite (highly recommended, even though the docs are not great, yet; the package itself is).
I am wondering whether it makes sense to stick each webpage (which is roughly a get '/webpage' => sub { ... }) into its own .pl file. because they are more like .pl files than .pm files, I could glob through the directory for .pl files and then concat and eval them.
Numerical Recipees in C/Fortran/etc. organized itself roughly like this, too.
I am probably not the first to run into this issue. What is the best practice here?
/iaw
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple Perl Files, Each With 1 Sub?
by chromatic (Archbishop) on Jan 17, 2012 at 20:29 UTC | |
|
Re: Multiple Perl Files, Each With 1 Sub?
by perlson (Initiate) on Jan 18, 2012 at 16:53 UTC | |
|
Re: Multiple Perl Files, Each With 1 Sub?
by Anonymous Monk on Jan 19, 2012 at 04:33 UTC |