At Thursday 3/29/2007 04:28 AM, Mathew Snyder wrote:
        while (my $user = $users->Next) {
            if ($user = $transaction->Creator) {
                $timeworked{$user} += $transaction->TimeTaken;
            }
            $environment{$environment}{$user->Name} = $timeworked{$user};
        }

In the if statement, you are setting $user to $transaction->Creator, which is an integer. So $user is no longer a User object and hence no Name method.

Also, a comment - in looking at the code I did get confused by the dual use of "environment" to represent a scalar variable and a hash - might be better for code maintenance to choose different names.

Steve
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to