[SCM] Interchange branch, master, updated. 9f9d7c578da699776722641ec3c1edd4b51f3a99

Jon Jensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange".

The branch, master has been updated
       via  9f9d7c578da699776722641ec3c1edd4b51f3a99 (commit)
      from  bcf1ee92ace67afe84ee7ce96abad9809d98aeaa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9f9d7c578da699776722641ec3c1edd4b51f3a99
Author: Jon Jensen <[email protected]>
Date:   Sat Jun 27 17:38:50 2009 +0200

    Abort daemon startup when required module is missing and clean up error output
    
    Fix problem with eval $@ error result's scope in global Perl module
    require routine. This was caused because logGlobal contains an eval
    itself that overrides $@. Now when a "Require module Something::Special"
    directive is issued and not satisfied, it is fatal as was originally
    intended.
    
    Remove logGlobal call that results in duplicate error output.
    
    Correctly say "Aborting Interchange daemon" instead of "Aborting
    catalog" when dying on global config errors.

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

Summary of changes and diff:
 lib/Vend/Config.pm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/Vend/Config.pm b/lib/Vend/Config.pm
index 88f2915..5158365 100644
--- a/lib/Vend/Config.pm
+++ b/lib/Vend/Config.pm
@@ -349,7 +349,6 @@ sub config_error {
 		warn "$msg\n" unless $Vend::Quiet;
 	}
 	else {
-		logGlobal({level => 'warn'}, $msg);
 		die "$msg\n";
 	}
 }
@@ -2697,8 +2696,8 @@ sub parse_require {
 	}
 	else {
 		$carptype = \&config_error;
-		$error_message = 'Required %s %s not present. Aborting catalog.'
-			unless $error_message;
+		$error_message ||= 'Required %s %s not present. Aborting '
+			. ($C ? 'catalog' : 'Interchange daemon') . '.';
 	}
 
 	my $nostrict;
@@ -2768,11 +2767,12 @@ sub parse_require {
 					unshift(@INC, $pathinfo);
 				}
 				eval "require $module$oldtype;";
+				my $error = $@;
 				if ($pathinfo) {
 					shift(@INC);
 				}
-				::logGlobal("while eval'ing module %s got [%s]", $module, $@) if ($@);
-				return ! $@;
+				::logGlobal("while eval'ing module %s got [%s]\n", $module, $error) if $error;
+				return ! $error;
 			}
 			else {
 				# Since we aren't safe to actually require, we will 


hooks/post-receive
-- 
Interchange
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.