Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] Suggestions (http://www.kinook.com/Forum/forumdisplay.php?f=4)
-   -   PerlScript support (http://www.kinook.com/Forum/showthread.php?t=199)

eric.zarko 09-24-2003 08:32 PM

PerlScript support
 
Consider adding "PerlScript" as a listed ProgId for scripts and adding the following XML chunk to VisBuildPro.System.scripts.



************************************************** ********************
The views and opinions expressed in this message are those of the author. The contents of this message have not been reviewed or approved by Intel.
************************************************** ********************

eric.zarko 11-05-2003 08:10 PM

Bugs in 5.1
 
Thanks for a great response in getting this added to 5.1 guys. Unf. you've got a few bugs.

First of all there are some typos in vbld_FileDateModified that break it completely.
614: "time" s/b "Time"
617: "time" s/b "Time", in date format need "M" not "m"
621: "time::local" s/b "Time::Local"

Second, you have 2 copies of vbld_AddDelimValue. The second should just override the first without really causing a problem, but it could cause maintenance issues for you in the future.

Finally, just a note on style. On lines 635 and 799(781 if you deal with #2 first) you have trailing "if" modifiers. It is not required but generally considered good style to add an extra prefix tab to make these really obvious.

************************************************** *********************
The views and opinions expressed in this message are those of the author. The contents of this message have not been reviewed or approved by Intel.
************************************************** *********************

kinook 11-05-2003 11:48 PM

Argh. The editor so helpfully lowercased those strings when they were pasted in (you'll probably want to disable the 'Fixup text case' option in the script editor right-click options dialog when editing PerlScript). The download has been updated with a fix for the typos (except that I couldn't see any formatting difference in the last two lines you mentioned).

eric.zarko 11-06-2003 12:52 PM

Quote:

Originally posted by kinook
Argh. The editor so helpfully lowercased those strings when they were pasted in (you'll probably want to disable the 'Fixup text case' option in the script editor right-click options dialog when editing PerlScript). The download has been updated with a fix for the typos (except that I couldn't see any formatting difference in the last two lines you mentioned).
I understand how finicky editors can be. I will watch out for it in the future.
As for the formatting difference, the issue is that in C/C++, Java, etc you can do this:
Code:

if(x < 1)
  x = 1;

In perl if you use this syntax you are required to use braces, like so:
Code:

if($x < 1)
{
  $x = 1;
}

In order to allow terser code they allow the modifier ... this is an if, while, etc conditional at the end of a statement, like so:
Code:

$x = 1 if($x < 1);
So, in order to emphasise this, if you break between the statement and the modifier you indent the modifer an extra level, like so:
Code:

$x = 1
  if($x < 1);

It is really minor since whitespace is free, so I wouldn't push another version just because of this. Incidentally this is done this way on lines 599, 743, 746 and 784.


All times are GMT -5. The time now is 12:22 PM.


Copyright 1999-2019 Kinook Software, Inc.