[Dbix-class] DBIx::Class::Schema::Loader Can't use string error

Ronald J Kimball rkimball at pangeamedia.com
Thu Oct 28 13:44:38 GMT 2010


On Wed, Oct 27, 2010 at 10:26 AM, Dave Howorth
<dhoworth at mrc-lmb.cam.ac.uk> wrote:
>
> $ ./create-schema.pl
> Dumping manual schema for QD1x::Schema to directory . ...
> Schema dump completed.
> Failed to reload class QD1x::Schema::Result::EntryAttribute: Can't use
> string ("QD1x::Schema::Result::EntryAttri") as a HASH ref while "strict
> refs" in use at /usr/local/share/perl/5.10.1/DBIx/Class/Row.pm line 864.
> Compilation failed in require at (eval 650) line 3.

Line 864 of DBIx/Class/Row.pm is here:

sub set_column {
  my ($self, $column, $new_value) = @_;

  # if we can't get an ident condition on first try - mark the object
as unidentifiable
  # (by using an empty hashref) and store the error for further diag
  unless ($self->{_orig_ident}) {  # *** line 864 ***
    try {
      $self->{_orig_ident} = $self->ident_condition
    }
    catch {
      $self->{_orig_ident_failreason} = $_;
      $self->{_orig_ident} = {};
    };
  }

  ...

set_column() is being called on the name of your class, rather than an
object of the class.  However, I'm not sure why set_column() would
even be called during the schema creation process...

Are there any calls to set_column() in
QD1x/Schema/Result/EntryAttribute.pm, perhaps as
__PACKAGE__->set_column(...)?

Ronald



More information about the DBIx-Class mailing list