[rt-users] Error in "RT Essentials" book.

Joby Walker joby at u.washington.edu
Wed Nov 2 14:48:37 EST 2005


It is an error but the two statements in the book are equivalent:

pg 88

if ($Transaction->CreatorObj->id != $RT::Nobody->id){}

pg 89

unless ($Transaction->CreatorObj->id == $RT::Nobody->id){}


Different ways to check for the same negative; "if this is not true" vs.
"unless this is true".

Joby Walker
ITI SSG, University of Washington


Shaun T. Erickson wrote:
> On page 88, it describes how to modify the autoreply template to give
> the user a password if they don't already have one. In the modified
> template listed, the first part of the new code starts off as:
> 
> if ( $Transaction->CreatorObj->id != $RT::Nobody->id
> 
> but on page 89, where they discuss that new code, they replaced the 'if'
> with 'unless'.
> 
> Which is it?
> 
> -- 
>         -ste
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> 
> Buy your copy of our new book, RT Essentials, today! 
> 
> Download a free sample chapter from http://rtbook.bestpractical.com



More information about the rt-users mailing list