[svk-commit] r2347 - in trunk: bin

nobody at bestpractical.com nobody at bestpractical.com
Thu Mar 15 18:44:05 EDT 2007


Author: jesse
Date: Thu Mar 15 18:44:05 2007
New Revision: 2347

Modified:
   trunk/   (props changed)
   trunk/bin/svk

Log:
 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: trunk/bin/svk
==============================================================================
--- trunk/bin/svk	(original)
+++ trunk/bin/svk	Thu Mar 15 18:44:05 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