Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

DBIx::ActiveRecord usage

by pankaj_it09 (Scribe)
on May 19, 2014 at 14:06 UTC ( [id://1086669]=perlquestion: print w/replies, xml ) Need Help??

pankaj_it09 has asked for the wisdom of the Perl Monks concerning the following question:

I ran the below code -->
package Database; use base 'DBIx::ActiveRecord::Model'; DBIx::ActiveRecord::Model->table('sca_lt'); # table name is required DBIx::ActiveRecord::Model->columns(qw/pid fp fn/); # required DBIx::ActiveRecord::Model->primary_keys(qw/pid/); # required my $data_source = 'dbi:SQLite:sca_lt'; my $username = 'user'; my $auth = 'pwd'; DBIx::ActiveRecord->connect($data_source, $username, $auth, \%attr); my $m = Database->new(); my $list = $m->all; print $list;

Error message is as below -->

Can't call method "instantiates_by_relation" on an undefined value at at I:/Perl/site/lib/DBIx/ActiveRecord/Scope.pm line 88.

Replies are listed 'Best First'.
Re: DBIx::ActiveRecord usage
by choroba (Cardinal) on May 19, 2014 at 16:06 UTC
    What is the question? Which line triggers the error?
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      How to use DBIx::ActiveRecord ?

      The line no is already given.
        I mean the line in your code.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1086669]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found