[Dbix-class] rows error

Theo Bot theo.bot at proxy.nl
Fri Nov 9 12:41:31 GMT 2012


Hi,

Can anybody tell me what is wrong with this?
$rs =3D $schema->resultset("Location")->search(
        {
            name =3D>  { like =3D> '%' },
        },
        {
            order_by =3D> 'location_id',
            rows =3D> 2,
        }
    );


I get:
Can't use an undefined value as an ARRAY reference at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage/DBIHacks.pm
line 70. at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Schema.pm
line 1101.

DBIx::Class::Schema::throw_exception('TestProject::Schema=3DHASH(0x155e628)=
',
'Can\'t use an undefined value as an ARRAY reference at /opt/A...') called
at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage.pm
line 112

DBIx::Class::Storage::throw_exception('DBIx::Class::Storage::DBI::mysql=3DH=
ASH(0x155e868)',
'Can\'t use an undefined value as an ARRAY reference at /opt/A...') called
at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage/BlockRunner.pm
line 188
    DBIx::Class::Storage::BlockRunner::__ANON__() called at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/Context/P=
reserve.pm
line 37
    Context::Preserve::preserve_context('CODE(0x578d1e0)', 'replace',
'CODE(0x5791e58)') called at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage/BlockRunner.pm
line 219

DBIx::Class::Storage::BlockRunner::_run('DBIx::Class::Storage::BlockRunner=
=3DHASH(0x56aea78)')
called at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage/BlockRunner.pm
line 110

DBIx::Class::Storage::BlockRunner::run('DBIx::Class::Storage::BlockRunner=
=3DHASH(0x56aea78)')
called at /opt/TestProject/lib/DBIx/Class/Storage/DBI.pm line 803
    DBIx::Class::Storage::DBI::dbh_do(undef, undef,
'DBIx::Class::Storage::DBI::Cursor=3DHASH(0x59c8a78)') called at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/Storage/DBI/Cursor.pm
line 116

DBIx::Class::Storage::DBI::Cursor::next('DBIx::Class::Storage::DBI::Cursor=
=3DHASH(0x59c8a78)')
called at
/opt/TestProject/platform/Linux/x86_64/lib/perl5/site_perl/5.16.0/DBIx/Clas=
s/ResultSet.pm
line 1249
    DBIx::Class::ResultSet::next('DBIx::Class::ResultSet=3DHASH(0x59486a0)')
called at ./test.pl line 44

If I remove the rows directive the error is gone.

I am using perl 5.16 and DBIx::Class DBIx-Class-0.08204


-- =

Kind regards,

Theo Bot
Network Management Engineer
Tel: +31653965698
e-mail: theo.bot at proxy.nl
Website: http://www.proxy.nl
LinkedIn: http://www.linkedin.com/in/theobot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20121109/de5=
4a994/attachment.htm


More information about the DBIx-Class mailing list