[Rt-commit] rtir branch, 2.6/perlcritic, updated. 2.6.0-31-g433b009

Alex Vandiver alexmv at bestpractical.com
Thu Jul 7 18:30:18 EDT 2011


The branch, 2.6/perlcritic has been updated
       via  433b009560690dcd15ccb6a7879353393e8f31c7 (commit)
      from  95f8acbb168afa67999c1f4dd3229a43e43aaa5b (commit)

Summary of changes:
 lib/RT/IR.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 433b009560690dcd15ccb6a7879353393e8f31c7
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jul 7 18:30:14 2011 -0400

    UNIVERSAL::isa($obj) is deprecated; replace with $obj->isa

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index aa3b4e1..90b2f3b 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -492,7 +492,7 @@ if ( RT::IR->HasConstituency ) {
     require RT::Record;
     # flush constituency cache on update of the custom field value for a ticket
     wrap 'RT::Record::_AddCustomFieldValue', pre => sub {
-        return unless UNIVERSAL::isa($_[0] => 'RT::Ticket');
+        return unless Scalar::Util::blessed($_[0]) and $_[0]->isa('RT::Ticket');
         $RT::IR::ConstituencyCache{$_[0]->id}  = undef;
     };
 
@@ -509,7 +509,7 @@ if ( RT::IR->HasConstituency ) {
             $_[-1] =  [$queue];
             return;
         }
-        if ( UNIVERSAL::isa( $self, 'RT::Ticket' ) ) {
+        if ( $self->isa('RT::Ticket') ) {
             my $const = $RT::IR::ConstituencyCache{ $self->id };
             if (!$const || $const eq '_none' ) {
                 my $systicket = RT::Ticket->new($RT::SystemUser);

-----------------------------------------------------------------------


More information about the Rt-commit mailing list