[Rt-commit] rt branch, 4.2/crontool-module-load, created. rt-4.2.3-87-gf11200d

Alex Vandiver alexmv at bestpractical.com
Fri Apr 18 18:52:27 EDT 2014


The branch, 4.2/crontool-module-load has been created
        at  f11200de8e12bc55d5de8be3436e5a09409cff30 (commit)

- Log -----------------------------------------------------------------
commit f11200de8e12bc55d5de8be3436e5a09409cff30
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Apr 18 18:51:04 2014 -0400

    Failure to store $@ immediately could cause wrong diagnostics to be printed
    
    Fixes I#22991.

diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 18f2790..30833e8 100644
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -292,8 +292,10 @@ sub get_template {
 sub load_module {
     my $modname = shift;
     eval "require $modname";
-    if ($@) {
-        die loc( "Failed to load module [_1]. ([_2])", $modname, $@ );
+    my $err = $@;
+    if ($err) {
+        chomp $err;
+        die loc( "Failed to load module [_1]. ([_2])", $modname, $err );
     }
 
 }

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


More information about the rt-commit mailing list