This is so obvious that I'm probably the last person to have thought of it, but perhaps there are two or three new people out there who would benefit from it. Occasionally, I find it necessary to compile a PT from the command line (or even to compile to ocode and step through that with the debugger) to figure out some subtle error in logic. The big hassle in doing that is always making sure that one gets the arguments to iwpt_compile.ipl correct.
Yesterday, it finally hit me - why not have the TPL tell me what command was used when I generated with it?
So, in an iw_perl near the top I added:
my $foo = $0 . " " . (join " ", @ARGV);
later on, I output the value of $foo:
{iw_value name='$foo' /}
One simple cut'n'paste and I have my command.