Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Database mySQL

by akagrawal3 (Beadle)
on Mar 04, 2012 at 08:54 UTC ( [id://957741]=perlquestion: print w/replies, xml ) Need Help??

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

Kindly help me with the following
my $db1 = StatView::Db::D1->connection; my $db2 = StatView::Db::D2->connection; .... for my $table ($db1->get_tables) { my $resultset = $table->result_source->source_name; my $aggr_table = $db2->resultset($resultset);
What is stored in resultset and aggr_table? I dont understand what the above two statements do.

Replies are listed 'Best First'.
Re: Database mySQL
by CountZero (Bishop) on Mar 04, 2012 at 09:38 UTC
    Statview is not a module on CPAN. It seems to be a private module, so we cannot test it or check its code or documentation. Where did you get it? Cannot you ask the author directly?

    Update: It just might be a subclass of DBIx::Class and then you can have a look at the docs of that module.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
      So does that infer that even  result_source->source_name will be available in that document.
        If it is indeed a DBIx::Class private sub-class then you will find it somewhere in the extensive docs of DBIx::Class.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        My blog: Imperial Deltronics
Re: Database mySQL
by Anonymous Monk on Mar 04, 2012 at 09:13 UTC

    What is stored in resultset and aggr_table? I dont understand what the above two statements do.

    What does the documentation for "StatView::Db::D1" say?

      I don't have that document. But basically it should contain the database name and other details. I think the first statement connects to a database.

        I don't have that document...

        Gee, well you kinda need to get it, or read the source of the module -- in either case I don't see how we're supposed to help you, we don't have that document either

Log In?
Username:
Password:

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

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

    No recent polls found