[Bast-commits] r3593 - in trunk/DBIx-Class: . lib/DBIx/Class
marcus at dev.catalyst.perl.org
marcus at dev.catalyst.perl.org
Wed Jul 18 12:39:58 GMT 2007
Author: marcus
Date: 2007-07-18 12:39:58 +0100 (Wed, 18 Jul 2007)
New Revision: 3593
Modified:
trunk/DBIx-Class/Changes
trunk/DBIx-Class/lib/DBIx/Class/Componentised.pm
Log:
Make ensure_class_loaded behave better with malformed classnames
Modified: trunk/DBIx-Class/Changes
===================================================================
--- trunk/DBIx-Class/Changes 2007-07-18 01:12:02 UTC (rev 3592)
+++ trunk/DBIx-Class/Changes 2007-07-18 11:39:58 UTC (rev 3593)
@@ -1,5 +1,6 @@
Revision history for DBIx::Class
+ - ensure_class_loaded handles non-classnames better.
- non-destructive hashref handling for connect_info options
- count no longer returns negative values after slice
(report and test from JOHANL)
Modified: trunk/DBIx-Class/lib/DBIx/Class/Componentised.pm
===================================================================
--- trunk/DBIx-Class/lib/DBIx/Class/Componentised.pm 2007-07-18 01:12:02 UTC (rev 3592)
+++ trunk/DBIx-Class/lib/DBIx/Class/Componentised.pm 2007-07-18 11:39:58 UTC (rev 3593)
@@ -69,6 +69,9 @@
# require
sub ensure_class_loaded {
my ($class, $f_class) = @_;
+
+ croak "Invalid class name $f_class"
+ if ($f_class=~m/(?:\b:\b|\:{3,})/);
return if Class::Inspector->loaded($f_class);
eval "require $f_class"; # require needs a bareword or filename
if ($@) {
More information about the Bast-commits
mailing list