[ANN] DBIx::DBH - Perl extension for simplifying database connections

2005-03-23 Thread Terrence Brannon
Version 0.07 of DBIx::DBH has entered CPAN with support for Sybase connections provided by Rachel Richard. NAME DBIx::DBH - Perl extension for simplifying database connections ABSTRACT DBIx::DBH is designed to facilitate and validate the process of creating DBI database connections

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-09 Thread Peter J. Holzer
On 2004-12-07 22:36:58 -0800, Jonathan Leffler wrote: > ConnectionStrings.com - Forgot that connection string? You will ... > www.connectionstrings.com - All connection strings in one place! Here > you'll find the syntax for ... > > > It seems like someone else has already done it :-) > > (No, I

RE: DBIx::DBH - Perl extension for simplifying database connections

2004-12-08 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I really really object to the DB slot being called DB. Oracle's term > "tablespace" is much less overused and confusing than database. An Oracle "tablespace" has a completely different meaning from what you think. PostgreSQL just added tablesp

Re: Ingres & FOSS, and still more RE: DBIx::DBH - Perl extension for simplifying database connections

2004-12-08 Thread Sam Vilain
Henrik Tougaard wrote: Db is neccesary, I think we all agree on that. Almost. With Oracle the "database" is the usercode. Its closest equivalent to a "host" is the SID / TWO_TASK, but as previously mentioned - it is bad style to specify it. That specifies the instance of Oracle that you want, but

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-08 Thread Tim Bunce
On Tue, Dec 07, 2004 at 12:38:53PM -0500, Mark Stosberg wrote: > On Tue, Dec 07, 2004 at 12:38:12PM +, Tim Bunce wrote: > > > > --- > > The simplest fix is to standardize one set of driver DSN attribute > > names so that at least the host, port, and database (schema) can > > be specified in a

Ingres & FOSS, and still more RE: DBIx::DBH - Perl extension for simplifying database connections

2004-12-08 Thread Henrik Tougaard
Christopher Hicks skrev: > On Tue, 7 Dec 2004, Henrik Tougaard wrote: >> I (DBD::Ingres) have'nt pitched in as Jonathan voiced my concerns >> quite precisely, saying: Beware - DBMS are more different than >> anyone would like. That's why DBI has the scheme it does have - it >> is flexible but not

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Ron Savage
On Tue, 7 Dec 2004 22:36:58 -0800, Jonathan Leffler wrote: Hi Jonathan > ConnectionStrings.com - Forgot that connection string? You will ... > www.connectionstrings.com - All connection strings in one place! > Here > you'll find the syntax for ... Excellent. Now I can retire from the fray... --

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Jonathan Leffler
On Wed, 8 Dec 2004 09:00:36 +1100, Ron Savage <[EMAIL PROTECTED]> wrote: > On Tue, 07 Dec 2004 09:57:38 -0500, John Siracusa wrote: > > As one earlier post said, the simplest solution is to accept a > > hashref instead of a string as the DSN argument to connect() With great self-restraint, I'm sim

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Mark Stosberg
On Tue, Dec 07, 2004 at 12:38:12PM +, Tim Bunce wrote: > > --- > The simplest fix is to standardize one set of driver DSN attribute > names so that at least the host, port, and database (schema) can > be specified in a portable way. > > Most drivers already support the "foo=bar;..." style in

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Ron Savage
On Tue, 07 Dec 2004 09:57:38 -0500, John Siracusa wrote: Hi Folks > As one earlier post said, the simplest solution is to accept a > hashref instead of a string as the DSN argument to connect() Well, this idea has been kicked around a bit, so I suggest it's time to do something concrete. Is th

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Tim Bunce
On Tue, Dec 07, 2004 at 11:13:01AM +, Nicholas Clark wrote: > On Mon, Dec 06, 2004 at 07:53:01PM -0500, Matthew Persico wrote: > > > At the top of this thread and at various other entries, the point is > > made that many times, the parameters for connection are pulled from a > > source that ha

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread John Siracusa
On Tue, 7 Dec 2004 10:58:56 +0100, Henrik Tougaard <[EMAIL PROTECTED]> wrote: > Ingres, like Informix and (I think) Oracle, does'nt have the concept > of 'host' or 'port', using other ways of adressing remote databases. So? AFAICT, what we've been talking about is simply a list of name/value pair

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Dan Scott
On Thu, 02 Dec 2004 08:53:38 +0100, Cosimo Streppone <[EMAIL PROTECTED]> wrote: > Tim Bunce wrote: > > > I know what it does, I'm trying to find real examples that demonstrate > > why people think it's needed. Nick has provided a good one. Any others? > > Something like DBIx::DBH is in use in our

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Mark Stosberg
On Mon, Dec 06, 2004 at 07:53:01PM -0500, Matthew Persico wrote: > > And this, in fact is what I do at my place too. > > my $dbh = connectDBI(driver => 'Oracle', user => 'foo', server => > 'bar', database => 'baz' > RaiseError => 1, PrintError =>0, AutoCommit => 0, driver_special => > {syb_show_s

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Nicholas Clark
On Mon, Dec 06, 2004 at 07:53:01PM -0500, Matthew Persico wrote: > At the top of this thread and at various other entries, the point is > made that many times, the parameters for connection are pulled from a > source that has them listed individually. Why make the The other point, possibly more f

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-07 Thread Peter J. Holzer
On 2004-12-06 19:53:01 -0500, Matthew Persico wrote: > And this, in fact is what I do at my place too. > > my $dbh = connectDBI(driver => 'Oracle', user => 'foo', server => > 'bar', database => 'baz' > RaiseError => 1, PrintError =>0, AutoCommit => 0, driver_special => > {syb_show_sql =>1, syb_sho

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-06 Thread Matthew Persico
On Mon, 6 Dec 2004 17:23:46 +, Martyn J. Pearce <[EMAIL PROTECTED]> wrote: > On Fri, Dec 03, 2004 at 11:25:53AM +, Tim Bunce wrote: > > > > Yes. It's finely balanced though. I can see merit on both sides. > > > > The "fill in a form" situation is relatively common. But beyond the > > "MyS

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-06 Thread Martyn J. Pearce
On Fri, Dec 03, 2004 at 11:25:53AM +, Tim Bunce wrote: > Yes. It's finely balanced though. I can see merit on both sides. > > The "fill in a form" situation is relatively common. But beyond the > "MySQL/Pg model of how servers, ports, databases" work there's also > the question of specifying a

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-06 Thread Martyn J. Pearce
On Wed, Dec 01, 2004 at 06:39:00PM +, Tim Bunce wrote: > Lots of people do, it seems, but I'm not getting much background about why. > > FWIW, the reason I'm digging here is because I agree there may be > some value in the DBI supporting something along these lines, but > I need a better under

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-03 Thread Tim Bunce
On Fri, Dec 03, 2004 at 05:48:35PM +1300, Sam Vilain wrote: > Ken Williams wrote: > > > >On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: > > > >>I know what it does, I'm trying to find real examples that demonstrate > >>why people think it's needed. Nick has provided a good one. Any others? > > > >Sup

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Sam Vilain
Ken Williams wrote: On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Suppose someone's creating a GUI app (Perl/Tk, etc.) in which the end user fills in the se

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Jonathan Leffler
On Thu, 2 Dec 2004 03:43:56 -, Greg Sabino Mullane <[EMAIL PROTECTED]> wrote: > This seems to be a solution in search of a problem. With the > exception of perhaps "port", "host", and "database" database - Informix doesn't directly use host or port. (That's the Informix DBMS that doesn't sup

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Austin Schutz
On Thu, Dec 02, 2004 at 09:52:20PM -0600, Ken Williams wrote: > > On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: > > >I know what it does, I'm trying to find real examples that demonstrate > >why people think it's needed. Nick has provided a good one. Any others? > > > > Suppose someone's creating

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Ken Williams
On Dec 1, 2004, at 3:48 AM, Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Suppose someone's creating a GUI app (Perl/Tk, etc.) in which the end user fills in the server, port, user, pa

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Michael Peppler
On Thu, 2004-12-02 at 08:53, Cosimo Streppone wrote: > Tim Bunce wrote: > > > I know what it does, I'm trying to find real examples that demonstrate > > why people think it's needed. Nick has provided a good one. Any others? > > Something like DBIx::DBH is in use in our organization. > This is be

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Cosimo Streppone
Cosimo Streppone wrote: Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is because every sql "source" (meaning database table)

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Cosimo Streppone
Tim Bunce wrote: I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Something like DBIx::DBH is in use in our organization. This is because every sql "source" (meaning database table) is accessed with standa

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Nicholas Clark
On Wed, Dec 01, 2004 at 09:46:24AM +, Tim Bunce wrote: > Do you generally pass URLs around as a string or broken up into a hash? Personally I've not written much code to handle URLs. But work code has them split into hashes, built from config files where protocol, server, port, path etc are sp

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Ricardo SIGNES
* Tim Bunce <[EMAIL PROTECTED]> [2004-12-01T13:27:00] > On Wed, Dec 01, 2004 at 10:09:55AM -0500, Ricardo SIGNES wrote: > > db_driver: ODBC > > db_user: kibo > > db_pass: grep > > db_name: users > > > > Why not store something like this?: > >db_user: kibo >db_pass: grep >db_dsn:

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Henri Asseily
On Dec 1, 2004, at 10:39 AM, Tim Bunce wrote: On Wed, Dec 01, 2004 at 09:56:01AM -0500, John Siracusa wrote: On Wed, 1 Dec 2004 09:46:24 +, Tim Bunce <[EMAIL PROTECTED]> wrote: Do you generally pass URLs around as a string or broken up into a hash? If they had different formats for different

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Mark Stosberg
On Wed, Dec 01, 2004 at 06:39:00PM +, Tim Bunce wrote: > > FWIW, the reason I'm digging here is because I agree there may be > some value in the DBI supporting something along these lines, but > I need a better understanding of the underlying issues. More real- > world examples would help. I

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread John Siracusa
On Wed, 1 Dec 2004 18:39:00 +, Tim Bunce <[EMAIL PROTECTED]> wrote: > FWIW, the reason I'm digging here is because I agree there may be > some value in the DBI supporting something along these lines, but > I need a better understanding of the underlying issues. More real- > world examples would

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Tony Bowden
On Thu, Dec 02, 2004 at 03:43:56AM -, Greg Sabino Mullane wrote: > It also seems like an awful lot of overhead > to make a module where a couple of lines in the script will > suffice. I don't really have an opinion on the module in question, but this logic seems flawed to me. I don't see how

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-02 Thread Tim Bunce
On Thu, Dec 02, 2004 at 08:53:38AM +0100, Cosimo Streppone wrote: > Tim Bunce wrote: > > >I know what it does, I'm trying to find real examples that demonstrate > >why people think it's needed. Nick has provided a good one. Any others? > > Something like DBIx::DBH is in use in our organization. >

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This seems to be a solution in search of a problem. With the exception of perhaps "port", "host", and "database", the dsn arguments are pretty DBMS-specific, meaning that they cannot really be mapped from one DBD to another, nor can any common rule

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
On Wed, Dec 01, 2004 at 01:45:50PM -0500, John Siracusa wrote: > On Wed, 1 Dec 2004 18:39:00 +, Tim Bunce <[EMAIL PROTECTED]> wrote: > > FWIW, the reason I'm digging here is because I agree there may be > > some value in the DBI supporting something along these lines, but > > I need a better un

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
On Thu, Dec 02, 2004 at 08:34:20AM +1100, Ron Savage wrote: > On Wed, 1 Dec 2004 18:39:00 +, Tim Bunce wrote: > > H Tim > > > need a better understanding of the underlying issues. More real- > > world examples would help. > > Here's a real world example of how I do things, although I am in n

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Henri Asseily
On Dec 1, 2004, at 10:39 AM, Tim Bunce wrote: On Wed, Dec 01, 2004 at 09:56:01AM -0500, John Siracusa wrote: On Wed, 1 Dec 2004 09:46:24 +, Tim Bunce <[EMAIL PROTECTED]> wrote: Do you generally pass URLs around as a string or broken up into a hash? If they had different formats for different

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Ron Savage
On Wed, 1 Dec 2004 18:39:00 +, Tim Bunce wrote: H Tim > need a better understanding of the underlying issues. More real- > world examples would help. Here's a real world example of how I do things, although I am in no way convinced that such a module as we are discussing is needed... The p

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Eric
At 10:39 AM 12/1/2004, you wrote: On Wed, Dec 01, 2004 at 09:56:01AM -0500, John Siracusa wrote: > On Wed, 1 Dec 2004 09:46:24 +, Tim Bunce <[EMAIL PROTECTED]> wrote: > > Do you generally pass URLs around as a string or broken up into a hash? > > If they had different formats for different cons

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
On Wed, Dec 01, 2004 at 10:09:55AM -0500, Ricardo SIGNES wrote: > * Tim Bunce <[EMAIL PROTECTED]> [2004-12-01T04:48:40] > > I know what it does, I'm trying to find real examples that demonstrate > > why people think it's needed. Nick has provided a good one. Any others? > > I have a very similar s

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
On Wed, Dec 01, 2004 at 02:02:57AM -0800, Terrence Brannon wrote: > Tim Bunce wrote: > >On Tue, Nov 30, 2004 at 10:40:34PM +, Nicholas Clark wrote: > >>I guess I don't find it natural thinking about parameters as a single > >>string. > > > >Do you generally pass URLs around as a string or brok

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Nicholas Clark
On Tue, Nov 30, 2004 at 11:02:31PM -0600, David Nicol wrote: > instead of having to haul around the code to figure this out, why not create a > handy documentary web service somewhere where you fill out the blanks and > get an appropriate connection string? Loading a module every time you start >

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread David Nicol
instead of having to haul around the code to figure this out, why not create a handy documentary web service somewhere where you fill out the blanks and get an appropriate connection string? Loading a module every time you start the program just to create something that is a permanent per-installa

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Terrence Brannon
Tim Bunce wrote: On Tue, Nov 30, 2004 at 10:40:34PM +, Nicholas Clark wrote: I guess I don't find it natural thinking about parameters as a single string. Do you generally pass URLs around as a string or broken up into a hash? Tim. http://search.cpan.org/~gaas/libwww-perl-5.802/lib/HTTP/Reque

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
I know what it does, I'm trying to find real examples that demonstrate why people think it's needed. Nick has provided a good one. Any others? Tim. On Tue, Nov 30, 2004 at 06:37:01PM -0800, Terrence Brannon wrote: > > > >I don't get it. Can someone give me some small but real examples > >of the p

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-12-01 Thread Tim Bunce
On Tue, Nov 30, 2004 at 10:40:34PM +, Nicholas Clark wrote: > On Tue, Nov 30, 2004 at 10:32:12PM +, Tim Bunce wrote: > > On Tue, Nov 30, 2004 at 09:38:47PM +, Nicholas Clark wrote: > > > On Tue, Nov 30, 2004 at 08:53:51PM +, Tim Bunce wrote: > > > > The one that I've hit - specifyi

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Terrence Brannon
Tim Bunce wrote: On Tue, Nov 30, 2004 at 07:21:11AM -0800, Terrence Brannon wrote: I don't get it. Can someone give me some small but real examples of the problem that's being solved here? well the ABSTRACT says it all... I regurgitate: DBIx::DBH is designed to facilitate and validate the pr

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Nicholas Clark
On Tue, Nov 30, 2004 at 10:32:12PM +, Tim Bunce wrote: > On Tue, Nov 30, 2004 at 09:38:47PM +, Nicholas Clark wrote: > > On Tue, Nov 30, 2004 at 08:53:51PM +, Tim Bunce wrote: > > The one that I've hit - specifying port and host, Pg vs Mysql (and SQlite): > > > > if ($dbspec->{drive

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Nicholas Clark
On Tue, Nov 30, 2004 at 08:53:51PM +, Tim Bunce wrote: > I don't get it. Can someone give me some small but real examples > of the problem that's being solved here? The one that I've hit - specifying port and host, Pg vs Mysql (and SQlite): if ($dbspec->{driver} eq 'DBI:Pg') { # Aaargh

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Mark Stosberg
On Tue, Nov 30, 2004 at 08:53:51PM +, Tim Bunce wrote: > > I don't get it. Can someone give me some small but real examples > of the problem that's being solved here? To give the database name with DBD::Pg, you use: dbname=$dbname With mysql, it's different database=$database With

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Mark Stosberg
> So DSN is too restrictive. Perhaps DBIx::DBH::from_hash ... well who knows. > > I dont understand your comment: " ... since database handles (DBH) are > universally used in DBI-based project" --- why is that an issue? Their is > no chance of trampling on another's namespace is there? All DBI m

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Ron Savage
On Tue, 30 Nov 2004 20:53:51 +, Tim Bunce wrote: Hi Folks >> So DSN is too restrictive. Perhaps DBIx::DBH::from_hash ... well >> who knows. [snip] > The point is that "DBIx::DBH" is practically meaningless. DBIx::DSN > is better, but only slightly. Try something like DBIx::FooConnect > or D

Re: DBIx::DBH - Perl extension for simplifying database connections

2004-11-30 Thread Tim Bunce
On Tue, Nov 30, 2004 at 07:21:11AM -0800, Terrence Brannon wrote: > Mark Stosberg wrote: > >On Tue, Nov 30, 2004 at 07:38:34AM +, Terrence Brannon wrote: > > > >>NAME > >> DBIx::DBH - Perl extension for simplifying database connections > > > &

DBIx::DBH - Perl extension for simplifying database connections

2004-11-29 Thread Terrence Brannon
NAME DBIx::DBH - Perl extension for simplifying database connections ABSTRACT DBIx::DBH is designed to facilitate and validate the process of creating DBI database connections. It's chief and unique contribution to this set of modules on CPAN is that it forms the DSN strin