wiki confusion about db_Main

[prev] [thread] [next] [Date index for 2005/03/08]

From: Greg Matheson
Subject: wiki confusion about db_Main
Date: 00:25 on 08 Mar 2005
The man page doesn't give much guidance on db_Main. The wiki has
more, but I wondered about the information in the Cookbook
section under the Misc heading. It says you can get a $dbh by
calling $class->db_Main().

You have to have placed such a method in your class however for
this to work, don't you?

So I added a question at the end of the wiki page.

	 $dbh from you CDBI object

	In your script:
	  my $dbi = $class->db_Main()
	or in your class file
	  my $dbi = __PACKAGE__->db_Main()

	DrBean is confused:

	Don't you have to have written a db_Main method in your class that
	subclasses Class::DBI, as per the man page, for this to work? I don't
	think Class::DBI has a db_Main method. It only uses it if it exists.

wiki confusion about db_Main
Greg Matheson 00:25 on 08 Mar 2005

Re: wiki confusion about db_Main
Greg Matheson 01:38 on 08 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52