[Rt-commit] r7793 - rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api
clsung at bestpractical.com
clsung at bestpractical.com
Tue May 8 23:09:41 EDT 2007
Author: clsung
Date: Tue May 8 23:09:41 2007
New Revision: 7793
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attribute.t
Log:
- add 'use strict; use warnings;'
- using 'my ($id) ....' will cause:
[warning]: "my" variable $id masks earlier declaration in same scope at t/api/attribute.t
and the result will be unpredicted.
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attribute.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attribute.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attribute.t Tue May 8 23:09:41 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -34,7 +36,7 @@
is ($attr2->SubValue('Format'), 'This is a format');
$attr2->Delete;
my $attr3 = RT::Attribute->new($RT::SystemUser);
-my ($id) = $attr3->Load($id);
+($id) = $attr3->Load($id);
is ($id, 0);
More information about the Rt-commit
mailing list