I'll tell ya what I'm doing, then tell ya how I'd like to streamline it. This is wishful thinking, really - I've not thought about it from an implementation standpoint, so certainly shoot me down fiercely.
I've got a rather simple script that has three variables at the top:
my $date = "20040507"; my $id = "123"; my $name = "morbus";
For each .exe I need to create, those three variables change. My current workflow is as you'd expect: change the three vars, alt-tab, "pp -o 20040507-123-morbus script.pl", alt-tab, change the three vars, etc., etc., etc. After doing this about two hundred times over the last few weeks, I'd rather be doing something else with my time.
What I'd like, really, is some magical PAR inner variable thing, where I could go something like:
pp -VAR_DATE 20040507 -VAR_ID 123 -VAR_NAME morbus -o VAR_DATE-VAR_ID-VAR_NAME.exe script.pl
and then, within my script:
my $date = $ENV{PAR_VAR_DATE}; my $id = $ENV{PAR_VAR_ID}; my $name = $ENV{PAR_VAR_NAME};
Granted, the "you can do this right now" solution is to write up a second Perl script that just issues a few greps based on GetOpts, then exec's the PAR creation process. But, I'm less lazy to bust out a hundred words then I am twenty lines of new code (ha!). I suspect, however, that my wishful thinking would best be solved by just doing the twenty or so lines (anyone else interested in it? should be simple).
Has anyone gotten into a build regime of something similar: one script, minor changes for each .exe, repetitious building?
-- Morbus Iff ( i put the demon back in codemonkey ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus