[svk-commit] r2355 - branches/2.0-releng/bin

nobody at bestpractical.com nobody at bestpractical.com
Thu Mar 22 11:53:27 EDT 2007


Author: clkao
Date: Thu Mar 22 11:53:26 2007
New Revision: 2355

Modified:
   branches/2.0-releng/bin/svk

Log:
Merge from trunk:
 r2347 at trunk:  jesse | 2007-03-15 22:44:05 +0000
  r53489 at 124:  jesse | 2007-03-15 18:42:58 -0400
  * Made SVK scream more politely if the user doesn't have a workable Scalar::Util
 


Modified: branches/2.0-releng/bin/svk
==============================================================================
--- branches/2.0-releng/bin/svk	(original)
+++ branches/2.0-releng/bin/svk	Thu Mar 22 11:53:26 2007
@@ -50,6 +50,33 @@
 # 
 # END BPS TAGGED BLOCK }}}
 use strict;
+
+BEGIN {
+    eval {
+        my $x = '';
+        my $y = \$x;
+        require Scalar::Util; Scalar::Util::weaken($y);
+    };
+   if ($@) {
+       CORE::die <<"EOF";
+
+SVK requires the Scalar::Util module be built with support for  the 'weaken'
+function. 
+
+It is sometimes the case that operating system upgrades will replace 
+a working Scalar::Util with a non-working one. If your system was working
+correctly up until now, this is likely the cause of the problem.
+
+Please reinstall Scalar::Util, being careful to let it build with your C 
+compiler. Ususally this is as simple as running the following command as
+root.
+
+    perl -MCPAN -e'install Scalar::Util'
+
+EOF
+    } 
+}
+
 use SVK;
 our $VERSION = $SVK::VERSION;
 use SVK::I18N;


More information about the svk-commit mailing list