[freeside-commits] freeside/rt/lib RT.pm, 1.10, 1.11 RT.pm.in, 1.4, 1.5

Ivan,,, ivan at wavetail.420.am
Wed Feb 16 16:52:27 PST 2011


Update of /home/cvs/cvsroot/freeside/rt/lib
In directory wavetail.420.am:/tmp/cvs-serv29643/lib

Modified Files:
	RT.pm RT.pm.in 
Log Message:
commiting rt 3.8.9 to HEAD

Index: RT.pm.in
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT.pm.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- RT.pm.in	18 May 2010 19:58:39 -0000	1.4
+++ RT.pm.in	17 Feb 2011 00:52:25 -0000	1.5
@@ -2,8 +2,8 @@
 # 
 # COPYRIGHT:
 # 
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-#                                          <jesse at bestpractical.com>
+# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
 # 
 # (Except where explicitly superseded by other copyright notices)
 # 
@@ -401,13 +401,20 @@
         die sprintf "RT requires Perl v5.8.3 or newer.  Your current Perl is v%vd\n", $^V; 
     }
 
-    local ($@);
+    # use $error here so the following "die" can still affect the global $@
+    my $error;
+    {
+        local $@;
     eval { 
         my $x = ''; 
         my $y = \$x;
-        require Scalar::Util; Scalar::Util::weaken($y);
+            require Scalar::Util;
+            Scalar::Util::weaken($y);
     };
-    if ($@) {
+        $error = $@;
+    }
+
+    if ($error) {
         die <<"EOF";
 
 RT requires the Scalar::Util module be built with support for  the 'weaken'
@@ -487,7 +494,10 @@
         my $scrips = RT::Scrips->new($RT::SystemUser);
         $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
         while ( my $scrip = $scrips->Next ) {
-            $scrip->LoadModules;
+            local $@;
+            eval { $scrip->LoadModules } or
+                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ".
+                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");
         }
 
 	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {

Index: RT.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- RT.pm	18 May 2010 19:58:39 -0000	1.10
+++ RT.pm	17 Feb 2011 00:52:25 -0000	1.11
@@ -2,8 +2,8 @@
 # 
 # COPYRIGHT:
 # 
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-#                                          <jesse at bestpractical.com>
+# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
 # 
 # (Except where explicitly superseded by other copyright notices)
 # 
@@ -57,7 +57,7 @@
 
 use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE);
 
-our $VERSION = '3.8.8';
+our $VERSION = '3.8.9';
 
 
 
@@ -401,13 +401,20 @@
         die sprintf "RT requires Perl v5.8.3 or newer.  Your current Perl is v%vd\n", $^V; 
     }
 
-    local ($@);
+    # use $error here so the following "die" can still affect the global $@
+    my $error;
+    {
+        local $@;
     eval { 
         my $x = ''; 
         my $y = \$x;
-        require Scalar::Util; Scalar::Util::weaken($y);
+            require Scalar::Util;
+            Scalar::Util::weaken($y);
     };
-    if ($@) {
+        $error = $@;
+    }
+
+    if ($error) {
         die <<"EOF";
 
 RT requires the Scalar::Util module be built with support for  the 'weaken'
@@ -487,7 +494,10 @@
         my $scrips = RT::Scrips->new($RT::SystemUser);
         $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
         while ( my $scrip = $scrips->Next ) {
-            $scrip->LoadModules;
+            local $@;
+            eval { $scrip->LoadModules } or
+                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ".
+                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");
         }
 
 	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {



More information about the freeside-commits mailing list