Ian, Thanks for the tips! Putting the scripts in the top level is a great idea.
As far as tasks vs functions, using functions and properties like this _felt_ nicer :-) And I use a echo task to actually write the file back out, I didn't provide a file::write function :-) Just a function to read the file in quickly into a property. I had attempted to use a foreach task to populate the property, but I ran into problems with adding linefeeds back (I don't know how to put a linefeed into a property), so I created this function to get a file in intact. As far as disregarding guidelines, I perfer to use built in tasks over custom anything. So if I can do the same thing with built in functions or tasks, I'd be happy to switch :-) John Cole -----Original Message----- From: Ian MacLean [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 10:03 PM To: John Cole >1) you don't need a script block for each function. You can >put multiple >function definitions in a single block - oh I see - you're using 2 >blocks to have 2 different prefixes. >2) By putting the script block/blocks at the top level it/they will >always be called - it you won't need to explicitly call the initregex >target. >3) as a general rule - for built in functions we try and ensure that >they are side-effect free and use custom tasks where somthing on the >system (eg a file ) needs to be changed. Of course you are free to >disregard this guideline in your own buildscripts where you just want to >get things working. ------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
