[Dbix-class] Error on sub class

Mitchell Elutovich melutovich at gmail.com
Sun Jan 18 23:47:03 GMT 2015


Correction again.  I am seeing this with the latest DBIX version of 0.082810

On Fri, Jan 16, 2015 at 6:59 AM, Mitchell Elutovich <melutovich at gmail.com>
wrote:

> I've checked and my perl DBIX version is not as a quoted but rather is
> 0.08196
>
>
> On Fri, Jan 16, 2015 at 5:41 AM, Mitchell Elutovich <melutovich at gmail.com>
> wrote:
>
>> $perl -v
>> This is perl 5, version 16, subversion 3 (v5.16.3) built for
>> x86_64-linux-thread-multi
>>
>> $ perl -MDBIx::Class -le 'print $DBIx::Class::VERSION'
>> 0.082810
>>
>> Anyone know why I might be now running into this?  I'm not sure how long
>> this problem has existed and I thought I was originally using the sub class
>> ok.
>>
>> [2015/01/16 10:29:03] ERROR VLjn2099aP8AAFDcB7sAAAAA View/TT.pm:245
>> Catalyst.View.TT - Couldn't render template "xxx/yyy/index.tt2: undef
>> error - DBIx::Class::ResultSource::_resolve_relationship_condition(): Arg\
>> ument 'self_result_object' must be an object of class
>> 'CatTxA::Model::DB::Document' at
>> /mnt/ext1/melutovich/cvc/repo/CatTxA/script/../lib/CatTxA/Schema/Document.pm
>> line 716
>> "
>>
>> Line 716 is like:
>>     my $result = $doc->documenttypecd->doSomething();
>>
>>
>> At the beginning of Document.pm I've got.
>>
>> my ($xxxDocumentTypeCd) = (qw(XXX));
>> my $xxxSubClass = __PACKAGE__ . '::' . $xxxDocumentTypeCd;
>> sub inflate_result {
>>     my $self = shift;
>>     my $ret = $self->next::method(@_);
>>     my $documentTypeCd = $ret->documentTypeCd;
>>     given ($documentTypeCd) {
>>         when( $xxxDocumentTypeCd ) {
>>             $self->ensure_class_loaded( $xxxSubClass );
>>             bless ($ret, $xxxSubClass);
>>         }
>>         default {
>>             bless ($ret, $self);
>>         }
>>     }
>>     return $ret;
>> }
>>
>>
>> thanks in advance.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20150118/037df704/attachment.htm>


More information about the DBIx-Class mailing list