Hi Monks,

I am trying to use DBIx::Connector for my DBIx Schema object MyTest::Schema as shown below:

use MyTest::Schema; use DBIx::Connector; my $args = [ 'DBI:mysql:my_db:192.XXX.XXX.25', 'XX', 'XX', ]; my $schema = MyTest::Schema->connect( sub { DBIx::Connector->new( @{$args} ); } );

I am getting below error as a result:

DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't locate object method "FETCH" via package "DBIx::Connector" at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1494.

 at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1494.
	DBIx::Class::Storage::DBI::try {...} () called at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 81
	eval {...} called at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 72
	Try::Tiny::try(CODE(0xdec1bb8), Try::Tiny::Catch=REF(0xbafa428)) called at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1531
	DBIx::Class::Storage::DBI::_connect(DBIx::Class::Storage::DBI=HASH(0xdc024e8)) called at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1048
	DBIx::Class::Storage::DBI::_populate_dbh(DBIx::Class::Storage::DBI=HASH(0xdc024e8)) called at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1317
	DBIx::Class::Storage::DBI::_extract_driver_from_connect_info(DBIx::Class::Storage::DBI=HASH(0xdc024e8)) called at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1261
	DBIx::Class::Storage::DBI::_determine_driver(DBIx::Class::Storage::DBI=HASH(0xdc024e8)) called at (eval 1029) line 37
	DBIx::Class::Storage::DBI::select_single(DBIx::Class::Storage::DBI=HASH(0xdc024e8), ARRAY(0x3089fa8), ARRAY(0xbc35a40), ARRAY(0xbb5da58), HASH(0xdf0f9c8)) called at /usr/local/share/perl/5.18.2/DBIx/Class/ResultSet.pm line 1099

What could I be doing wrong - wise monks.

In reply to DBI Connection failed: Can't locate object method "FETCH" via package "DBIx::Connector" by losintikfos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.