more verbose error reporting.
Marcus Ramberg [Mon, 3 Jul 2006 09:40:51 +0000 (09:40 +0000)]
Changes
lib/Catalyst/Model/DBIC/Schema.pm

diff --git a/Changes b/Changes
index f1ac0cf..98665db 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Perl extension Catalyst::Model::DBIC::Schema
 
+       - Be more verbose when connection_info is not set.
+
 0.15  Tue Jun  6 01:33:57 UTC 2006
         - Fixed a serious bug in create=static usage
         - Re-arranged output generation so that the more likely
index 320cb29..402ef3c 100644 (file)
@@ -5,6 +5,7 @@ use base qw/Catalyst::Model Class::Accessor::Fast Class::Data::Accessor/;
 use NEXT;
 use UNIVERSAL::require;
 use Carp;
+use Data::Dumper;
 require DBIx::Class;
 
 our $VERSION = '0.15';
@@ -277,7 +278,9 @@ sub new {
         }
         else {
             croak "Either ->config->{connect_info} must be defined for $class"
-                  . " or $schema_class must have connect info defined on it";
+                  . " or $schema_class must have connect info defined on it"
+                 . "Here's what we got:\n"
+                 . Dumper($self);
         }
     }