From: Matt S Trout Date: Fri, 30 Sep 2005 18:01:20 +0000 (+0000) Subject: Version bumped to 0.03002, assorted minor changes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3dec6248835b18100141f00983a5e34d81d9a97;p=dbsrgits%2FDBIx-Class-Historic.git Version bumped to 0.03002, assorted minor changes --- diff --git a/Changes b/Changes index 56d7949..8bb762e 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for DBIx::Class +0.03002 + - Minor bugfix to new (Row.pm) + - Schema doesn't die if it can't load a class (Schema.pm) + 0.03001 2005-09-23 14:00:00 - Fixes to relationship helpers - IMPORTANT: prefetch/schema combination bug fix diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index 7f72e29..ef46276 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -6,7 +6,7 @@ use warnings; use vars qw($VERSION); use base qw/DBIx::Class::Componentised/; -$VERSION = '0.03001'; +$VERSION = '0.03002'; 1; diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index c7fa861..3aa67aa 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -112,6 +112,7 @@ sub _cond_key { } return $key; } elsif ($action eq 'join') { + return $key unless $key =~ /\./; my ($type, $field) = split(/\./, $key); if (my $alias = $attrs->{_aliases}{$type}) { my $class = $attrs->{_classes}{$alias}; @@ -138,6 +139,7 @@ sub _cond_value { } return $self->get_column($value); } elsif ($action eq 'join') { + return $key unless $key =~ /\./; my ($type, $field) = split(/\./, $value); if (my $alias = $attrs->{_aliases}{$type}) { my $class = $attrs->{_classes}{$alias}; diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 771467d..4308e9c 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -33,7 +33,7 @@ sub new { if ($attrs) { $new->throw("attrs must be a hashref" ) unless ref($attrs) eq 'HASH'; while (my ($k, $v) = each %{$attrs}) { - $new->store_column($k => $v); + $new->store_column($k => $v) if exists $class->_columns->{$k}; } } return $new; diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index d704d82..4fe3a67 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -73,8 +73,7 @@ sub load_classes { } foreach my $comp (@comp) { my $comp_class = "${class}::${comp}"; - eval "use $comp_class"; - die $@ if $@; + eval "use $comp_class"; # If it fails, assume the user fixed it $class->register_class($comp => $comp_class); } } @@ -99,6 +98,7 @@ sub compose_connection { my ($class, $to_map) = @_; return $map{$to_map}; }; + *{"${target}::classes"} = sub { return \%map; }; } $conn_class->class_resolver($target); }