<font face="courier new,monospace">I don't know if I'm doing this right, or in the best manner...<br><br>a) I have a compiler that generates Perl classes/source files based on data you feed it.<br>b) People then write applications that 'include' those source files.<br>
<br>Right now I have been using (for example) 'require "<a href="http://module1.pm">module1.pm</a>";' in the applications.<br>Which is great as long as I don't need to have the application run out of a<br>
non-current-working-directory.<br><br>But now I have a situation where the generated modules have 'use constant' in them<br>and I need to have the callers be able to use those constants easily.<br><br>At the moment they need to do $x = Module1::CONSTANT_1(); in order for it to work.<br>
Something more natural would be </font><font face="courier new,monospace">$x = Module1::CONSTANT_1; ie. without the parens.<br></font><br><font face="courier new,monospace">To do that I need to use export/import (right?)<br>
And the only way to do that is something like 'use module qw/</font><font face="courier new,monospace">CONSTANT_1/;<br><br>But then I'm using USE, not REQUIRE, and then the modules need to be installed<br>in a standard directory... and the problem then mushrooms.<br>
<br>Then I find out about 'use lib', but it only knows about explicitly defined<br>directories. And 'use lib' isn't any different than didling the @INC variable<br>anyway. And there doesn't seem to be an easy way of didling either to get it<br>
to include the 'invoked' directory (only the current-working-dirctory).<br><br>I figure its easier to ship the executable and its modules in a single<br>directory, than to ship the executable (where the user can put it anywhere<br>
they want) and then force the user to 'install' the remaining modules.<br><br><br>Whats a guy to do?<br>(Ah, statically compiled executables sure are looking easy right about now!)<br><br>Comments?<br>Fulko<br><br>
</font>