From: Tomas Doran <bobtfish@bobtfish.net>
Date: Tue, 21 Oct 2008 22:27:18 +0000 (+0000)
Subject: Fix error message. Loads of tests in the Moose test suite rely on the extra space
X-Git-Tag: 0.68~6
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fea440458d576b905b932dc475c2e14f0e999c82;p=gitmo%2FClass-MOP.git

Fix error message. Loads of tests in the Moose test suite rely on the extra space
---

diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm
index 5ed98a6..4587469 100644
--- a/lib/Class/MOP.pm
+++ b/lib/Class/MOP.pm
@@ -132,7 +132,7 @@ sub load_first_existing_class {
         "\n",
         map {
             sprintf(
-                "Could not load class (%s) because: %s", $_,
+                "Could not load class (%s) because : %s", $_,
                 $exceptions{$_}
                 )
             } @classes
diff --git a/t/083_load_class.t b/t/083_load_class.t
index 06ff0c1..74b77c3 100644
--- a/t/083_load_class.t
+++ b/t/083_load_class.t
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More tests => 27;
+use Test::More tests => 28;
 use Test::Exception;
 
 require Class::MOP;
@@ -49,6 +49,10 @@ throws_ok {
     Class::MOP::load_class('SyntaxError');
 } qr/Missing right curly/;
 
+throws_ok {
+    Class::MOP::load_class('This::Does::Not::Exist');
+} qr/Could not load class \(This::Does::Not::Exist\) because :/, 'Moose relies on this behaviour';
+
 {
     package Other;
     use constant foo => "bar";