Evaluate is slow - comparatively. It isn't horrible though. The main reason I will complain about evaluate is when it isn't strictly necessary. Technically it isn't in your case. You could break up the string into parts and check the existence of each - but I think your code is fine (and a hell of a lot simpler).
On Mon, Jun 14, 2010 at 9:44 AM, Tom King <mailingli...@oxalto.co.uk> wrote: > > nevermind - found the solution! > > ended up with: > > <cffunction name="checkPermission"> > <cfargument name="path"> > <cfif IsDefined('session.currentUser.permissions.' & > arguments.path)> > <cfif evaluate('session.currentUser.permissions.' & > arguments.path)> > <cfreturn true> > <cfelse> > <cfreturn false> > </cfif> > <cfelse> > <cfreturn false> > </cfif> > </cffu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334533 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm