In theory, with reasonably well-behaved modules, you can put all the code in the same file, provided you put all the modules in in the right order. Note that a use Module::Name arguments; statement also calls Module::Name->import( arguments ) so you'd have to replace the use statements with import() calls.
There might be issues with modules that use tricks in BEGIN blocks, or rely on being called during a BEGIN block.
As a side note, have you seen PAR?
| [reply] [d/l] [select] |
You can use the code in @INC feature to put the code for all the modules in a single file. Also, I've "always" used PAR to create platform (i.e. Windoze) specific executables, but ISTR it has the capability of also doing exactly what you're after.
| [reply] [d/l] |
| [reply] |
For the lazy (it's a virtue right?) among us, the key node returned by the Super Search referred to above is RFC: feature proposal re code in @INC.
Well, I'm not sure if that is the "key" node. Actually that's one of my favourite features and I'm confident that quite about anywhere I talked about "code" and @INC I was talking about code-in-@INC. Such is the case with that node, that in turn is highly speculative. OTOH in some of the other hits I may have included real code examples.
| [reply] [d/l] [select] |