[Rt-commit] r12844 - in rt/branches/3.8-TESTING: .

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Jun 3 13:51:23 EDT 2008


Author: alexmv
Date: Tue Jun  3 13:51:22 2008
New Revision: 12844

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/t/ticket/linking.t

Log:
 r32447 at kohr-ah:  chmrr | 2008-06-03 13:50:40 -0400
  * Warnings avoidance


Modified: rt/branches/3.8-TESTING/t/ticket/linking.t
==============================================================================
--- rt/branches/3.8-TESTING/t/ticket/linking.t	(original)
+++ rt/branches/3.8-TESTING/t/ticket/linking.t	Tue Jun  3 13:51:22 2008
@@ -314,8 +314,11 @@
 ok($link->LocalBase   == $ticket->id,  "LocalBase   set correctly");
 ok($link->LocalTarget == $ticket2->id, "LocalTarget set correctly");
 
-*RT::NotTicket::Id = sub { return $$ };
-*RT::NotTicket::id = &RT::NotTicket::Id;
+{
+    no warnings 'once';
+    *RT::NotTicket::Id = sub { return $$ };
+    *RT::NotTicket::id = &RT::NotTicket::Id;
+}
 
 {
     package RT::URI::not_ticket;
@@ -327,7 +330,8 @@
 }
 
 my $orig_getresolver = \&RT::URI::_GetResolver;
-
+{
+    no warnings 'redefine';
     *RT::URI::_GetResolver = sub {
         my $self = shift;
         my $scheme = shift;
@@ -343,6 +347,7 @@
             $self->{'resolver'} = RT::URI::base->new($self->CurrentUser);
         }
     };
+}
 
 ($id,$msg) = $link->Create( Base => "not_ticket::$RT::Organization/notticket/$$", Target => $ticket2->URI, Type => 'MyLinkType' );
 ok($id, $msg);
@@ -364,8 +369,10 @@
 ok($link->LocalBase   == 0, "LocalBase set correctly");
 
 # restore _GetResolver
-*RT::URI::_GetResolver = $orig_getresolver;
-
+{
+    no warnings 'redefine';
+    *RT::URI::_GetResolver = $orig_getresolver;
+}
 
 sub link_count {
     my $file = shift;


More information about the Rt-commit mailing list