Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache::DBI

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


jim at rollercoaster

May 3, 2000, 7:02 AM

Post #1 of 58 (2959 views)
Permalink
Apache::DBI

I'm not sure if this is even a problem but it's always
been on my mind. I use Apache::DBI and I have a general
module that handles db connections for my scripts. Here's
the relevant portion:

my $DBH ||= DBI->connect("...")

It basically accepts a hash ref to the dbconfig and opens
a connection. My httpd.conf is set with 5 spare clients
MIN and 10 MAX.

I'm the only one using this module right now and starting
httpd fresh results in no conections. Running my test CGI
script once results in two (2) mysql connections. Running
it again, results in four (4) connections. This will
eventually continue until the number of mysql connections
is always four (4) more than httpd processes.

The thing that I can't figure out is that my scripts
properly open and close the db connection, so why doesn't
Apache::DBI re-use the original connection? Why spawn
one more each time?

I've checked the FAQ and searched the archives and found
no info (other than someone else asking this same question
last year with no helpful answer) and the Apache:DBI man
page doesn't touch on this.

Jim


jim at rollercoaster

May 3, 2000, 7:19 AM

Post #2 of 58 (2882 views)
Permalink
Re: Apache::DBI [In reply to]

> Are you sure it's not:
> Opening connections with different parameters
> http://perl.apache.org/guide/databases.html#Opening_connections_with_differe

Oops. I forgot I had two seperate db accesses on this
particular page and running with $Apache::DBI::DEBUG = 1
clued me in. So am I correct in saying that it will
continue to open connections until connections = httpd
processes? It seems like that's what's eventually happening.

Jim


sbekman at stason

May 3, 2000, 8:29 AM

Post #3 of 58 (2888 views)
Permalink
Re: Apache::DBI [In reply to]

On Wed, 3 May 2000, Jim Serio wrote:

> I'm not sure if this is even a problem but it's always
> been on my mind. I use Apache::DBI and I have a general
> module that handles db connections for my scripts. Here's
> the relevant portion:
>
> my $DBH ||= DBI->connect("...")
>
> It basically accepts a hash ref to the dbconfig and opens
> a connection. My httpd.conf is set with 5 spare clients
> MIN and 10 MAX.
>
> I'm the only one using this module right now and starting
> httpd fresh results in no conections. Running my test CGI
> script once results in two (2) mysql connections. Running
> it again, results in four (4) connections. This will
> eventually continue until the number of mysql connections
> is always four (4) more than httpd processes.
>
> The thing that I can't figure out is that my scripts
> properly open and close the db connection, so why doesn't
> Apache::DBI re-use the original connection? Why spawn
> one more each time?
>
> I've checked the FAQ and searched the archives and found
> no info (other than someone else asking this same question
> last year with no helpful answer) and the Apache:DBI man
> page doesn't touch on this.

Are you sure it's not:
Opening connections with different parameters
http://perl.apache.org/guide/databases.html#Opening_connections_with_differe

______________________________________________________________________
Stas Bekman | JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ | mod_perl Guide http://perl.apache.org/guide
mailto:stas [at] stason | http://perl.org http://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
----------------------------------------------------------------------


gyoung at laserlink

May 3, 2000, 10:03 AM

Post #4 of 58 (2869 views)
Permalink
RE: Apache::DBI [In reply to]

> -----Original Message-----
> From: Jim Serio [mailto:jim [at] rollercoaster]
> Sent: Wednesday, May 03, 2000 10:02 AM
> To: modperl [at] apache
> Subject: Apache::DBI
>
>
> I'm not sure if this is even a problem but it's always
> been on my mind. I use Apache::DBI and I have a general
> module that handles db connections for my scripts. Here's
> the relevant portion:
>
> my $DBH ||= DBI->connect("...")
>
> It basically accepts a hash ref to the dbconfig and opens
> a connection. My httpd.conf is set with 5 spare clients
> MIN and 10 MAX.
>
> I'm the only one using this module right now and starting
> httpd fresh results in no conections. Running my test CGI
> script once results in two (2) mysql connections. Running
> it again, results in four (4) connections. This will
> eventually continue until the number of mysql connections
> is always four (4) more than httpd processes.
>
> The thing that I can't figure out is that my scripts
> properly open and close the db connection, so why doesn't
> Apache::DBI re-use the original connection? Why spawn
> one more each time?

try setting $Apache::DBI::DEBUG=2 to debug your connections.

any call to $dbh->disconnect is intercepted by Apache::DBI, thus no
disconnect ever really happens (which is the whole point to Apache::DBI)

Keep in mind that Apache::DBI will hold one connection per httpd child
process _per connect string_. That is, if you connect once with,say,
RAISE_ERROR=1 and once with RAISE_ERROR=0, Apache::DBI will create two
processes for that child.

HTH

--Geoff

>
> I've checked the FAQ and searched the archives and found
> no info (other than someone else asking this same question
> last year with no helpful answer) and the Apache:DBI man
> page doesn't touch on this.
>
> Jim
>


madmardy at madmardy

May 22, 2000, 7:01 PM

Post #5 of 58 (2883 views)
Permalink
Re: Apache::DBI [In reply to]

I have tried pulling in *any* DBI or DBD module one at a time and ALL of them
cause the server to fail to start. There is no error log message. This is
true whether I use the PerlModule config directive, or 'use' the module in the
script defined in the PerlScript directive. I have other modules in the
script, and until the database module is used, it starts OK. Is there an
order I must use them in? Apache::DBI installed without a hitch, are there
other pitfalls of which I should be aware?

Perrin Harkins wrote:

> On Mon, 22 May 2000, Mark Holt wrote:
>
> > Newbie to the list, apologies if this is a FAQ, but I checked the
> > archives...
> > I built a modperl-enabled server, (Apache/1.3.9 Ben-SSL/1.37 (Unix)
> > mod_perl/1.21) and have been running it for some time. I have the
> > mod_perl as a shared module, and I recently enabled it to start
> > development. I have a startup script in operation and things work fine,
> > until I try to preload any sort of DBI module. I tried Mysql,
> > DBI::mysql, Apache::DBI, all to no avail. The server gives no error
> > message, it simply acts as though it is starting, but does not show up
> > in the process list. Is there something I'm missing?
>
> Are you pulling in the DBI and DBD modules in your startup.pl? Is there
> any message in the error_log? Apache::DBI is not at all like DBD::mysql,
> so it sounds like you may have a problem totally unrelated to DBI.
>
> - Perrin


perrin at primenet

May 22, 2000, 7:09 PM

Post #6 of 58 (2888 views)
Permalink
Re: Apache::DBI [In reply to]

On Mon, 22 May 2000, Mark Holt wrote:

> I have tried pulling in *any* DBI or DBD module one at a time and ALL
> of them cause the server to fail to start. There is no error log
> message.

Does DBI work for you from command-line scripts? Did the tests for
DBD::mysql pass?

> Is there an order I must use them in? Apache::DBI installed without a
> hitch, are there other pitfalls of which I should be aware?

Yes, the Apache::DBI docs explain that you must load it before any other
DBI-related modules.

- Perrin


gyoung at laserlink

Jun 21, 2000, 11:31 AM

Post #7 of 58 (2865 views)
Permalink
RE: Apache::DBI [In reply to]

> -----Original Message-----
> From: Eric Jain [mailto:jain [at] gmx]
> Sent: Wednesday, June 21, 2000 1:30 PM
> To: Mod_Perl
> Subject: Apache::DBI
>
>
> Is it be possible to modify Apache::DBI in sich a way that only
> database connections specified in a PerlRequired startup.pl with
> Apache::DBI->connect_on_init(...) are stored and all subsequent
> DBI->connect(...) connections are properly established (if no matching
> stored connection is available), but not stored afterwards?

I'm not sure why you would want to do such a thing, but I don't think it
fits with DBI/Apache::DBI's model...

why exactly are you looking for this behavior?

--Geoff

> Or could
> Apache::DBI::db::disconnect be changed, so it would actually
> disconnect, except if it was handling one of the connect_on_init
> connections?
>
>
> --
> Eric Jain
>


jain at gmx

Jun 21, 2000, 1:08 PM

Post #8 of 58 (2867 views)
Permalink
RE: Apache::DBI [In reply to]

> > Is it be possible to modify Apache::DBI in sich a way that only
> > database connections specified in a PerlRequired startup.pl with
> > Apache::DBI->connect_on_init(...) are stored and all subsequent
> > DBI->connect(...) connections are properly established
> (if no matching
> > stored connection is available), but not stored afterwards?
>
> I'm not sure why you would want to do such a thing, but I
> don't think it
> fits with DBI/Apache::DBI's model...
>
> why exactly are you looking for this behavior?

Currently I don't use Apache::DBI, even though 99% of all connections
are made as the same user, since I have a few users log in and connect
with their own usernames. This would lead to every process having
several open connections, using up lots of precious RAM...


--
Eric Jain


perrin at primenet

Jun 21, 2000, 2:47 PM

Post #9 of 58 (2868 views)
Permalink
RE: Apache::DBI [In reply to]

On Wed, 21 Jun 2000, Eric Jain wrote:

> > > Is it be possible to modify Apache::DBI in sich a way that only
> > > database connections specified in a PerlRequired startup.pl with
> > > Apache::DBI->connect_on_init(...) are stored and all subsequent
> > > DBI->connect(...) connections are properly established
> > (if no matching
> > > stored connection is available), but not stored afterwards?
> >
> > I'm not sure why you would want to do such a thing, but I
> > don't think it
> > fits with DBI/Apache::DBI's model...
> >
> > why exactly are you looking for this behavior?
>
> Currently I don't use Apache::DBI, even though 99% of all connections
> are made as the same user, since I have a few users log in and connect
> with their own usernames. This would lead to every process having
> several open connections, using up lots of precious RAM...

If you just want a quick hack to make this work, you could put in a quick
check in the connect method of Apache::DBI which would skip caching
connections that use a username other than one you specify in your
startup.pl. Should be easy to implement.

- Perrin


davem at fdgroup

Jun 26, 2000, 2:06 AM

Post #10 of 58 (2888 views)
Permalink
Re: Apache::DBI [In reply to]

> But I run apache I get:
> utechnology# ./apachectl start
> defined(@array) is deprecated at
> /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 135.
> (Maybe you should just omit the defined()?)
> ./apachectl start: httpd started

Perl 5.6.0 has introduced a new warning when it sees code like
if (defined @array) ...
which is technically wrong, and should be changed to

if (@array) ...
A suprising number of Perl modules have got code like this in them;
it is usually just a simple matter of editing the offending lines.

Over time, I should imagine that the various module owners will release
new versions that dont generate this warning.


* Dave Mitchell, Operations Manager,
* Fretwell-Downing Facilities Ltd, UK. Dave.Mitchell [at] fdgroup
* Tel: +44 114 281 6113. The usual disclaimers....
*
* Standards (n). Battle insignia or tribal totems


guobin_ at yahoo

Jul 2, 2000, 6:18 PM

Post #11 of 58 (2869 views)
Permalink
Re: apache::DBI [In reply to]

Though not using rh 6.2, my experience on 6.1 was the
same --- apache will crash whenever use Apache::DBI
is included in httpd.conf. I'm now using manually
compiled apache and modperl and they are working fine.
Hope this will also work for 6.2.

On small glitch, Apache::Status cannot show Apache::DBI
connections on rh 6.1 i386, while the same setting works
on a rh 6.1 sparc!
--
Guo Bin

--- Christopher Suarez <dt98chsu [at] forsmark> wrote:
> I'm running rh linux 6.2 on a laptop and have tried for
> sometime to get
> apache::DBI runnning.
>
> modperl wokrs fine with apache but when I add the line
>
> PerlModule Apache::DBI to srm.conf, httpd.conf or "use
> Apache::DBI" to
> startup.pl and then PerlRequire /path/startup.pl to
> httpd.conf it won't
> work. apache will start ok(saying it's using mod_perl)
> but won't shut down
> ok and error_log doesn't
> say anythings wrong.
> the webserver won't response on contacting 127.0.0.1 in a
> browser it'll
> response connection refused.
>
> versions:
>
> apache-1.3.12-2
> apache-devel-1.3.12-2
> perl-2.00503-10
> perl-DBI-1.13-1
> perl-DBD-msql-mysql-1.2210-1
> perl-Apache-DBI-0.01-2
> perl-Apache-DBILogin-1.5-2
> perl-Apache-DBILogger-0.93-2
> perl-Apache-RedirectDBI-0.01-2
> mod_perl-1.21-10
> strange???
>


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/


Kris at VersionOne

Jul 3, 2000, 3:06 PM

Post #12 of 58 (2873 views)
Permalink
RE: apache::DBI [In reply to]

Okay, so if it seems that Redhat 6.1/6.2 Apache & mod_perl is broken..
Anyone have a good guide/website to get apache & mod_perl compiled properly?
I've been reading the fine manuals and compiled httpd with mod_perl (by
using the Makefile.PL from the mod_perl src tree.)

When I list the modules compiled in the httpd, I do see the mod_perl.c ,
however, trying to get the server up and running just fails. It does the
same thing as I would add the keyword
PerlModule Apache::DBI in the httpd.conf from the out-of-the-box apache &
mod_perl from redhat 6.2 (the httpd seems to load, but it dies, because I'm
unable to telnet on port 80 and there are no logs of the crash).

Help?


-----Original Message-----
From: Guo Bin [mailto:guobin_ [at] yahoo]
Sent: July 2, 2000 9:18 PM
To: Christopher Suarez; modperl [at] apache
Subject: Re: apache::DBI


Though not using rh 6.2, my experience on 6.1 was the
same --- apache will crash whenever use Apache::DBI
is included in httpd.conf. I'm now using manually
compiled apache and modperl and they are working fine.
Hope this will also work for 6.2.

On small glitch, Apache::Status cannot show Apache::DBI
connections on rh 6.1 i386, while the same setting works
on a rh 6.1 sparc!
--
Guo Bin

--- Christopher Suarez <dt98chsu [at] forsmark> wrote:
> I'm running rh linux 6.2 on a laptop and have tried for
> sometime to get
> apache::DBI runnning.
>
> modperl wokrs fine with apache but when I add the line
>
> PerlModule Apache::DBI to srm.conf, httpd.conf or "use
> Apache::DBI" to
> startup.pl and then PerlRequire /path/startup.pl to
> httpd.conf it won't
> work. apache will start ok(saying it's using mod_perl)
> but won't shut down
> ok and error_log doesn't
> say anythings wrong.
> the webserver won't response on contacting 127.0.0.1 in a
> browser it'll
> response connection refused.
>
> versions:
>
> apache-1.3.12-2
> apache-devel-1.3.12-2
> perl-2.00503-10
> perl-DBI-1.13-1
> perl-DBD-msql-mysql-1.2210-1
> perl-Apache-DBI-0.01-2
> perl-Apache-DBILogin-1.5-2
> perl-Apache-DBILogger-0.93-2
> perl-Apache-RedirectDBI-0.01-2
> mod_perl-1.21-10
> strange???
>


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/


daveh at hodgkinson

Jul 4, 2000, 2:01 AM

Post #13 of 58 (2870 views)
Permalink
Re: apache::DBI [In reply to]

Kristopher Lalletti <Kris [at] VersionOne> writes:

> Okay, so if it seems that Redhat 6.1/6.2 Apache & mod_perl is broken..
> Anyone have a good guide/website to get apache & mod_perl compiled
> properly?

http://perl.apache.org/guide/install.html#Installing_mod_perl_in_10_Minute

> I've been reading the fine manuals and compiled httpd with mod_perl (by
> using the Makefile.PL from the mod_perl src tree.)

I have to say that RH6.2 and mod_perl "works for me" out of the box,
at least in development. I'll let you know what it's like in
production in a few weeks... ;-)


You have all this carp in your httpd.conf? What does "apachectl
configtest" tell you?

LoadModule perl_module modules/libperl.so
AddModule mod_perl.c
PerlRequire startup.pl
<IfModule mod_perl.c>
Alias /perl/ /home/httpd/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>

--
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star http://www.deep-purple.com
Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
-----------------------------------------------------------------


kclark at logsoft

Jul 26, 2001, 7:01 AM

Post #14 of 58 (2870 views)
Permalink
Re: Apache::DBI [In reply to]

On Thu, 26 Jul 2001, Castellon, Francisco wrote:

> Date: Thu, 26 Jul 2001 07:48:14 -0600
> From: "Castellon, Francisco" <castellon.francisco [at] syncrude>
> To: modperl [at] apache
> Subject: Apache::DBI
>
> Does anyone know if Apache::DBI is included with mod_perl? if not
> could someone tell me where i could get it from?
>

http://cpan.org/

ky


will at serensoft

Jul 29, 2001, 10:21 PM

Post #15 of 58 (2870 views)
Permalink
Re: Apache::DBI [In reply to]

On Thu, Jul 26, 2001 at 07:48:14AM -0600, Castellon, Francisco wrote:
> Does anyone know if Apache::DBI is included with mod_perl? if not
> could someone tell me where i could get it from?

if you're using DEBIAN, you find it like this:

$ dpkg -S Apache::DBI
libapache-dbi-perl: /usr/share/man/man3/Apache::DBI.3pm.gz
libapache-dbilogger-perl: /usr/man/man3/Apache::DBILogger.3pm.gz

so (as root) you'd just

# apt-get install libapache-dbi-perl

and you're off to the races.

--
I'd concentrate on "living in the now" because it is fun
and on building a better world because it is possible.
- Tod Steward

will [at] serensoft
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!


mithun.b at egurucool

Jul 29, 2001, 11:38 PM

Post #16 of 58 (2877 views)
Permalink
Re: Apache::DBI [In reply to]

Any particular reason why CPAN is not being suggested ???

> if you're using DEBIAN, you find it like this:
>
> $ dpkg -S Apache::DBI


will at serensoft

Aug 4, 2001, 5:42 AM

Post #17 of 58 (2891 views)
Permalink
Re: Apache::DBI [In reply to]

On Mon, Jul 30, 2001 at 12:08:26PM +0530, Mithun Bhattacharya wrote:
> Any particular reason why CPAN is not being suggested ???
> > if you're using DEBIAN, you find it like this:
> >
> > $ dpkg -S Apache::DBI

very particular.

we debian folks are spoiled. nice packaging system they have
here. it tracks versions and inter-dependencies.

cpan is likely to give you the latest-and-greatest which may
need an upgrade of something else that will require a new
rendition of this, which needs a whole new perl, which might
just break every bloomin' thing you've got.

*if* you can stick with the debian packages, you can stay snug
and safe back with the stable distro, where older (calmer,
robuster, stabler, not-as-fancy-but-at-least-as-solid) versions
can be had for the asking.

and i hear that current CPAN downloads can be folded into the
*.deb paradigm, but i'm not up on that aspect.

CPAN is great for red hat users (for example) who don't mind
breaking things ... or who are at least used to breaking things
often and easily. debian's package manager is a bit more
advanced than that.

--
Khan said that revenge is a dish best served cold. I think
sometimes it's best served hot, chunky, and foaming.
- P.J.Lee ('79-'80)

will [at] serensoft
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!


mithun.b at egurucool

Aug 4, 2001, 9:02 AM

Post #18 of 58 (2875 views)
Permalink
Re: Apache::DBI [In reply to]

Shakes his head and hopes you will someday get enlightened as to the
purpose of CPAN.


Mithun

--------
> CPAN is great for red hat users (for example) who don't mind breaking things


will at serensoft

Aug 15, 2001, 11:50 AM

Post #19 of 58 (2873 views)
Permalink
Re: Apache::DBI [In reply to]

On Sat, Aug 04, 2001 at 09:32:43PM +0530, Mithun Bhattacharya wrote:
> Shakes his head and hopes you will someday get enlightened as to the
> purpose of CPAN.
>
> --------
> > CPAN is great for red hat users (for example) who don't mind breaking things

let's not condescend too quickly -- when you finally come up for
air you might just get the bends...

here's my level of enlightenment on the purpose of cpan -- see if
i'm off (and if so, please illuminate):

cpan is where you can get perl modules. install the CPAN perl
module itself and you have handy command-line access to
downloading, building, testing and installing any perl module
you could care to shake a stick at.

this will cause no more problems on just about any linux distro
than doing a normal rpm install.

but if you're on debian, you're bypassing debian's advanced
packaging tool with all its inter-dependency info. on debian we
can get the appropriate version of package ABC /for our system/
(old-fashioned/anal "stable" [that's where you find me] vs
wanderlust-driven "testing" vs bleeding-edge "unstable"). with
direct cpan access i'm not sure there's a way to download the old
version of module XYZ that utilizes the old QRS libraries i've
got on my system. (it may be possible, but debian packages take
care of all that for me, saving me lots of learning curve, if it
exists.)

this is an advantage we debianites enjoy, and it's hard to
explain to others.

apt-get install libxml-perl libapache-ssi-perl libhtml-mason-perl

at one time, the system setup i've got right now, was
state-of-the-art, somewhere. my system is basically a snapshot of
that moment in time. with apt-get, instead of the current latest
and greatest -- which might force me to upgrade something
significant before i'm ready -- i'd get the packages that works
with my current system.

unless i'm wrong.

--
Khan said that revenge is a dish best served cold. I think
sometimes it's best served hot, chunky, and foaming.
- P.J.Lee ('79-'80)

will [at] serensoft
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!


geoff at modperlcookbook

Feb 6, 2002, 12:54 PM

Post #20 of 58 (2873 views)
Permalink
Re: Apache::DBI [In reply to]

"Stathy G. Touloumis" wrote:
>
> I thought I saw a posting on how to retrieve an independent database handle
> from Apache::DBI using a certain method call (instead of from the shared
> $dbh for the child). Does anyone know where this documentation may reside
> (If it is possible).

I'm not sure what you mean, really, but perhaps you mean
dbi_connect_method?

from man DBI:

The "dbi_connect_method" attribute can be used to specify which driver
method should be called to establish
the connection. The only useful values are 'connect',
'connect_cached', or some specialized case like
'Apache::DBI::connect' (which is automatically the default when
running within Apache).

so, basically you can create a connection under Apache::DBI that is
_not_ cached using 'connect'.

is that what you meant?

--Geoff


stathy.touloumis at edventions

Feb 6, 2002, 1:06 PM

Post #21 of 58 (2895 views)
Permalink
RE: Apache::DBI [In reply to]

> dbi_connect_method?
>
> from man DBI:
>
> The "dbi_connect_method" attribute can be used to specify which driver
> method should be called to establish
> the connection. The only useful values are 'connect',
> 'connect_cached', or some specialized case like
> 'Apache::DBI::connect' (which is automatically the default when
> running within Apache).
>
> so, basically you can create a connection under Apache::DBI that is
> _not_ cached using 'connect'.

Is that using DBI->connect or Apache::DBI->connect . . .

My understanding is that using Apache::DBI pretty much overrides the
functionality of DBI->connect and returns an existing database handle if it
exists (based on parameters passed to method).

I want to be able to return a cached database handle from a method unless a
certain argument is passed. If this argument is present I would like to
return an independent database handle for perhaps performing transactions.


stathy.touloumis at edventions

Feb 6, 2002, 1:09 PM

Post #22 of 58 (2869 views)
Permalink
RE: Apache::DBI [In reply to]

> I'm not sure what you mean, really, but perhaps you mean
> dbi_connect_method?

Did you mean specifying this argument like so ?

DBI->connect( $driver, $u, $p, { dbi_connect_method=> 'connect' } );

I will see if this is what I am looking for. Thanks for the reference : )


geoff at modperlcookbook

Feb 6, 2002, 1:21 PM

Post #23 of 58 (2881 views)
Permalink
Re: Apache::DBI [In reply to]

"Stathy G. Touloumis" wrote:
>
> > I'm not sure what you mean, really, but perhaps you mean
> > dbi_connect_method?
>
> Did you mean specifying this argument like so ?
>
> DBI->connect( $driver, $u, $p, { dbi_connect_method=> 'connect' } );

yes, you never call Apache::DBI->connect() directly.

>
> I will see if this is what I am looking for.

from what you described in your previous email, I would think it is.

> Thanks for the reference : )

sure :)

--Geoff


drfrog at telus

Feb 6, 2002, 1:29 PM

Post #24 of 58 (2888 views)
Permalink
Re: Apache::DBI [In reply to]

"Stathy G. Touloumis" wrote:
>
> > I'm not sure what you mean, really, but perhaps you mean
> > dbi_connect_method?
>
> Did you mean specifying this argument like so ?
>
> DBI->connect( $driver, $u, $p, { dbi_connect_method=> 'connect' } );
>
> I will see if this is what I am looking for. Thanks for the reference : )

this is how i usually do it in startup.pl:

#dont declare DBI!!!!
use Apache::DBI;

# Initialize the database connections for each child
Apache::DBI->connect_on_init
("DBI:mysql:database=Ezines;host=localhost",
"root","database",
{
PrintError => 1, # warn() on errors
RaiseError => 0, # don't die on error
AutoCommit => 1, # commit executes immediately
}
);

$Apache::DBI::DEBUG = 1;


then in my code i just use DBI as i normally would:


my $dbh =
DBI->connect(

'dbi:mysql(RaiseError=>1,Taint=>1):dbname=database;host=localhost',
'username', 'password', );

my $count = $dbh->selectrow_array( q{
SELECT
count(*)
FROM
Ezines
},
{},
);


$dbh->disconnect;




if you tail the log file you should see Apache::DBI::DEBUG messages


etothex at eudoramail

Feb 12, 2002, 8:16 PM

Post #25 of 58 (2882 views)
Permalink
Re: Apache::DBI [In reply to]

I had tried that, with the same result. (does
Apache::DBI overload the DBI methods?) Full
error is as follows. Again, any help is _highly_
appreciated.

Marty


[error] Can't locate object method "connect_on_init" via package "Apache::DBI" at /etc/httpd/conf/startup.pl line 28.
Compilation failed in require at (eval 14) line 1.

Syntax error on line 1276 of /usr/local/apache/conf/httpd.conf:
Can't locate object method "connect_on_init" via package "Apache::DBI" at /etc/httpd/conf/startup.pl line 28.
Compilation failed in require at (eval 14) line 1.

--

On Tue, 12 Feb 2002 08:44:12 Martin Haase-Thomas wrote:
>
>
>Marty J. Rogers wrote:
>
>>[snip]
>>>>From httpd.conf:
>>
>>PerlModule Apache::DBI CGI DBD::mysql \
>>Apache::AuthenDBI
>>PerlRequire /path/to/startup.pl
>>
>>Alias /perl/ /path/to/perl
>>PerlModule Apache::Registry
>><Location /perl>
>>SetHandler perl-script
>>PerlHandler Apache::Registry
>>Options ExecCGI
>>allow from all
>>PerlSendHeader On
>></Location
>>
>>
>>and from startup.pl:
>>
>>use DBI();
>>
> use Apache::DBI(); # !! :)
>
>>
>>use DBD::mysql();
>>.
>>.
>>.
>>DBI->connect_on_init("DBI:mysql:dbname",
>> "user","pass",
>> {Options here}
>>
>>
>>Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
>>
>
>
>


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com


mht at meome-ag

Feb 13, 2002, 12:24 AM

Post #26 of 58 (1696 views)
Permalink
Re: Apache::DBI [In reply to]

(does
Apache::DBI overload the DBI methods?)

No, it doesn't. It uses Apache and DBI. Did you install the package via
the "Makefile.PL" stanza? Maybe you should just install it another time.
On the other hand, Apache::DBI doesn't export anything. Try calling it
with the package name explicitly.

kind regards
Martin

Marty J. Rogers wrote:

>I had tried that, with the same result. (does
>Apache::DBI overload the DBI methods?) Full
>error is as follows. Again, any help is _highly_
>appreciated.
>
>Marty
>
>
>[error] Can't locate object method "connect_on_init" via package "Apache::DBI" at /etc/httpd/conf/startup.pl line 28.
>Compilation failed in require at (eval 14) line 1.
>
>Syntax error on line 1276 of /usr/local/apache/conf/httpd.conf:
>Can't locate object method "connect_on_init" via package "Apache::DBI" at /etc/httpd/conf/startup.pl line 28.
>Compilation failed in require at (eval 14) line 1.
>
>--
>
>On Tue, 12 Feb 2002 08:44:12 Martin Haase-Thomas wrote:
>
>>
>>Marty J. Rogers wrote:
>>
>>>[snip]
>>>>>From httpd.conf:
>>>
>>>PerlModule Apache::DBI CGI DBD::mysql \
>>>Apache::AuthenDBI
>>>PerlRequire /path/to/startup.pl
>>>
>>>Alias /perl/ /path/to/perl
>>>PerlModule Apache::Registry
>>><Location /perl>
>>>SetHandler perl-script
>>>PerlHandler Apache::Registry
>>>Options ExecCGI
>>>allow from all
>>>PerlSendHeader On
>>></Location
>>>
>>>
>>>and from startup.pl:
>>>
>>>use DBI();
>>>
>> use Apache::DBI(); # !! :)
>>
>>>use DBD::mysql();
>>>.
>>>.
>>>.
>>>DBI->connect_on_init("DBI:mysql:dbname",
>>> "user","pass",
>>> {Options here}
>>>
>>>
>>>Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
>>>
>>
>>
>
>
>Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
>


bhoylma at qwest

Feb 13, 2002, 1:12 PM

Post #27 of 58 (1688 views)
Permalink
Re: Apache::DBI [In reply to]

>>>>> "Marty" == Marty J Rogers <etothex [at] eudoramail> writes:

Marty> I had tried that, with the same result. (does Apache::DBI
Marty> overload the DBI methods?) Full error is as follows. Again,
Marty> any help is _highly_ appreciated.

You must specify the full package name to the connect_on_it sub, as in
Apache::DBI->connect_on_init(...)

Peace.


wreckmybike at yahoo

Jan 6, 2003, 6:05 AM

Post #28 of 58 (1706 views)
Permalink
Re: Apache::DBI [In reply to]

--- Randy Kobes <randy [at] theoryx5> wrote:
> On Thu, 2 Jan 2003, Paul Simon wrote:
>
> > Hi all
> >
> > I have a feeling this may be [OT], "take it to the
> DBI
> > list..." But I'm hoping to eliminate as much as
> > possible any suspicion that Apache::DBI/mod_perl
> is
> > causing my headache. I'm trying to push this
> platform
> > at work ;) If anyone can shed some light on this
> then
> > I'd be very appreciative, of course.
> >
> > I have what's becoming a reoccuring problem with
> an
> > app running under:
> >
> > Apache/2.0.42 (Win32) mod_perl/1.99_08-dev
> Perl/v5.8.0
> >
> >
> > I'm using Apache::compat and Apache::DBI for
> > persistent database connections.
> [ ... ]
> >
> > For completeness sake, here's the connection
> string:
> > my $DBH = DBI->connect("DBI:ODBC:$db", $user,
> $pass,
> > { RaiseError => 1, PrintError => 1, AutoCommit =>
> 1 })
> > or print( "Unable to connect to Database:
> > $DBI::errstr\n" ) ;
> >
> > Finally, the error message I'm getting is:
> >
> > DBI->connect(pdb9) failed:
> > [Oracle][ODBC][Ora]ORA-12535: TNS:operation timed
> out
> > (SQL-S1000)(DBD: db_login/SQLConnect err=-1) at
> > /Apache2/lib/perl/Apache/Standard3.pm line 29
> >
> > This problem goes away if the ORacle server(on
> it's
> > own hardware running windows 2000 pro) is
> restarted.
> > The last time this happened the box Oracle resides
> on
> > needed a cold reboot! So far, I haven't had to
> restart
> > apache.
> >
> > Could Apache::DBI or mod_perl2 cause this
> behavior?
>
> When you say the problem goes away, does this mean
> that
> things work fine after the restart of the Oracle
> server?
> Or do you periodically have to do this restart?
>

This problem has occured 2x so far. I was told by the
DBA that the ORACLE server is having hardware woes...
Anyway, the ORACLE server seems to be working fine,
again. I haven't had to restart the apache server
througout the trouble shooting process. I knew it had
something to do with ORACLE because the SQLplus client
wasn't connecting neither.

I wasn't sure if Apache::DBI was screwing with ORACLE,
especially with persistent connections...


> Are you using the latest versions of DBI and
> DBD::ODBC?
> If not, does an upgrade help?

Those modules are - whatever was bundled with your
first, warmly supplied :), Perl 5.8 + apache2 package
on theoryx5. Possibly, DBI => 1.30 and DBD::ODBC =>
0.43

I don't have quick access to the server, (I wish it
were on some kind of unix); so, i've been a little
lazy about checking the versions, for sure.

>
> --
> best regards,
> randy kobes
>

Thanks,
Paul


perrin at elem

Jan 6, 2003, 10:17 AM

Post #29 of 58 (1679 views)
Permalink
Re: Apache::DBI [In reply to]

Paul Simon wrote:
> I wasn't sure if Apache::DBI was screwing with ORACLE,
> especially with persistent connections...

The Apache::DBI code is really short and easy to read. Basically, it
just doesn't close connections when you call disconnect. It also does
automatic rollbacks at the end of each request to make sure nothing is
left in a bad state, and it pings the db connection each time you ask
for one to make sure it's still alive.

There's nothing in there that should interfere with the normal workings
of DBI.

- Perrin


randy at theoryx5

Jan 7, 2003, 8:22 PM

Post #30 of 58 (1689 views)
Permalink
Re: Apache::DBI [In reply to]

On Mon, 6 Jan 2003, Paul Simon wrote:

> --- Randy Kobes <randy [at] theoryx5> wrote:
>
> > Are you using the latest versions of DBI and
> > DBD::ODBC?
> > If not, does an upgrade help?
>
> Those modules are - whatever was bundled with your
> first, warmly supplied :), Perl 5.8 + apache2 package
> on theoryx5. Possibly, DBI => 1.30 and DBD::ODBC =>
> 0.43

If this is still a problem, you might try an upgrade -
both DBI and DBD::ODBC are at newer versions now. We have
ppm packages (for ActivePerl 8xx builds) of them at
http://theoryx5.uwinnipeg.ca/ppms/

--
best regards,
randy


dlubowa at africaonline

Nov 27, 2003, 9:08 AM

Post #31 of 58 (1695 views)
Permalink
RE: Apache::DBI [In reply to]

i think i have sorted it out ...because the output i have showed below is
yielded by the command httpd -t , but on doing httpd -DSSL -t , i got syntax
ok

and my mod_perl is defined under SSL

so i think it should be okey now ...



--
cheers

David Ziggy Lubowa
Customer Support Engineer
Africa online Uganda Ltd.
5th Floor Commercial Plaza
Plot 7 Kampala, Uganda
Tel: +256-41 258143
Mob: +256-78 323338
Fax: +256-41 258144
email: dlubowa [at] africaonline
www.africaonline.com


-----Original Message-----
From: David Lubowa [mailto:dlubowa [at] africaonline]
Sent: Thursday, November 27, 2003 7:02 PM
To: modperl [at] perl
Subject: Apache::DBI




Hello guys


i am currently installinh rt3 on my FreeBSD4.9RC box , i am running into
some problems on getting the Moule Apache::DBI to workout i keep getting an
error on the LoadModule Apache::DBI line, which i think is due to mod_perl
either not being loaded or just not loaded properly ..below is how my vhost
looks like.

[vhost]


<VirtualHost xx.xx.xx.xx>
ServerName webrt.mydomain.co.ug
DocumentRoot /var/www/rt3/share/html
AddDefaultCharset UTF-8

# these four lines applies to Apache2+mod_perl2 only: {{{
#PerlSetVar MasonArgsMethod CGI
#PerlModule Apache2 Apache::compat
#RewriteEngine On
#RewriteRule ^(.*)/$ $1/index.html
# }}}

PerlModule Apache::DBI
PerlRequire /usr/local/rt3/bin/webmux.pl

<Location />
SetHandler perl-script
PerlHandler RT::Mason
</Location>
</VirtualHost>

[/vhost]


below is my error

[error]

Syntax error on line 1109 of /usr/local/etc/apache/httpd.conf:
Invalid command 'PerlModule', perhaps mis-spelled or defined by a module not
included in the server configuration

[/error]

i assume this is the right syntax...., i dont know why this apache is
giving me this error..could someone please shed some light on this for me.

all help is highly appreciated..


--
cheers

David Ziggy Lubowa
Customer Support Engineer
Africa online Uganda Ltd.
5th Floor Commercial Plaza
Plot 7 Kampala, Uganda
Tel: +256-41 258143
Mob: +256-78 323338
Fax: +256-41 258144
email: dlubowa [at] africaonline
www.africaonline.com



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html




--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


cfrank at plusthree

Jan 8, 2005, 11:38 AM

Post #32 of 58 (1695 views)
Permalink
Re: Apache::DBI [In reply to]

Hi Angie,

> I'm hoping to have a persistent database connection for each request,
> but not get values mixed up between requests and sites.

I think you should be able to connect to your datasource and store the
connection in Apache pnotes something like this in your main connection
routine:

my $dbh;
if ( $ENV{'MOD_PERL'} and !$Apache::ServerStarting ) {
$dbh = Apache->request()->pnotes('dbh');
}
if ( !$dbh ) {
$dbh = DBI->connect_cached(
$config->get_dsn(), $config->get_user(),
$config->get_password(), $db_options
);
if ( $ENV{'MOD_PERL'} and !$Apache::ServerStarting ) {
Apache->request()->pnotes( 'dbh', $dbh );
}
}
return $dbh;


> I thought I'd ask the experts here before I go do something really
> bloated.

I am a bit new to the list and mod_perl, but I have asked the same
question behind the scenes and received help from the list, you will
probably here from others more qualified with a more elegant problem
solution ;)

I use the above code with Apache 1.33 and its corresponding mod_perl.

HTH,

CPF
Attachments: signature.asc (0.18 KB)


perrin at elem

Jan 8, 2005, 11:49 AM

Post #33 of 58 (1702 views)
Permalink
Re: Apache::DBI [In reply to]

On Sat, 2005-01-08 at 19:07 +0000, Angie Ahl wrote:
> Will this work?

Yes.

> Will I have problems with variables becoming "shared" ie vars values
> getting mixed up between connections?

No, not if you call DBI->connect() every time you want a connection.
You only get in trouble if you keep your own copies of the database
handles around and then get them mixed up.

> Is PerlSetVar the best way to pass values from httpd.conf to perl
> securely?

It's a good way, although there are plenty of others. I use a separate
config file usually.

> Do I need to open/close the connection in each of the modules too or
> can I pass the $dbh object to each of my external subroutines, or is
> there an even better way.

Either of those will work, or you could make your own "get_dbh()"
function that handles the dir_config stuff and calls DBI->connect() and
just use that from your subs.

- Perrin


martin_moss at btopenworld

Jan 9, 2005, 8:06 AM

Post #34 of 58 (1688 views)
Permalink
Re: Apache::DBI [In reply to]

> > Is PerlSetVar the best way to pass values from
> httpd.conf to perl
> > securely?
>
> It's a good way, although there are plenty of
> others. I use a separate
> config file usually.
>

For what it's worth I use both. I keep 'site wide'
configuration vales in a Config file/module (usually
Backend DB access modules) and then 'location
specific' values in PerlSetVar's in each </Location>
I find this the most adaptable and maintainable.

regards,

Marty





___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com


martin_moss at btopenworld

Jan 16, 2006, 2:59 AM

Post #35 of 58 (1678 views)
Permalink
Re: Apache::DBI [In reply to]

Not sure why it's doing it, if you've got a default
clean install,

But to control it's debug level you can put this in
your startup.pl

$Apache::DBI::DEBUG=0;

Regards

Marty



--- Paul Harrison <cure [at] austin> wrote:

>
>
> I installed Apache::DBI - 0.98 on FreeBSD 5.4 with
> mod_perl 1.
>
>
>
> Apache::DBI logs an entry in apache error log file
> every time it create(s) a
> new connection or using an existing connection to
> the database server.
>
> Is this normal with this version? And how do I turn
> that feature off?
>
>
>
>
>
> Example,
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
>
>
>
>
> The error log file will get huge after a while.
>
>
>
>
>
> Cure
>
>
>
>




___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/


cure at austin

Jan 16, 2006, 5:57 AM

Post #36 of 58 (1656 views)
Permalink
RE: Apache::DBI [In reply to]

It's a default clean install. I'll try $Apache::DBI::DEBUG=0 to see if that
works.

Thxs



Cure

-----Original Message-----
From: Martin Moss [mailto:martin_moss [at] btopenworld]
Sent: Monday, January 16, 2006 5:00 AM
To: Paul Harrison; modperl [at] perl
Subject: Re: Apache::DBI

Not sure why it's doing it, if you've got a default
clean install,

But to control it's debug level you can put this in
your startup.pl

$Apache::DBI::DEBUG=0;

Regards

Marty



--- Paul Harrison <cure [at] austin> wrote:

>
>
> I installed Apache::DBI - 0.98 on FreeBSD 5.4 with
> mod_perl 1.
>
>
>
> Apache::DBI logs an entry in apache error log file
> every time it create(s) a
> new connection or using an existing connection to
> the database server.
>
> Is this normal with this version? And how do I turn
> that feature off?
>
>
>
>
>
> Example,
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
>
>
>
>
> The error log file will get huge after a while.
>
>
>
>
>
> Cure
>
>
>
>




___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars
online! http://uk.cars.yahoo.com/


cure at austin

Jan 16, 2006, 6:17 AM

Post #37 of 58 (1663 views)
Permalink
RE: Apache::DBI [In reply to]

It fixed it. Thxs




Cure

-----Original Message-----
From: Paul Harrison [mailto:cure [at] austin]
Sent: Monday, January 16, 2006 7:58 AM
To: 'Martin Moss'; 'modperl [at] perl'
Subject: RE: Apache::DBI

It's a default clean install. I'll try $Apache::DBI::DEBUG=0 to see if that
works.

Thxs



Cure

-----Original Message-----
From: Martin Moss [mailto:martin_moss [at] btopenworld]
Sent: Monday, January 16, 2006 5:00 AM
To: Paul Harrison; modperl [at] perl
Subject: Re: Apache::DBI

Not sure why it's doing it, if you've got a default
clean install,

But to control it's debug level you can put this in
your startup.pl

$Apache::DBI::DEBUG=0;

Regards

Marty



--- Paul Harrison <cure [at] austin> wrote:

>
>
> I installed Apache::DBI - 0.98 on FreeBSD 5.4 with
> mod_perl 1.
>
>
>
> Apache::DBI logs an entry in apache error log file
> every time it create(s) a
> new connection or using an existing connection to
> the database server.
>
> Is this normal with this version? And how do I turn
> that feature off?
>
>
>
>
>
> Example,
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
> 55933 Apache::DBI need ping: yes
>
> 55933 Apache::DBI already connected to
>
'database=database_name;host=info_here\AutoCommit=1^\PrintError=1^\Username=
> info_here'
>
>
>
>
>
> The error log file will get huge after a while.
>
>
>
>
>
> Cure
>
>
>
>




___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars
online! http://uk.cars.yahoo.com/


rick at logicmerc

Feb 3, 2007, 10:56 PM

Post #38 of 58 (1532 views)
Permalink
RE: Apache::DBI [In reply to]

Let's say the user connects and fills out a form to create a new record in the
Person table. Let's assume the Person table has an AUTO_INCREMENT column named
'id'. When the user clicks submit, the data in the form is submitted to your
program which will then lock the table for write and insert the record. Your
program then selects the last insert id and unlocks the table so others can
write to it. All of that has to happen in one request to the web server. It
cannot be done over several connections due to the fact that you can never be
sure which instance of DBI you will get.

You can keep track of this id some by storing it in a session or a cookie. This
would allow you to reference that id over several connections.

Good Luck!

Rick Apichairuk

> -----Original Message-----
> From: Octavian Rasnita [mailto:orasnita [at] gmail]
> Sent: Sunday, February 04, 2007 12:50 AM
> To: Rick Apichairuk
> Subject: Re: Apache::DBI
>
> Ok, thanks, but how can I do that?
>
> Octavian
>
> ----- Original Message -----
> From: "Rick Apichairuk" <rick [at] logicmerc>
>
>
> > Octavian,
> >
> > You are right about the need to use table locks. But you will also have to
> > ensure that all of this is happening in one session or one transaction. If
> > it
> > happens over multiple connections to the server, you can't be sure that
> > you will
> > get the same DBI object as the prior request.
> >
> >> -----Original Message-----
> >> From: Octavian Rasnita [mailto:orasnita [at] gmail]
> >> Sent: Saturday, February 03, 2007 3:53 PM
> >> To: modperl [at] perl
> >> Subject: Apache::DBI
> >>
> >> Hi,
> >>
> >> Can you tell me, if I use persistent MySQL connection (with Apache::DBI),
> >> if
> >> I want to use select last_insert_id(), do I need to lock the table before
> >> doing the insert and unlock it after using the last_insert_id()?
> >>
> >> I don't know what could happen if another user of the application makes
> >> another insert right after I do the same thing. I am afraid that it could
> >> return its last inserted ID and not mine.
> >>
> >> Thank you.
> >>
> >> Octavian
> >
> > Rick Apichairuk
> >


orasnita at gmail

Feb 4, 2007, 1:37 AM

Post #39 of 58 (1530 views)
Permalink
Re: Apache::DBI [In reply to]

Ok, I think I understand.
I use last_insert_id() right after making the insert and store it into a
variable and usually I just need to insert some records in another table
right after this, but then I won't need it anymore, so I don't need to store
it.

I assume that if I use the same $dbh reference for accessing the database,
it will use the same connection and it won't return a bad "last inserted
id".

Thanks.
Octavian

----- Original Message -----
From: "Rick Apichairuk" <rick [at] logicmerc>
To: <modperl [at] perl>
Sent: Sunday, February 04, 2007 8:56 AM
Subject: RE: Apache::DBI


> Let's say the user connects and fills out a form to create a new record in
> the
> Person table. Let's assume the Person table has an AUTO_INCREMENT column
> named
> 'id'. When the user clicks submit, the data in the form is submitted to
> your
> program which will then lock the table for write and insert the record.
> Your
> program then selects the last insert id and unlocks the table so others
> can
> write to it. All of that has to happen in one request to the web server.
> It
> cannot be done over several connections due to the fact that you can never
> be
> sure which instance of DBI you will get.
>
> You can keep track of this id some by storing it in a session or a cookie.
> This
> would allow you to reference that id over several connections.
>
> Good Luck!
>
> Rick Apichairuk
>
>> -----Original Message-----
>> From: Octavian Rasnita [mailto:orasnita [at] gmail]
>> Sent: Sunday, February 04, 2007 12:50 AM
>> To: Rick Apichairuk
>> Subject: Re: Apache::DBI
>>
>> Ok, thanks, but how can I do that?
>>
>> Octavian
>>
>> ----- Original Message -----
>> From: "Rick Apichairuk" <rick [at] logicmerc>
>>
>>
>> > Octavian,
>> >
>> > You are right about the need to use table locks. But you will also have
>> > to
>> > ensure that all of this is happening in one session or one transaction.
>> > If
>> > it
>> > happens over multiple connections to the server, you can't be sure that
>> > you will
>> > get the same DBI object as the prior request.
>> >
>> >> -----Original Message-----
>> >> From: Octavian Rasnita [mailto:orasnita [at] gmail]
>> >> Sent: Saturday, February 03, 2007 3:53 PM
>> >> To: modperl [at] perl
>> >> Subject: Apache::DBI
>> >>
>> >> Hi,
>> >>
>> >> Can you tell me, if I use persistent MySQL connection (with
>> >> Apache::DBI),
>> >> if
>> >> I want to use select last_insert_id(), do I need to lock the table
>> >> before
>> >> doing the insert and unlock it after using the last_insert_id()?
>> >>
>> >> I don't know what could happen if another user of the application
>> >> makes
>> >> another insert right after I do the same thing. I am afraid that it
>> >> could
>> >> return its last inserted ID and not mine.
>> >>
>> >> Thank you.
>> >>
>> >> Octavian
>> >
>> > Rick Apichairuk
>> >
>
>


clint at traveljury

Feb 4, 2007, 2:55 AM

Post #40 of 58 (1523 views)
Permalink
Re: Apache::DBI [In reply to]

On Sun, 2007-02-04 at 11:37 +0200, Octavian Rasnita wrote:
> Ok, I think I understand.
> I use last_insert_id() right after making the insert and store it into a
> variable and usually I just need to insert some records in another table
> right after this, but then I won't need it anymore, so I don't need to store
> it.
>
> I assume that if I use the same $dbh reference for accessing the database,
> it will use the same connection and it won't return a bad "last inserted
> id".


Correct. last_insert_id is $dbh specific. So while you may have other
processes doing the same insert on the same tables at the same time,
they are using different $dbh's, and will not interfere with each other.

Clint


pharkins at gmail

Feb 4, 2007, 8:36 AM

Post #41 of 58 (1509 views)
Permalink
Re: Apache::DBI [In reply to]

On 2/4/07, Rick Apichairuk <rick [at] logicmerc> wrote:
> When the user clicks submit, the data in the form is submitted to your
> program which will then lock the table for write and insert the record. Your
> program then selects the last insert id and unlocks the table so others can
> write to it.

Just to be clear, you don't need to explicitly lock a table if you're
using AUTO_INCREMENT for your IDs. MySQL handles the locks
automatically when you do your INSERT.

- Perrin


torsten.foertsch at gmx

Aug 2, 2011, 7:34 AM

Post #42 of 58 (1110 views)
Permalink
Re: Apache::DBI [In reply to]

On Tuesday, 02 August 2011 15:30:28 Feng He wrote:
> I just want to develop a modperl application.
> It's a handler, the database is Mysql.
> Shall I use Apache::DBI, or DBI is just fine ?

It depends. Apache::DBI provides a transparent connection cache. You can
forget the DB handle acquired at some time at the end of the request. The
next DBI::connect will then fetch the handle from the Apache::DBI cache.

On the other hand, all modern DBI versions have connect_cached() (only
ancient version lack this function) which provides much the same
functionality.

Further, applications that are implemented as modperl handlers often tend
to use a singleton to store the DBI handle. In this case Apache::DBI is
not necessary. However, in this scenario you'll have to take care of
cases when the connection is dropped unexpectedly. Nevertheless, I'd
prefer this strategy for new development because it gives you maximum
control over what is going on. But that's just my humble opinion.

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


david at kineticode

Aug 2, 2011, 9:49 AM

Post #43 of 58 (1117 views)
Permalink
Re: Apache::DBI [In reply to]

On Aug 2, 2011, at 6:30 AM, Feng He wrote:

> I just want to develop a modperl application.
> It's a handler, the database is Mysql.
> Shall I use Apache::DBI, or DBI is just fine ?

I recommend DBIx::Connector.

Best,

David


shorttag at gmail

Aug 2, 2011, 11:49 PM

Post #44 of 58 (1116 views)
Permalink
Re: Apache::DBI [In reply to]

Hi,

Thank you all for the info.

I have finished writting the handler this morning, and have enabled
Apache::DBI in httpd.conf.
My handler is for this url:
http://bizstatus.game.yy.com/upload/

It accept client's uploaded data and write the data to database.
The strange stuff is, when I run more than one process for test, the
items number in database in not correct.

for example:

ab -n 100 -c 1 http://bizstatus.game.yy.com/upload/?arguments

This insert 100 items into database, the select result is correct.

But this one:

ab -n 100 -c 2 http://bizstatus.game.yy.com/upload/?arguments

or:

ab -n 100 -c 3 http://bizstatus.game.yy.com/upload/?arguments


When the client number is larger than one, the items number in
database is not correct.
it's always larger than 100, for example, 101, 102, 103 etc.

So, what's wrong with my program?

The handler looks as:

package ABC;
use strict;
use Apache2::RequestIO ();
use Apache2::RequestRec ();
use Apache2::Connection ();
use Apache2::RequestUtil ();
use Apache2::Request ();
use DBI;


use Apache2::Const -compile => qw(OK NOT_FOUND);

sub handler {

my $r = shift;
my $q = Apache2::Request->new($r);
my $ip = $r->connection->remote_ip;

my $v1 = $q->param('arg1');
my $v2 = $q->param('arg2');


my $db = 'mydb';
my $host = '127.0.0.1';
my $port = 3306;
my $user = '***';
my $passwd = '***';
my $dbh = DBI->connect("dbi:mysql:database=$db;host=$host;port=$port",
$user, $passwd)
or die $DBI::errstr;

my $str = "insert into mytable (v1,v2,check_time)
values(?,?,now())";

my $sth = $dbh->prepare($str);
$sth->execute($v1,$v2) or die $dbh->errstr;
$sth->finish;

$r->content_type('text/plain');
$r->print('OK');

return Apache2::Const::OK;
}

1;



Thank you!


adam.prime at utoronto

Aug 3, 2011, 5:56 AM

Post #45 of 58 (1112 views)
Permalink
Re: Apache::DBI [In reply to]

On 8/3/2011 2:49 AM, Feng He wrote:
> Hi,
>
> Thank you all for the info.
>
> I have finished writting the handler this morning, and have enabled
> Apache::DBI in httpd.conf.
> My handler is for this url:
> http://bizstatus.game.yy.com/upload/
>
> It accept client's uploaded data and write the data to database.
> The strange stuff is, when I run more than one process for test, the
> items number in database in not correct.
>
> for example:
>
> ab -n 100 -c 1 http://bizstatus.game.yy.com/upload/?arguments
>
> This insert 100 items into database, the select result is correct.
>
> But this one:
>
> ab -n 100 -c 2 http://bizstatus.game.yy.com/upload/?arguments
>
> or:
>
> ab -n 100 -c 3 http://bizstatus.game.yy.com/upload/?arguments
>
>
> When the client number is larger than one, the items number in
> database is not correct.
> it's always larger than 100, for example, 101, 102, 103 etc.
>
> So, what's wrong with my program?
>
> Thank you!

The first thing i'd suggest is looking at the access and error logs, and
seeing if there are anything in there that will tell you what's wrong
with it.

Nothing looks wrong at first glance to me, though you should check for
errors on the prepare call.

Adam


perrin at elem

Aug 3, 2011, 6:47 AM

Post #46 of 58 (1112 views)
Permalink
Re: Apache::DBI [In reply to]

On Wed, Aug 3, 2011 at 2:49 AM, Feng He <shorttag [at] gmail> wrote:
> ab -n 100 -c 3 http://bizstatus.game.yy.com/upload/?arguments
>
>
> When the client number is larger than one, the items number in
> database is not correct.
> it's always larger than 100, for example, 101, 102, 103 etc.
>
> So, what's wrong with my program?

I think your program is fine. I suspect ab is not that precise.

- Perrin


online.jerry at gmail

Aug 3, 2011, 10:47 AM

Post #47 of 58 (1112 views)
Permalink
Re: Apache::DBI [In reply to]

How about DBIx::Connector?

On Tue, Aug 2, 2011 at 6:30 AM, Feng He <shorttag [at] gmail> wrote:

> Hi,
>
> I just want to develop a modperl application.
> It's a handler, the database is Mysql.
> Shall I use Apache::DBI, or DBI is just fine ?
>
> Thank u.
> Regards.
>



--
Your clothes may be the latest in style but you aint completely dressed
until you wear a smile!
Keep smiling : )


jschueler at eloquency

May 31, 2013, 8:50 AM

Post #48 of 58 (65 views)
Permalink
Re: Apache::DBI [In reply to]

I still use Alpine. And they never fixed the bug where ctrl-c (to cancel
a message) and ctrl-x (to send) are so easily confused. Oops. Maybe it's
time to start using a mouse.

Having wasted so much time, I'll try to be succinct:

Most modules on CPAN are bascially throwaways and not supported at all.
Use them at your own risk.

There are some modules that are just obsolete. Good intentions aside,
the developers lost interest and moved on. These are less risky if
there's an established user base.

There are some very good modules, widely used, that are fully supported
and perfectly safe for a production environment.

Most mod_perl modules, especially the core modules, fall into that last,
gold standard, category. In many cases, support is transferred from one
individual to another. And so that commitment is documented. But if a
module is no longer supported, don't lie about it. Support forums are an
incredible resource. But if commercial software developers similarly
blurred this distinction, every p.o.s. would be advertising free 24x7 tech
support.

Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
response, I've concluded that Apache::DBI is no longer supported and has
been superceded by newer modules. Especially if no one responds and
explicitly accepts the responsibility, this seems like the most
appropriate answer for the poster of the original thread.

I owe you a :) from a couple posts ago. :)

-Jim

On Fri, 31 May 2013, Perrin Harkins wrote:

> Hi Jim,
> I appreciate the thought, but I'm not the mod_perl list.  If you look at who
> has done the most support around here recently, it's probably Torsten.
>  (Thanks Torsten!)  More to the point, there are many people on the list who
> know enough perl to help with a question about Apache::DBI.  It's a common
> practice to point people here for support on mod_perl modules.
>
> What are you getting at?  Is there a module that you're having trouble with
> and can't get support for?
>
> - Perrin
>
>
> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
> wrote:
> There's an existing thread with an Apache::DBI question.  But
> since I want to post a separate question to this list, I decided
> to start a new thread.
>
> Just got done reading the Man page for Apache::DBI.  One of the
> last notes suggests that this package is obsolete (having been
> replaced by Class::DBI or DBIx::CLASS).  Beyond that is the
> following:
>
>   Edmund Mergl was the original author of Apache::DBI. It is now
> supported
>   and maintained by the modperl mailinglist, see the mod_perl
> documentation
>   for instructions on how to subscribe.
>
> Unless Perrin Harkins agreed to take over support for this
> module, then that statement is not true.  Otherwise, out of
> respect for Perrin, I'll try to be general.
>
> (Aside:  Am I the only developer that comes across 'unless () {}
> else {}' constructions?)
>
> It seems very few distros on CPAN are actually supported.  For
> my part, I still monitor this list to support my own
> contributions from *many* years ago.  And I k
>
>
>
>


pharkins at gmail

May 31, 2013, 9:25 AM

Post #49 of 58 (65 views)
Permalink
Re: Apache::DBI [In reply to]

The mailing list has been the official place for support of all bundled
mod_perl modules for as long as I can remember. I don't think there's a
rule about perl core modules being passed between individuals either,
although I could be wrong. Sending people to a mailing list for support is
a common practice with any widely used module, e.g. DBI.

Apache::DBI is obsolete in the sense that most people are using an ORM
framework that handles database persistence for them, so they have no use
for Apache::DBI. It's not broken, and people should feel free to use it if
it fits their use case. It has certain advantages over
DBI->connect_cached() which have been discussed here many times.

I'm not sure why you're concluding that Apache::DBI is unsupported. To me,
getting multiple responses on a mailing list is pretty much Platinum Level
Support for open source. If no one stepping forward to say "I own X, let
me debug it for you" means that X is unsupported and obsolete, then I think
we're all in trouble.

Open source support has always been laissez-faire (unless you choose to
hire someone for it). The only thing that has changed recently is that
with more viable web runtime options to choose from (PSGI, FastCGI's
comeback, etc.), the perl web dev world is more splintered and there are
fewer people on the mod_perl list than there used to be. That's a little
sad for me to see, but the new stuff is pretty nice too, and lots of people
are still using mod_perl and answering questions on this list.

- Perrin


On Fri, May 31, 2013 at 11:50 AM, Jim Schueler <jschueler [at] eloquency>wrote:

> I still use Alpine. And they never fixed the bug where ctrl-c (to cancel
> a message) and ctrl-x (to send) are so easily confused. Oops. Maybe it's
> time to start using a mouse.
>
> Having wasted so much time, I'll try to be succinct:
>
> Most modules on CPAN are bascially throwaways and not supported at all.
> Use them at your own risk.
>
> There are some modules that are just obsolete. Good intentions aside,
> the developers lost interest and moved on. These are less risky if
> there's an established user base.
>
> There are some very good modules, widely used, that are fully supported
> and perfectly safe for a production environment.
>
> Most mod_perl modules, especially the core modules, fall into that last,
> gold standard, category. In many cases, support is transferred from one
> individual to another. And so that commitment is documented. But if a
> module is no longer supported, don't lie about it. Support forums are an
> incredible resource. But if commercial software developers similarly
> blurred this distinction, every p.o.s. would be advertising free 24x7 tech
> support.
>
> Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
> response, I've concluded that Apache::DBI is no longer supported and has
> been superceded by newer modules. Especially if no one responds and
> explicitly accepts the responsibility, this seems like the most appropriate
> answer for the poster of the original thread.
>
> I owe you a :) from a couple posts ago. :)
>
> -Jim
>
>
> On Fri, 31 May 2013, Perrin Harkins wrote:
>
> Hi Jim,
>> I appreciate the thought, but I'm not the mod_perl list. If you look at
>> who
>> has done the most support around here recently, it's probably Torsten.
>> (Thanks Torsten!) More to the point, there are many people on the list
>> who
>> know enough perl to help with a question about Apache::DBI. It's a common
>> practice to point people here for support on mod_perl modules.
>>
>> What are you getting at? Is there a module that you're having trouble
>> with
>> and can't get support for?
>>
>> - Perrin
>>
>>
>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
>> wrote:
>> There's an existing thread with an Apache::DBI question. But
>> since I want to post a separate question to this list, I decided
>> to start a new thread.
>>
>> Just got done reading the Man page for Apache::DBI. One of the
>> last notes suggests that this package is obsolete (having been
>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>> following:
>>
>> Edmund Mergl was the original author of Apache::DBI. It is now
>> supported
>> and maintained by the modperl mailinglist, see the mod_perl
>> documentation
>> for instructions on how to subscribe.
>>
>> Unless Perrin Harkins agreed to take over support for this
>> module, then that statement is not true. Otherwise, out of
>> respect for Perrin, I'll try to be general.
>>
>> (Aside: Am I the only developer that comes across 'unless () {}
>> else {}' constructions?)
>>
>> It seems very few distros on CPAN are actually supported. For
>> my part, I still monitor this list to support my own
>> contributions from *many* years ago. And I k
>>
>>
>>
>>


aw at ice-sa

May 31, 2013, 9:41 AM

Post #50 of 58 (65 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

Just butting in, apologies.

It may not have been Jim's intention below, but I get the impression that his comments on
CPAN are a bit harsh.

It is true that a number of modules are apparently no longer supported. I have used many
modules over the years, and sometimes have had problems with some of them (mostly not
though). And when for these problematic cases, I have tried to get help, the results have
beem mixed; but the mix for me has been rather good. I would say that in my case, 90% of
the CPAN modules I ever used worked out of the box. For the 10% remaining, in 75% of the
cases I did get help from the person advertised as the author or the maintainer, and in
25% of cases I never got a response.
But then, as Jim himself indicated, people move on, without necessarily changing their
email addresses. Considering how old some of these modules are, I guess people also
retire, or even pass away.

But the fact of the matter is that CPAN is still an incredible resource, unequalled in my
view by any other similar module library of any other language anywhere. And I find it
amazing that at least 90% of the modules which I have downloaded from CPAN and used over
the last 15 years, just work, and moreover keep on working through many, many iterations
of programs and perl versions, and that in fact one very rarely needs additional support
for them. When I compare this with other programming languages and support libraries, I
believe we perl programmers are incredibly spoiled.

Another area where CPAN shines, is the documentation of most modules. I cannot count the
times where I was faced with a request in an area of which I knew nothing at all, and have
just browsed CPAN for modules related to that area, just to read their documentation and
get at least an idea of what this was all about.
In recent years, Wikipedia may slowly becoming a runner-up, in terms of general
information. But when it comes down to the nitty-gritty of interfacing with whatever API
(or lack of ditto) programmers in their most delirious moments might have come up with,
these CPAN modules are unbeatable. Even if after that you decide to program your stuff in
another language than perl, it's still useful.
(Just for fun, go into CPAN and search for "NATO" (or more pragmatically, for "sharepoint"
e.g.)(or even, God forbid, for "Google" or "Facebook" ;-)); who thinks of such things ?)

So, to summarise : that some modules on CPAN would be marked as "maintained" or
"supported" and would turn out on closer inspection not to really be anymore, I find this
a very small price to pay for the wealth of good information and working code that lives
there.

My sincerest thanks to CPAN and all its contributors and maintainers over the years (that
includes you of course, Jim). What you have done and are doing is of incredible benefit
to many, many programmers worldwide.

André


Jim Schueler wrote:
> I still use Alpine. And they never fixed the bug where ctrl-c (to
> cancel a message) and ctrl-x (to send) are so easily confused. Oops.
> Maybe it's time to start using a mouse.
>
> Having wasted so much time, I'll try to be succinct:
>
> Most modules on CPAN are bascially throwaways and not supported at all.
> Use them at your own risk.
>
> There are some modules that are just obsolete. Good intentions aside,
> the developers lost interest and moved on. These are less risky if
> there's an established user base.
>
> There are some very good modules, widely used, that are fully supported
> and perfectly safe for a production environment.
>
> Most mod_perl modules, especially the core modules, fall into that last,
> gold standard, category. In many cases, support is transferred from one
> individual to another. And so that commitment is documented. But if a
> module is no longer supported, don't lie about it. Support forums are
> an incredible resource. But if commercial software developers similarly
> blurred this distinction, every p.o.s. would be advertising free 24x7
> tech support.
>
> Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
> response, I've concluded that Apache::DBI is no longer supported and has
> been superceded by newer modules. Especially if no one responds and
> explicitly accepts the responsibility, this seems like the most
> appropriate answer for the poster of the original thread.
>
> I owe you a :) from a couple posts ago. :)
>
> -Jim
>
> On Fri, 31 May 2013, Perrin Harkins wrote:
>
>> Hi Jim,
>> I appreciate the thought, but I'm not the mod_perl list. If you look
>> at who
>> has done the most support around here recently, it's probably Torsten.
>> (Thanks Torsten!) More to the point, there are many people on the
>> list who
>> know enough perl to help with a question about Apache::DBI. It's a
>> common
>> practice to point people here for support on mod_perl modules.
>>
>> What are you getting at? Is there a module that you're having trouble
>> with
>> and can't get support for?
>>
>> - Perrin
>>
>>
>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
>> wrote:
>> There's an existing thread with an Apache::DBI question. But
>> since I want to post a separate question to this list, I decided
>> to start a new thread.
>>
>> Just got done reading the Man page for Apache::DBI. One of the
>> last notes suggests that this package is obsolete (having been
>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>> following:
>>
>> Edmund Mergl was the original author of Apache::DBI. It is now
>> supported
>> and maintained by the modperl mailinglist, see the mod_perl
>> documentation
>> for instructions on how to subscribe.
>>
>> Unless Perrin Harkins agreed to take over support for this
>> module, then that statement is not true. Otherwise, out of
>> respect for Perrin, I'll try to be general.
>>
>> (Aside: Am I the only developer that comes across 'unless () {}
>> else {}' constructions?)
>>
>> It seems very few distros on CPAN are actually supported. For
>> my part, I still monitor this list to support my own
>> contributions from *many* years ago. And I k
>>
>>
>>
>>


vv.lists at wanadoo

May 31, 2013, 10:07 AM

Post #51 of 58 (41 views)
Permalink
Re: Apache::DBI [In reply to]

> the perl web dev world is more splintered and there are fewer people
> on the mod_perl list than there used to be. That's a little sad for
> me to see, but the new stuff is pretty nice too, and lots of people
> are still using mod_perl and answering questions on this list.
>

I wonder if the fact that mod_perl works so well sometimes plays against
it?

Jim's comments remind me of a few others before on the list, with the
author asking if it's dead because they don't see any activity. It's not
dead at all, it just does the job, quietly and very well.

There was a discussion a while back on HN or /., started by someone
complaining that some linux packages hadn't changed in years (can't
remember exactly now, but it was about essential things like ls, ps...
commands being used everyday by millions). The reason being of course
that these packages were just fine as they were.

--
Salutations, Vincent Veyron
http://marica.fr/site/demonstration
Logiciel de gestion des contentieux juridiques et des sinistres d'assurance


jschueler at eloquency

May 31, 2013, 10:30 AM

Post #52 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

No apology please. In terms of trying to qualify any of this, a larger
statistical pool is better. And I am no authority. My perceptions are
largely based on forum postings which causes an inherent bias.

I'd love to see this conversation continue, especially if participants
included those who commit significant resources to their technology
decisions. In other words, people who hire and pay Perl programmers.
They're likely to be as skeptical as I am. I've never been a cheerleader.

In their absence, I'd note that your post has an interesting ambiguity: Is
the number of unsupported modules 2.5% or 25%? (For more rhetorical
nit-picking, you probably don't use the ones that don't work :) Also, the
significant question seems to be whether Apache::DBI is supported or not.
From Mr. Zheng's point-of-view (in this case, the one that matters) the
number might be much higher.

-Jim

On Fri, 31 May 2013, André Warnier wrote:

> Just butting in, apologies.
>
> It may not have been Jim's intention below, but I get the impression that his
> comments on CPAN are a bit harsh.
>
> It is true that a number of modules are apparently no longer supported. I
> have used many modules over the years, and sometimes have had problems with
> some of them (mostly not though). And when for these problematic cases, I
> have tried to get help, the results have beem mixed; but the mix for me has
> been rather good. I would say that in my case, 90% of the CPAN modules I ever
> used worked out of the box. For the 10% remaining, in 75% of the cases I did
> get help from the person advertised as the author or the maintainer, and in
> 25% of cases I never got a response.
> But then, as Jim himself indicated, people move on, without necessarily
> changing their email addresses. Considering how old some of these modules
> are, I guess people also retire, or even pass away.
>
> But the fact of the matter is that CPAN is still an incredible resource,
> unequalled in my view by any other similar module library of any other
> language anywhere. And I find it amazing that at least 90% of the modules
> which I have downloaded from CPAN and used over the last 15 years, just work,
> and moreover keep on working through many, many iterations of programs and
> perl versions, and that in fact one very rarely needs additional support for
> them. When I compare this with other programming languages and support
> libraries, I believe we perl programmers are incredibly spoiled.
>
> Another area where CPAN shines, is the documentation of most modules. I
> cannot count the times where I was faced with a request in an area of which I
> knew nothing at all, and have just browsed CPAN for modules related to that
> area, just to read their documentation and get at least an idea of what this
> was all about.
> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
> general information. But when it comes down to the nitty-gritty of
> interfacing with whatever API (or lack of ditto) programmers in their most
> delirious moments might have come up with, these CPAN modules are unbeatable.
> Even if after that you decide to program your stuff in another language than
> perl, it's still useful.
> (Just for fun, go into CPAN and search for "NATO" (or more pragmatically, for
> "sharepoint" e.g.)(or even, God forbid, for "Google" or "Facebook" ;-)); who
> thinks of such things ?)
>
> So, to summarise : that some modules on CPAN would be marked as "maintained"
> or "supported" and would turn out on closer inspection not to really be
> anymore, I find this a very small price to pay for the wealth of good
> information and working code that lives there.
>
> My sincerest thanks to CPAN and all its contributors and maintainers over the
> years (that includes you of course, Jim). What you have done and are doing
> is of incredible benefit to many, many programmers worldwide.
>
> André
>
>
> Jim Schueler wrote:
>> I still use Alpine. And they never fixed the bug where ctrl-c (to cancel a
>> message) and ctrl-x (to send) are so easily confused. Oops. Maybe it's
>> time to start using a mouse.
>>
>> Having wasted so much time, I'll try to be succinct:
>>
>> Most modules on CPAN are bascially throwaways and not supported at all.
>> Use them at your own risk.
>>
>> There are some modules that are just obsolete. Good intentions aside,
>> the developers lost interest and moved on. These are less risky if
>> there's an established user base.
>>
>> There are some very good modules, widely used, that are fully supported
>> and perfectly safe for a production environment.
>>
>> Most mod_perl modules, especially the core modules, fall into that last,
>> gold standard, category. In many cases, support is transferred from one
>> individual to another. And so that commitment is documented. But if a
>> module is no longer supported, don't lie about it. Support forums are an
>> incredible resource. But if commercial software developers similarly
>> blurred this distinction, every p.o.s. would be advertising free 24x7 tech
>> support.
>>
>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
>> response, I've concluded that Apache::DBI is no longer supported and has
>> been superceded by newer modules. Especially if no one responds and
>> explicitly accepts the responsibility, this seems like the most appropriate
>> answer for the poster of the original thread.
>>
>> I owe you a :) from a couple posts ago. :)
>>
>> -Jim
>>
>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>
>>> Hi Jim,
>>> I appreciate the thought, but I'm not the mod_perl list. If you look at
>>> who
>>> has done the most support around here recently, it's probably Torsten.
>>> (Thanks Torsten!) More to the point, there are many people on the list
>>> who
>>> know enough perl to help with a question about Apache::DBI. It's a common
>>> practice to point people here for support on mod_perl modules.
>>>
>>> What are you getting at? Is there a module that you're having trouble
>>> with
>>> and can't get support for?
>>>
>>> - Perrin
>>>
>>>
>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
>>> wrote:
>>> There's an existing thread with an Apache::DBI question. But
>>> since I want to post a separate question to this list, I decided
>>> to start a new thread.
>>>
>>> Just got done reading the Man page for Apache::DBI. One of the
>>> last notes suggests that this package is obsolete (having been
>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>> following:
>>>
>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>> supported
>>> and maintained by the modperl mailinglist, see the mod_perl
>>> documentation
>>> for instructions on how to subscribe.
>>>
>>> Unless Perrin Harkins agreed to take over support for this
>>> module, then that statement is not true. Otherwise, out of
>>> respect for Perrin, I'll try to be general.
>>>
>>> (Aside: Am I the only developer that comes across 'unless () {}
>>> else {}' constructions?)
>>>
>>> It seems very few distros on CPAN are actually supported. For
>>> my part, I still monitor this list to support my own
>>> contributions from *many* years ago. And I k
>>>
>>>
>>>
>>>
>


fred at redhotpenguin

May 31, 2013, 11:20 AM

Post #53 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

> In their absence, I'd note that your post has an interesting ambiguity: Is
> the number of unsupported modules 2.5% or 25%?

The 'supported' metric doesn't really translate the same in reference
to open source software as it does to commercial software. When a
commercial software product becomes unsupported (think IE6), then you
are out in the cold. You don't have the source code, so you can't fix
an issue with it, or hire someone to fix the issue. Unless you are
really good with a hex code editor and patching binary files, you're
out of luck.

With open source software like Perl, you may see statements like 'Perl
5.6 is no longer officially supported'. This means you probably won't
be able to get the P5P team to fix bugs or security issues if they
come up. Still, you have the source code, so you can fix it yourself.

CPAN is a bit more murky in that individual authors can decide to
deprecate modules, or they can drop off the face of the earth, but
widely used modules such as Apache::DBI, SOAP::Lite (maintenance
recently stewarded by yours truly) will almost always have volunteers
step up and maintain them, because those volunteers need those modules
to be functioning for own work. In terms of a supported metric, I'd
say modules that are used by more than a few people are supported
100%.

With regards to Apache::DBI, it is very much supported :) But this
comes with the general open source software caveat - "Using open
source software doesn't mean someone will do *your work* for free". If
there's a feature that appeals to more than a couple users, or a bug
that affects more than a couple users, odds are that it will get
fixed. Features that only one user is after will likely not be
implemented by the maintainers, but patches for those features are
usually readily accepted.

On Fri, May 31, 2013 at 10:30 AM, Jim Schueler <jschueler [at] eloquency> wrote:
> No apology please. In terms of trying to qualify any of this, a larger
> statistical pool is better. And I am no authority. My perceptions are
> largely based on forum postings which causes an inherent bias.
>
> I'd love to see this conversation continue, especially if participants
> included those who commit significant resources to their technology
> decisions. In other words, people who hire and pay Perl programmers.
> They're likely to be as skeptical as I am. I've never been a cheerleader.
>
> In their absence, I'd note that your post has an interesting ambiguity: Is
> the number of unsupported modules 2.5% or 25%? (For more rhetorical
> nit-picking, you probably don't use the ones that don't work :) Also, the
> significant question seems to be whether Apache::DBI is supported or not.
> From Mr. Zheng's point-of-view (in this case, the one that matters) the
> number might be much higher.
>
> -Jim
>
>
> On Fri, 31 May 2013, André Warnier wrote:
>
>> Just butting in, apologies.
>>
>> It may not have been Jim's intention below, but I get the impression that
>> his comments on CPAN are a bit harsh.
>>
>> It is true that a number of modules are apparently no longer supported. I
>> have used many modules over the years, and sometimes have had problems with
>> some of them (mostly not though). And when for these problematic cases, I
>> have tried to get help, the results have beem mixed; but the mix for me has
>> been rather good. I would say that in my case, 90% of the CPAN modules I
>> ever used worked out of the box. For the 10% remaining, in 75% of the cases
>> I did get help from the person advertised as the author or the maintainer,
>> and in 25% of cases I never got a response.
>> But then, as Jim himself indicated, people move on, without necessarily
>> changing their email addresses. Considering how old some of these modules
>> are, I guess people also retire, or even pass away.
>>
>> But the fact of the matter is that CPAN is still an incredible resource,
>> unequalled in my view by any other similar module library of any other
>> language anywhere. And I find it amazing that at least 90% of the modules
>> which I have downloaded from CPAN and used over the last 15 years, just
>> work, and moreover keep on working through many, many iterations of programs
>> and perl versions, and that in fact one very rarely needs additional support
>> for them. When I compare this with other programming languages and support
>> libraries, I believe we perl programmers are incredibly spoiled.
>>
>> Another area where CPAN shines, is the documentation of most modules. I
>> cannot count the times where I was faced with a request in an area of which
>> I knew nothing at all, and have just browsed CPAN for modules related to
>> that area, just to read their documentation and get at least an idea of what
>> this was all about.
>> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
>> general information. But when it comes down to the nitty-gritty of
>> interfacing with whatever API (or lack of ditto) programmers in their most
>> delirious moments might have come up with, these CPAN modules are
>> unbeatable. Even if after that you decide to program your stuff in another
>> language than perl, it's still useful.
>> (Just for fun, go into CPAN and search for "NATO" (or more pragmatically,
>> for "sharepoint" e.g.)(or even, God forbid, for "Google" or "Facebook" ;-));
>> who thinks of such things ?)
>>
>> So, to summarise : that some modules on CPAN would be marked as
>> "maintained" or "supported" and would turn out on closer inspection not to
>> really be anymore, I find this a very small price to pay for the wealth of
>> good information and working code that lives there.
>>
>> My sincerest thanks to CPAN and all its contributors and maintainers over
>> the years (that includes you of course, Jim). What you have done and are
>> doing is of incredible benefit to many, many programmers worldwide.
>>
>> André
>>
>>
>> Jim Schueler wrote:
>>>
>>> I still use Alpine. And they never fixed the bug where ctrl-c (to cancel
>>> a message) and ctrl-x (to send) are so easily confused. Oops. Maybe it's
>>> time to start using a mouse.
>>>
>>> Having wasted so much time, I'll try to be succinct:
>>>
>>> Most modules on CPAN are bascially throwaways and not supported at all.
>>> Use them at your own risk.
>>>
>>> There are some modules that are just obsolete. Good intentions aside,
>>> the developers lost interest and moved on. These are less risky if
>>> there's an established user base.
>>>
>>> There are some very good modules, widely used, that are fully supported
>>> and perfectly safe for a production environment.
>>>
>>> Most mod_perl modules, especially the core modules, fall into that last,
>>> gold standard, category. In many cases, support is transferred from one
>>> individual to another. And so that commitment is documented. But if a
>>> module is no longer supported, don't lie about it. Support forums are an
>>> incredible resource. But if commercial software developers similarly
>>> blurred this distinction, every p.o.s. would be advertising free 24x7 tech
>>> support.
>>>
>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
>>> response, I've concluded that Apache::DBI is no longer supported and has
>>> been superceded by newer modules. Especially if no one responds and
>>> explicitly accepts the responsibility, this seems like the most appropriate
>>> answer for the poster of the original thread.
>>>
>>> I owe you a :) from a couple posts ago. :)
>>>
>>> -Jim
>>>
>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>
>>>> Hi Jim,
>>>> I appreciate the thought, but I'm not the mod_perl list. If you look at
>>>> who
>>>> has done the most support around here recently, it's probably Torsten.
>>>> (Thanks Torsten!) More to the point, there are many people on the list
>>>> who
>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>> common
>>>> practice to point people here for support on mod_perl modules.
>>>>
>>>> What are you getting at? Is there a module that you're having trouble
>>>> with
>>>> and can't get support for?
>>>>
>>>> - Perrin
>>>>
>>>>
>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
>>>> wrote:
>>>> There's an existing thread with an Apache::DBI question. But
>>>> since I want to post a separate question to this list, I decided
>>>> to start a new thread.
>>>>
>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>> last notes suggests that this package is obsolete (having been
>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>> following:
>>>>
>>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>>> supported
>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>> documentation
>>>> for instructions on how to subscribe.
>>>>
>>>> Unless Perrin Harkins agreed to take over support for this
>>>> module, then that statement is not true. Otherwise, out of
>>>> respect for Perrin, I'll try to be general.
>>>>
>>>> (Aside: Am I the only developer that comes across 'unless () {}
>>>> else {}' constructions?)
>>>>
>>>> It seems very few distros on CPAN are actually supported. For
>>>> my part, I still monitor this list to support my own
>>>> contributions from *many* years ago. And I k
>>>>
>>>>
>>>>
>>>>
>


aw at ice-sa

May 31, 2013, 12:29 PM

Post #54 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

Jim Schueler wrote:
> No apology please. In terms of trying to qualify any of this, a larger
> statistical pool is better. And I am no authority. My perceptions are
> largely based on forum postings which causes an inherent bias.
>
> I'd love to see this conversation continue, especially if participants
> included those who commit significant resources to their technology
> decisions. In other words, people who hire and pay Perl programmers.
> They're likely to be as skeptical as I am. I've never been a cheerleader.
>
> In their absence, I'd note that your post has an interesting ambiguity:
> Is the number of unsupported modules 2.5% or 25%?

Note that this was prefixed by "for the 10% remaining,", so it was indeed 2.5%.
My mothertongue is not English, so I am subject to the occasional linguistic slippage.
It would probably have been clearer had I written "Of the remaining 10%,".

(For more rhetorical
> nit-picking, you probably don't use the ones that don't work :)

Maybe. But I do use quite a few that do work and never needed any support.
And there are thousands of add-on modules in other languages that don't work and that I
don't use either. (So where does that leave us, statistically speaking ?)

I believe that Vincent's comment is right on the spot : perl, and perl CPAN modules, and
mod_perl, generally work so well that there are not a lot of support requests, and that
situation by itself makes them rather "transparent". "Happy people have no History"
(French proverb, translated literally).

There is a similar situation elsewhere in the IT world : some environments or applications
need a lot of support just to keep running. Therefore, they need a large support staff.
Therefore, their department grows larger and their boss gets a lot of clout and a big
budget. In contrast, the application which just works and doesn't require much support,
does not make headlines, tends to get forgotten and gets less staff, a smaller boss and a
smaller budget. Unfair but often seen.

Maybe the perl situation is not so bad in reality though. I have it from some usually
reliable sources that there is a gradual regain of popularity of perl among younger
programmers. That is certainly the case among the young programmers that I employ. They
usually arrive all infatuated by things java and PHP and .net and sharp, and look
sceptically at best upon anything around perl. Then they are asked to solve some simple
issues, and pick their preferred language to do it. Then they are shown the perl way of
doing it, and that generally succeeds in getting their attention.
It's a slow process, but one has to patiently overcome years of Java and MS propaganda,
and that doesn't happen in a day.


Also,
> the significant question seems to be whether Apache::DBI is supported or
> not.
>> From Mr. Zheng's point-of-view (in this case, the one that matters) the
> number might be much higher.
>
> -Jim
>
> On Fri, 31 May 2013, André Warnier wrote:
>
>> Just butting in, apologies.
>>
>> It may not have been Jim's intention below, but I get the impression
>> that his comments on CPAN are a bit harsh.
>>
>> It is true that a number of modules are apparently no longer
>> supported. I have used many modules over the years, and sometimes
>> have had problems with some of them (mostly not though). And when for
>> these problematic cases, I have tried to get help, the results have
>> beem mixed; but the mix for me has been rather good. I would say that
>> in my case, 90% of the CPAN modules I ever used worked out of the
>> box. For the 10% remaining, in 75% of the cases I did get help from
>> the person advertised as the author or the maintainer, and in 25% of
>> cases I never got a response.
>> But then, as Jim himself indicated, people move on, without
>> necessarily changing their email addresses. Considering how old some
>> of these modules are, I guess people also retire, or even pass away.
>>
>> But the fact of the matter is that CPAN is still an incredible
>> resource, unequalled in my view by any other similar module library of
>> any other language anywhere. And I find it amazing that at least 90%
>> of the modules which I have downloaded from CPAN and used over the
>> last 15 years, just work, and moreover keep on working through many,
>> many iterations of programs and perl versions, and that in fact one
>> very rarely needs additional support for them. When I compare this
>> with other programming languages and support libraries, I believe we
>> perl programmers are incredibly spoiled.
>>
>> Another area where CPAN shines, is the documentation of most modules.
>> I cannot count the times where I was faced with a request in an area
>> of which I knew nothing at all, and have just browsed CPAN for modules
>> related to that area, just to read their documentation and get at
>> least an idea of what this was all about.
>> In recent years, Wikipedia may slowly becoming a runner-up, in terms
>> of general information. But when it comes down to the nitty-gritty of
>> interfacing with whatever API (or lack of ditto) programmers in their
>> most delirious moments might have come up with, these CPAN modules are
>> unbeatable. Even if after that you decide to program your stuff in
>> another language than perl, it's still useful.
>> (Just for fun, go into CPAN and search for "NATO" (or more
>> pragmatically, for "sharepoint" e.g.)(or even, God forbid, for
>> "Google" or "Facebook" ;-)); who thinks of such things ?)
>>
>> So, to summarise : that some modules on CPAN would be marked as
>> "maintained" or "supported" and would turn out on closer inspection
>> not to really be anymore, I find this a very small price to pay for
>> the wealth of good information and working code that lives there.
>>
>> My sincerest thanks to CPAN and all its contributors and maintainers
>> over the years (that includes you of course, Jim). What you have done
>> and are doing is of incredible benefit to many, many programmers
>> worldwide.
>>
>> André
>>
>>
>> Jim Schueler wrote:
>>> I still use Alpine. And they never fixed the bug where ctrl-c (to
>>> cancel a message) and ctrl-x (to send) are so easily confused.
>>> Oops. Maybe it's time to start using a mouse.
>>>
>>> Having wasted so much time, I'll try to be succinct:
>>>
>>> Most modules on CPAN are bascially throwaways and not supported at
>>> all.
>>> Use them at your own risk.
>>>
>>> There are some modules that are just obsolete. Good intentions aside,
>>> the developers lost interest and moved on. These are less risky if
>>> there's an established user base.
>>>
>>> There are some very good modules, widely used, that are fully
>>> supported
>>> and perfectly safe for a production environment.
>>>
>>> Most mod_perl modules, especially the core modules, fall into that
>>> last, gold standard, category. In many cases, support is transferred
>>> from one individual to another. And so that commitment is
>>> documented. But if a module is no longer supported, don't lie about
>>> it. Support forums are an incredible resource. But if commercial
>>> software developers similarly blurred this distinction, every p.o.s.
>>> would be advertising free 24x7 tech support.
>>>
>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of
>>> your response, I've concluded that Apache::DBI is no longer supported
>>> and has been superceded by newer modules. Especially if no one
>>> responds and explicitly accepts the responsibility, this seems like
>>> the most appropriate answer for the poster of the original thread.
>>>
>>> I owe you a :) from a couple posts ago. :)
>>>
>>> -Jim
>>>
>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>
>>>> Hi Jim,
>>>> I appreciate the thought, but I'm not the mod_perl list. If you
>>>> look at who
>>>> has done the most support around here recently, it's probably Torsten.
>>>> (Thanks Torsten!) More to the point, there are many people on the
>>>> list who
>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>> common
>>>> practice to point people here for support on mod_perl modules.
>>>>
>>>> What are you getting at? Is there a module that you're having
>>>> trouble with
>>>> and can't get support for?
>>>>
>>>> - Perrin
>>>>
>>>>
>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler
>>>> <jschueler [at] eloquency>
>>>> wrote:
>>>> There's an existing thread with an Apache::DBI question. But
>>>> since I want to post a separate question to this list, I decided
>>>> to start a new thread.
>>>>
>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>> last notes suggests that this package is obsolete (having been
>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>> following:
>>>>
>>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>>> supported
>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>> documentation
>>>> for instructions on how to subscribe.
>>>>
>>>> Unless Perrin Harkins agreed to take over support for this
>>>> module, then that statement is not true. Otherwise, out of
>>>> respect for Perrin, I'll try to be general.
>>>>
>>>> (Aside: Am I the only developer that comes across 'unless () {}
>>>> else {}' constructions?)
>>>>
>>>> It seems very few distros on CPAN are actually supported. For
>>>> my part, I still monitor this list to support my own
>>>> contributions from *many* years ago. And I k
>>>>
>>>>
>>>>
>>>>
>>


jschueler at eloquency

May 31, 2013, 1:41 PM

Post #55 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

> With regards to Apache::DBI, it is very much supported :)

No. It is not. What little I know of you, you seem knowledgable and
experienced. But you don't seem to have read this thread. The
documentation says that the module will be supported by this list, and the
facts now demonstrate otherwise.

Several contributors have responded now. To paraphrase, they will (and I
will and so will others) help the best they can. But that's not what the
documentation says. I guess I'm just one of those whiners who expects the
documentation to be reliable.

I followed this thread from the beginning. I compared the original
observations with the documentation. And either the documentation is
wrong or (more likely) incomplete. I think it's reasonable to assume that
if no one steps up to take ownership, there is no owner. And hence the
code is unsupported.

Early on, I tried to clarify. Which I'll repeat:

If the code has no significant user base and no identifiable
owner/maintainer, use at your own risk. Pretty much what you say
below.

If the code has a significant user base but no identifiable owner,
there's a lot less risk because you can get support from other users.

Modules with reliable owners, such as Soap::Lite, deserve the highest
level of confidence.

Apache::DBI has no owner and therefore falls in category #2. Or maybe
someone will step foward, and thus category #3. Otherwise, your comments
below say the same thing. Yet for some reason, you turned the big
platitude guns on me.

By omission, there seems to be consensus on these guidelines. All the
quibbling revolves around my estimate that most modules fall in the first
category. Personally, I would prefer no one estimated that 97.5% (or
118,000 perl modules) are still actively supported by their authors/
designated successors. Because I think that claim strains credibility.

> ...this comes with the general open source software caveat - "Using open
> source software doesn't mean someone will do *your work* for free".

I didn't originate the thread, but this response offends me. If someone
observes a problem with a module, is the point to discredit them instead?

So far, there seems to be a tendency to overlook the substance of the
discussion and react defensively to outsiders (as though I haven't
participated here for 14 or 15 years). What's up with that?

Thanks for letting me get that off my chest.

-Jim



On Fri, 31 May 2013, Fred Moyer wrote:

>> In their absence, I'd note that your post has an interesting ambiguity: Is
>> the number of unsupported modules 2.5% or 25%?
>
> The 'supported' metric doesn't really translate the same in reference
> to open source software as it does to commercial software. When a
> commercial software product becomes unsupported (think IE6), then you
> are out in the cold. You don't have the source code, so you can't fix
> an issue with it, or hire someone to fix the issue. Unless you are
> really good with a hex code editor and patching binary files, you're
> out of luck.
>
> With open source software like Perl, you may see statements like 'Perl
> 5.6 is no longer officially supported'. This means you probably won't
> be able to get the P5P team to fix bugs or security issues if they
> come up. Still, you have the source code, so you can fix it yourself.
>
> CPAN is a bit more murky in that individual authors can decide to
> deprecate modules, or they can drop off the face of the earth, but
> widely used modules such as Apache::DBI, SOAP::Lite (maintenance
> recently stewarded by yours truly) will almost always have volunteers
> step up and maintain them, because those volunteers need those modules
> to be functioning for own work. In terms of a supported metric, I'd
> say modules that are used by more than a few people are supported
> 100%.
>
> With regards to Apache::DBI, it is very much supported :) But this
> comes with the general open source software caveat - "Using open
> source software doesn't mean someone will do *your work* for free". If
> there's a feature that appeals to more than a couple users, or a bug
> that affects more than a couple users, odds are that it will get
> fixed. Features that only one user is after will likely not be
> implemented by the maintainers, but patches for those features are
> usually readily accepted.
>
> On Fri, May 31, 2013 at 10:30 AM, Jim Schueler <jschueler [at] eloquency> wrote:
>> No apology please. In terms of trying to qualify any of this, a larger
>> statistical pool is better. And I am no authority. My perceptions are
>> largely based on forum postings which causes an inherent bias.
>>
>> I'd love to see this conversation continue, especially if participants
>> included those who commit significant resources to their technology
>> decisions. In other words, people who hire and pay Perl programmers.
>> They're likely to be as skeptical as I am. I've never been a cheerleader.
>>
>> In their absence, I'd note that your post has an interesting ambiguity: Is
>> the number of unsupported modules 2.5% or 25%? (For more rhetorical
>> nit-picking, you probably don't use the ones that don't work :) Also, the
>> significant question seems to be whether Apache::DBI is supported or not.
>> From Mr. Zheng's point-of-view (in this case, the one that matters) the
>> number might be much higher.
>>
>> -Jim
>>
>>
>> On Fri, 31 May 2013, André Warnier wrote:
>>
>>> Just butting in, apologies.
>>>
>>> It may not have been Jim's intention below, but I get the impression that
>>> his comments on CPAN are a bit harsh.
>>>
>>> It is true that a number of modules are apparently no longer supported. I
>>> have used many modules over the years, and sometimes have had problems with
>>> some of them (mostly not though). And when for these problematic cases, I
>>> have tried to get help, the results have beem mixed; but the mix for me has
>>> been rather good. I would say that in my case, 90% of the CPAN modules I
>>> ever used worked out of the box. For the 10% remaining, in 75% of the cases
>>> I did get help from the person advertised as the author or the maintainer,
>>> and in 25% of cases I never got a response.
>>> But then, as Jim himself indicated, people move on, without necessarily
>>> changing their email addresses. Considering how old some of these modules
>>> are, I guess people also retire, or even pass away.
>>>
>>> But the fact of the matter is that CPAN is still an incredible resource,
>>> unequalled in my view by any other similar module library of any other
>>> language anywhere. And I find it amazing that at least 90% of the modules
>>> which I have downloaded from CPAN and used over the last 15 years, just
>>> work, and moreover keep on working through many, many iterations of programs
>>> and perl versions, and that in fact one very rarely needs additional support
>>> for them. When I compare this with other programming languages and support
>>> libraries, I believe we perl programmers are incredibly spoiled.
>>>
>>> Another area where CPAN shines, is the documentation of most modules. I
>>> cannot count the times where I was faced with a request in an area of which
>>> I knew nothing at all, and have just browsed CPAN for modules related to
>>> that area, just to read their documentation and get at least an idea of what
>>> this was all about.
>>> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
>>> general information. But when it comes down to the nitty-gritty of
>>> interfacing with whatever API (or lack of ditto) programmers in their most
>>> delirious moments might have come up with, these CPAN modules are
>>> unbeatable. Even if after that you decide to program your stuff in another
>>> language than perl, it's still useful.
>>> (Just for fun, go into CPAN and search for "NATO" (or more pragmatically,
>>> for "sharepoint" e.g.)(or even, God forbid, for "Google" or "Facebook" ;-));
>>> who thinks of such things ?)
>>>
>>> So, to summarise : that some modules on CPAN would be marked as
>>> "maintained" or "supported" and would turn out on closer inspection not to
>>> really be anymore, I find this a very small price to pay for the wealth of
>>> good information and working code that lives there.
>>>
>>> My sincerest thanks to CPAN and all its contributors and maintainers over
>>> the years (that includes you of course, Jim). What you have done and are
>>> doing is of incredible benefit to many, many programmers worldwide.
>>>
>>> André
>>>
>>>
>>> Jim Schueler wrote:
>>>>
>>>> I still use Alpine. And they never fixed the bug where ctrl-c (to cancel
>>>> a message) and ctrl-x (to send) are so easily confused. Oops. Maybe it's
>>>> time to start using a mouse.
>>>>
>>>> Having wasted so much time, I'll try to be succinct:
>>>>
>>>> Most modules on CPAN are bascially throwaways and not supported at all.
>>>> Use them at your own risk.
>>>>
>>>> There are some modules that are just obsolete. Good intentions aside,
>>>> the developers lost interest and moved on. These are less risky if
>>>> there's an established user base.
>>>>
>>>> There are some very good modules, widely used, that are fully supported
>>>> and perfectly safe for a production environment.
>>>>
>>>> Most mod_perl modules, especially the core modules, fall into that last,
>>>> gold standard, category. In many cases, support is transferred from one
>>>> individual to another. And so that commitment is documented. But if a
>>>> module is no longer supported, don't lie about it. Support forums are an
>>>> incredible resource. But if commercial software developers similarly
>>>> blurred this distinction, every p.o.s. would be advertising free 24x7 tech
>>>> support.
>>>>
>>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of your
>>>> response, I've concluded that Apache::DBI is no longer supported and has
>>>> been superceded by newer modules. Especially if no one responds and
>>>> explicitly accepts the responsibility, this seems like the most appropriate
>>>> answer for the poster of the original thread.
>>>>
>>>> I owe you a :) from a couple posts ago. :)
>>>>
>>>> -Jim
>>>>
>>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>>
>>>>> Hi Jim,
>>>>> I appreciate the thought, but I'm not the mod_perl list. If you look at
>>>>> who
>>>>> has done the most support around here recently, it's probably Torsten.
>>>>> (Thanks Torsten!) More to the point, there are many people on the list
>>>>> who
>>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>>> common
>>>>> practice to point people here for support on mod_perl modules.
>>>>>
>>>>> What are you getting at? Is there a module that you're having trouble
>>>>> with
>>>>> and can't get support for?
>>>>>
>>>>> - Perrin
>>>>>
>>>>>
>>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <jschueler [at] eloquency>
>>>>> wrote:
>>>>> There's an existing thread with an Apache::DBI question. But
>>>>> since I want to post a separate question to this list, I decided
>>>>> to start a new thread.
>>>>>
>>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>>> last notes suggests that this package is obsolete (having been
>>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>>> following:
>>>>>
>>>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>>>> supported
>>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>>> documentation
>>>>> for instructions on how to subscribe.
>>>>>
>>>>> Unless Perrin Harkins agreed to take over support for this
>>>>> module, then that statement is not true. Otherwise, out of
>>>>> respect for Perrin, I'll try to be general.
>>>>>
>>>>> (Aside: Am I the only developer that comes across 'unless () {}
>>>>> else {}' constructions?)
>>>>>
>>>>> It seems very few distros on CPAN are actually supported. For
>>>>> my part, I still monitor this list to support my own
>>>>> contributions from *many* years ago. And I k
>>>>>
>>>>>
>>>>>
>>>>>
>>
>


pharkins at gmail

May 31, 2013, 2:35 PM

Post #56 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

Jim,

I just don't see the issue with not having an individual's name on one of
the mod_perl modules as the support contact. To me, Apache::DBI is being
supported, exactly as the documentation says. Someone wrote to the mailing
list, asked a question, and received responses that were trying to be
helpful. Knowledgeable people offering "to help the best they can" is the
only kind of support I expect to see on an open source project. In this
case you get that from a whole group, not just one person.

If I need help with DBI, I might write to dbi-users, but I don't expect a
personal response from Tim Bunce every time I ask a question. Of course,
if I wrote in with a major bug or security issue (or offered chocolate), I
probably would get a response from Tim, just like similar messages to this
list about mod_perl have been responded to by the mod_perl PMC.

Is the issue for you that the original author listed on the module is no
longer on the list? There are many of us here, including me, who have
worked with, debugged, patched, and partially rewritten Apache::DBI. We
own it.

- Perrin



On Fri, May 31, 2013 at 4:41 PM, Jim Schueler <jschueler [at] eloquency>wrote:

> With regards to Apache::DBI, it is very much supported :)
>>
>
> No. It is not. What little I know of you, you seem knowledgable and
> experienced. But you don't seem to have read this thread. The
> documentation says that the module will be supported by this list, and the
> facts now demonstrate otherwise.
>
> Several contributors have responded now. To paraphrase, they will (and I
> will and so will others) help the best they can. But that's not what the
> documentation says. I guess I'm just one of those whiners who expects the
> documentation to be reliable.
>
> I followed this thread from the beginning. I compared the original
> observations with the documentation. And either the documentation is wrong
> or (more likely) incomplete. I think it's reasonable to assume that if no
> one steps up to take ownership, there is no owner. And hence the code is
> unsupported.
>
> Early on, I tried to clarify. Which I'll repeat:
>
> If the code has no significant user base and no identifiable
> owner/maintainer, use at your own risk. Pretty much what you say
> below.
>
> If the code has a significant user base but no identifiable owner,
> there's a lot less risk because you can get support from other users.
>
> Modules with reliable owners, such as Soap::Lite, deserve the highest
> level of confidence.
>
> Apache::DBI has no owner and therefore falls in category #2. Or maybe
> someone will step foward, and thus category #3. Otherwise, your comments
> below say the same thing. Yet for some reason, you turned the big
> platitude guns on me.
>
> By omission, there seems to be consensus on these guidelines. All the
> quibbling revolves around my estimate that most modules fall in the first
> category. Personally, I would prefer no one estimated that 97.5% (or
> 118,000 perl modules) are still actively supported by their authors/
> designated successors. Because I think that claim strains credibility.
>
> ...this comes with the general open source software caveat - "Using open
>>
>> source software doesn't mean someone will do *your work* for free".
>>
>
> I didn't originate the thread, but this response offends me. If someone
> observes a problem with a module, is the point to discredit them instead?
>
> So far, there seems to be a tendency to overlook the substance of the
> discussion and react defensively to outsiders (as though I haven't
> participated here for 14 or 15 years). What's up with that?
>
> Thanks for letting me get that off my chest.
>
> -Jim
>
>
>
>
> On Fri, 31 May 2013, Fred Moyer wrote:
>
> In their absence, I'd note that your post has an interesting ambiguity: Is
>>> the number of unsupported modules 2.5% or 25%?
>>>
>>
>> The 'supported' metric doesn't really translate the same in reference
>> to open source software as it does to commercial software. When a
>> commercial software product becomes unsupported (think IE6), then you
>> are out in the cold. You don't have the source code, so you can't fix
>> an issue with it, or hire someone to fix the issue. Unless you are
>> really good with a hex code editor and patching binary files, you're
>> out of luck.
>>
>> With open source software like Perl, you may see statements like 'Perl
>> 5.6 is no longer officially supported'. This means you probably won't
>> be able to get the P5P team to fix bugs or security issues if they
>> come up. Still, you have the source code, so you can fix it yourself.
>>
>> CPAN is a bit more murky in that individual authors can decide to
>> deprecate modules, or they can drop off the face of the earth, but
>> widely used modules such as Apache::DBI, SOAP::Lite (maintenance
>> recently stewarded by yours truly) will almost always have volunteers
>> step up and maintain them, because those volunteers need those modules
>> to be functioning for own work. In terms of a supported metric, I'd
>> say modules that are used by more than a few people are supported
>> 100%.
>>
>> With regards to Apache::DBI, it is very much supported :) But this
>> comes with the general open source software caveat - "Using open
>> source software doesn't mean someone will do *your work* for free". If
>> there's a feature that appeals to more than a couple users, or a bug
>> that affects more than a couple users, odds are that it will get
>> fixed. Features that only one user is after will likely not be
>> implemented by the maintainers, but patches for those features are
>> usually readily accepted.
>>
>> On Fri, May 31, 2013 at 10:30 AM, Jim Schueler <jschueler [at] eloquency>
>> wrote:
>>
>>> No apology please. In terms of trying to qualify any of this, a larger
>>> statistical pool is better. And I am no authority. My perceptions are
>>> largely based on forum postings which causes an inherent bias.
>>>
>>> I'd love to see this conversation continue, especially if participants
>>> included those who commit significant resources to their technology
>>> decisions. In other words, people who hire and pay Perl programmers.
>>> They're likely to be as skeptical as I am. I've never been a
>>> cheerleader.
>>>
>>> In their absence, I'd note that your post has an interesting ambiguity:
>>> Is
>>> the number of unsupported modules 2.5% or 25%? (For more rhetorical
>>> nit-picking, you probably don't use the ones that don't work :) Also,
>>> the
>>> significant question seems to be whether Apache::DBI is supported or not.
>>> From Mr. Zheng's point-of-view (in this case, the one that matters) the
>>> number might be much higher.
>>>
>>> -Jim
>>>
>>>
>>> On Fri, 31 May 2013, André Warnier wrote:
>>>
>>> Just butting in, apologies.
>>>>
>>>> It may not have been Jim's intention below, but I get the impression
>>>> that
>>>> his comments on CPAN are a bit harsh.
>>>>
>>>> It is true that a number of modules are apparently no longer supported.
>>>> I
>>>> have used many modules over the years, and sometimes have had problems
>>>> with
>>>> some of them (mostly not though). And when for these problematic cases,
>>>> I
>>>> have tried to get help, the results have beem mixed; but the mix for me
>>>> has
>>>> been rather good. I would say that in my case, 90% of the CPAN modules I
>>>> ever used worked out of the box. For the 10% remaining, in 75% of the
>>>> cases
>>>> I did get help from the person advertised as the author or the
>>>> maintainer,
>>>> and in 25% of cases I never got a response.
>>>> But then, as Jim himself indicated, people move on, without necessarily
>>>> changing their email addresses. Considering how old some of these
>>>> modules
>>>> are, I guess people also retire, or even pass away.
>>>>
>>>> But the fact of the matter is that CPAN is still an incredible resource,
>>>> unequalled in my view by any other similar module library of any other
>>>> language anywhere. And I find it amazing that at least 90% of the
>>>> modules
>>>> which I have downloaded from CPAN and used over the last 15 years, just
>>>> work, and moreover keep on working through many, many iterations of
>>>> programs
>>>> and perl versions, and that in fact one very rarely needs additional
>>>> support
>>>> for them. When I compare this with other programming languages and
>>>> support
>>>> libraries, I believe we perl programmers are incredibly spoiled.
>>>>
>>>> Another area where CPAN shines, is the documentation of most modules. I
>>>> cannot count the times where I was faced with a request in an area of
>>>> which
>>>> I knew nothing at all, and have just browsed CPAN for modules related to
>>>> that area, just to read their documentation and get at least an idea of
>>>> what
>>>> this was all about.
>>>> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
>>>> general information. But when it comes down to the nitty-gritty of
>>>> interfacing with whatever API (or lack of ditto) programmers in their
>>>> most
>>>> delirious moments might have come up with, these CPAN modules are
>>>> unbeatable. Even if after that you decide to program your stuff in
>>>> another
>>>> language than perl, it's still useful.
>>>> (Just for fun, go into CPAN and search for "NATO" (or more
>>>> pragmatically,
>>>> for "sharepoint" e.g.)(or even, God forbid, for "Google" or "Facebook"
>>>> ;-));
>>>> who thinks of such things ?)
>>>>
>>>> So, to summarise : that some modules on CPAN would be marked as
>>>> "maintained" or "supported" and would turn out on closer inspection not
>>>> to
>>>> really be anymore, I find this a very small price to pay for the wealth
>>>> of
>>>> good information and working code that lives there.
>>>>
>>>> My sincerest thanks to CPAN and all its contributors and maintainers
>>>> over
>>>> the years (that includes you of course, Jim). What you have done and
>>>> are
>>>> doing is of incredible benefit to many, many programmers worldwide.
>>>>
>>>> André
>>>>
>>>>
>>>> Jim Schueler wrote:
>>>>
>>>>>
>>>>> I still use Alpine. And they never fixed the bug where ctrl-c (to
>>>>> cancel
>>>>> a message) and ctrl-x (to send) are so easily confused. Oops. Maybe
>>>>> it's
>>>>> time to start using a mouse.
>>>>>
>>>>> Having wasted so much time, I'll try to be succinct:
>>>>>
>>>>> Most modules on CPAN are bascially throwaways and not supported at
>>>>> all.
>>>>> Use them at your own risk.
>>>>>
>>>>> There are some modules that are just obsolete. Good intentions
>>>>> aside,
>>>>> the developers lost interest and moved on. These are less risky if
>>>>> there's an established user base.
>>>>>
>>>>> There are some very good modules, widely used, that are fully
>>>>> supported
>>>>> and perfectly safe for a production environment.
>>>>>
>>>>> Most mod_perl modules, especially the core modules, fall into that
>>>>> last,
>>>>> gold standard, category. In many cases, support is transferred from
>>>>> one
>>>>> individual to another. And so that commitment is documented. But if a
>>>>> module is no longer supported, don't lie about it. Support forums are
>>>>> an
>>>>> incredible resource. But if commercial software developers similarly
>>>>> blurred this distinction, every p.o.s. would be advertising free 24x7
>>>>> tech
>>>>> support.
>>>>>
>>>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of
>>>>> your
>>>>> response, I've concluded that Apache::DBI is no longer supported and
>>>>> has
>>>>> been superceded by newer modules. Especially if no one responds and
>>>>> explicitly accepts the responsibility, this seems like the most
>>>>> appropriate
>>>>> answer for the poster of the original thread.
>>>>>
>>>>> I owe you a :) from a couple posts ago. :)
>>>>>
>>>>> -Jim
>>>>>
>>>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>>>
>>>>> Hi Jim,
>>>>>> I appreciate the thought, but I'm not the mod_perl list. If you look
>>>>>> at
>>>>>> who
>>>>>> has done the most support around here recently, it's probably Torsten.
>>>>>> (Thanks Torsten!) More to the point, there are many people on the
>>>>>> list
>>>>>> who
>>>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>>>> common
>>>>>> practice to point people here for support on mod_perl modules.
>>>>>>
>>>>>> What are you getting at? Is there a module that you're having trouble
>>>>>> with
>>>>>> and can't get support for?
>>>>>>
>>>>>> - Perrin
>>>>>>
>>>>>>
>>>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler <
>>>>>> jschueler [at] eloquency>
>>>>>> wrote:
>>>>>> There's an existing thread with an Apache::DBI question. But
>>>>>> since I want to post a separate question to this list, I decided
>>>>>> to start a new thread.
>>>>>>
>>>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>>>> last notes suggests that this package is obsolete (having been
>>>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>>>> following:
>>>>>>
>>>>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>>>>> supported
>>>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>>>> documentation
>>>>>> for instructions on how to subscribe.
>>>>>>
>>>>>> Unless Perrin Harkins agreed to take over support for this
>>>>>> module, then that statement is not true. Otherwise, out of
>>>>>> respect for Perrin, I'll try to be general.
>>>>>>
>>>>>> (Aside: Am I the only developer that comes across 'unless () {}
>>>>>> else {}' constructions?)
>>>>>>
>>>>>> It seems very few distros on CPAN are actually supported. For
>>>>>> my part, I still monitor this list to support my own
>>>>>> contributions from *many* years ago. And I k
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>


fred at redhotpenguin

May 31, 2013, 2:36 PM

Post #57 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

> Modules with reliable owners, such as Soap::Lite, deserve the highest
> level of confidence.

Currently SOAP::Lite doesn't have an 'owner' per se. I sent a patch
into rt.cpan.org a few weeks ago, and as a result I was given COMAINT
on CPAN for it, applied many fixes, and released 0.716 (which contains
at least one regression) a couple weeks ago. Now I'm working on 0.717,
and hopefully someone else will take this module on in a year.

So there are maintainers - when one becomes occupied with real world
tasks such as job, family, etc, then bugs get filed, and others step
up. It's generally how CPAN (and now Github) works to a large degree.

On Fri, May 31, 2013 at 1:41 PM, Jim Schueler <jschueler [at] eloquency> wrote:
>> With regards to Apache::DBI, it is very much supported :)
>
>
> No. It is not. What little I know of you, you seem knowledgable and
> experienced. But you don't seem to have read this thread. The
> documentation says that the module will be supported by this list, and the
> facts now demonstrate otherwise.
>
> Several contributors have responded now. To paraphrase, they will (and I
> will and so will others) help the best they can. But that's not what the
> documentation says. I guess I'm just one of those whiners who expects the
> documentation to be reliable.
>
> I followed this thread from the beginning. I compared the original
> observations with the documentation. And either the documentation is wrong
> or (more likely) incomplete. I think it's reasonable to assume that if no
> one steps up to take ownership, there is no owner. And hence the code is
> unsupported.
>
> Early on, I tried to clarify. Which I'll repeat:
>
> If the code has no significant user base and no identifiable
> owner/maintainer, use at your own risk. Pretty much what you say
> below.
>
> If the code has a significant user base but no identifiable owner,
> there's a lot less risk because you can get support from other users.
>
> Modules with reliable owners, such as Soap::Lite, deserve the highest
> level of confidence.
>
> Apache::DBI has no owner and therefore falls in category #2. Or maybe
> someone will step foward, and thus category #3. Otherwise, your comments
> below say the same thing. Yet for some reason, you turned the big platitude
> guns on me.
>
> By omission, there seems to be consensus on these guidelines. All the
> quibbling revolves around my estimate that most modules fall in the first
> category. Personally, I would prefer no one estimated that 97.5% (or
> 118,000 perl modules) are still actively supported by their authors/
> designated successors. Because I think that claim strains credibility.
>
>> ...this comes with the general open source software caveat - "Using open
>>
>> source software doesn't mean someone will do *your work* for free".
>
>
> I didn't originate the thread, but this response offends me. If someone
> observes a problem with a module, is the point to discredit them instead?
>
> So far, there seems to be a tendency to overlook the substance of the
> discussion and react defensively to outsiders (as though I haven't
> participated here for 14 or 15 years). What's up with that?
>
> Thanks for letting me get that off my chest.
>
> -Jim
>
>
>
>
> On Fri, 31 May 2013, Fred Moyer wrote:
>
>>> In their absence, I'd note that your post has an interesting ambiguity:
>>> Is
>>> the number of unsupported modules 2.5% or 25%?
>>
>>
>> The 'supported' metric doesn't really translate the same in reference
>> to open source software as it does to commercial software. When a
>> commercial software product becomes unsupported (think IE6), then you
>> are out in the cold. You don't have the source code, so you can't fix
>> an issue with it, or hire someone to fix the issue. Unless you are
>> really good with a hex code editor and patching binary files, you're
>> out of luck.
>>
>> With open source software like Perl, you may see statements like 'Perl
>> 5.6 is no longer officially supported'. This means you probably won't
>> be able to get the P5P team to fix bugs or security issues if they
>> come up. Still, you have the source code, so you can fix it yourself.
>>
>> CPAN is a bit more murky in that individual authors can decide to
>> deprecate modules, or they can drop off the face of the earth, but
>> widely used modules such as Apache::DBI, SOAP::Lite (maintenance
>> recently stewarded by yours truly) will almost always have volunteers
>> step up and maintain them, because those volunteers need those modules
>> to be functioning for own work. In terms of a supported metric, I'd
>> say modules that are used by more than a few people are supported
>> 100%.
>>
>> With regards to Apache::DBI, it is very much supported :) But this
>> comes with the general open source software caveat - "Using open
>> source software doesn't mean someone will do *your work* for free". If
>> there's a feature that appeals to more than a couple users, or a bug
>> that affects more than a couple users, odds are that it will get
>> fixed. Features that only one user is after will likely not be
>> implemented by the maintainers, but patches for those features are
>> usually readily accepted.
>>
>> On Fri, May 31, 2013 at 10:30 AM, Jim Schueler <jschueler [at] eloquency>
>> wrote:
>>>
>>> No apology please. In terms of trying to qualify any of this, a larger
>>> statistical pool is better. And I am no authority. My perceptions are
>>> largely based on forum postings which causes an inherent bias.
>>>
>>> I'd love to see this conversation continue, especially if participants
>>> included those who commit significant resources to their technology
>>> decisions. In other words, people who hire and pay Perl programmers.
>>> They're likely to be as skeptical as I am. I've never been a
>>> cheerleader.
>>>
>>> In their absence, I'd note that your post has an interesting ambiguity:
>>> Is
>>> the number of unsupported modules 2.5% or 25%? (For more rhetorical
>>> nit-picking, you probably don't use the ones that don't work :) Also,
>>> the
>>> significant question seems to be whether Apache::DBI is supported or not.
>>> From Mr. Zheng's point-of-view (in this case, the one that matters) the
>>> number might be much higher.
>>>
>>> -Jim
>>>
>>>
>>> On Fri, 31 May 2013, André Warnier wrote:
>>>
>>>> Just butting in, apologies.
>>>>
>>>> It may not have been Jim's intention below, but I get the impression
>>>> that
>>>> his comments on CPAN are a bit harsh.
>>>>
>>>> It is true that a number of modules are apparently no longer supported.
>>>> I
>>>> have used many modules over the years, and sometimes have had problems
>>>> with
>>>> some of them (mostly not though). And when for these problematic cases,
>>>> I
>>>> have tried to get help, the results have beem mixed; but the mix for me
>>>> has
>>>> been rather good. I would say that in my case, 90% of the CPAN modules I
>>>> ever used worked out of the box. For the 10% remaining, in 75% of the
>>>> cases
>>>> I did get help from the person advertised as the author or the
>>>> maintainer,
>>>> and in 25% of cases I never got a response.
>>>> But then, as Jim himself indicated, people move on, without necessarily
>>>> changing their email addresses. Considering how old some of these
>>>> modules
>>>> are, I guess people also retire, or even pass away.
>>>>
>>>> But the fact of the matter is that CPAN is still an incredible resource,
>>>> unequalled in my view by any other similar module library of any other
>>>> language anywhere. And I find it amazing that at least 90% of the
>>>> modules
>>>> which I have downloaded from CPAN and used over the last 15 years, just
>>>> work, and moreover keep on working through many, many iterations of
>>>> programs
>>>> and perl versions, and that in fact one very rarely needs additional
>>>> support
>>>> for them. When I compare this with other programming languages and
>>>> support
>>>> libraries, I believe we perl programmers are incredibly spoiled.
>>>>
>>>> Another area where CPAN shines, is the documentation of most modules. I
>>>> cannot count the times where I was faced with a request in an area of
>>>> which
>>>> I knew nothing at all, and have just browsed CPAN for modules related to
>>>> that area, just to read their documentation and get at least an idea of
>>>> what
>>>> this was all about.
>>>> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
>>>> general information. But when it comes down to the nitty-gritty of
>>>> interfacing with whatever API (or lack of ditto) programmers in their
>>>> most
>>>> delirious moments might have come up with, these CPAN modules are
>>>> unbeatable. Even if after that you decide to program your stuff in
>>>> another
>>>> language than perl, it's still useful.
>>>> (Just for fun, go into CPAN and search for "NATO" (or more
>>>> pragmatically,
>>>> for "sharepoint" e.g.)(or even, God forbid, for "Google" or "Facebook"
>>>> ;-));
>>>> who thinks of such things ?)
>>>>
>>>> So, to summarise : that some modules on CPAN would be marked as
>>>> "maintained" or "supported" and would turn out on closer inspection not
>>>> to
>>>> really be anymore, I find this a very small price to pay for the wealth
>>>> of
>>>> good information and working code that lives there.
>>>>
>>>> My sincerest thanks to CPAN and all its contributors and maintainers
>>>> over
>>>> the years (that includes you of course, Jim). What you have done and
>>>> are
>>>> doing is of incredible benefit to many, many programmers worldwide.
>>>>
>>>> André
>>>>
>>>>
>>>> Jim Schueler wrote:
>>>>>
>>>>>
>>>>> I still use Alpine. And they never fixed the bug where ctrl-c (to
>>>>> cancel
>>>>> a message) and ctrl-x (to send) are so easily confused. Oops. Maybe
>>>>> it's
>>>>> time to start using a mouse.
>>>>>
>>>>> Having wasted so much time, I'll try to be succinct:
>>>>>
>>>>> Most modules on CPAN are bascially throwaways and not supported at
>>>>> all.
>>>>> Use them at your own risk.
>>>>>
>>>>> There are some modules that are just obsolete. Good intentions
>>>>> aside,
>>>>> the developers lost interest and moved on. These are less risky if
>>>>> there's an established user base.
>>>>>
>>>>> There are some very good modules, widely used, that are fully
>>>>> supported
>>>>> and perfectly safe for a production environment.
>>>>>
>>>>> Most mod_perl modules, especially the core modules, fall into that
>>>>> last,
>>>>> gold standard, category. In many cases, support is transferred from
>>>>> one
>>>>> individual to another. And so that commitment is documented. But if a
>>>>> module is no longer supported, don't lie about it. Support forums are
>>>>> an
>>>>> incredible resource. But if commercial software developers similarly
>>>>> blurred this distinction, every p.o.s. would be advertising free 24x7
>>>>> tech
>>>>> support.
>>>>>
>>>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of
>>>>> your
>>>>> response, I've concluded that Apache::DBI is no longer supported and
>>>>> has
>>>>> been superceded by newer modules. Especially if no one responds and
>>>>> explicitly accepts the responsibility, this seems like the most
>>>>> appropriate
>>>>> answer for the poster of the original thread.
>>>>>
>>>>> I owe you a :) from a couple posts ago. :)
>>>>>
>>>>> -Jim
>>>>>
>>>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>>>
>>>>>> Hi Jim,
>>>>>> I appreciate the thought, but I'm not the mod_perl list. If you look
>>>>>> at
>>>>>> who
>>>>>> has done the most support around here recently, it's probably Torsten.
>>>>>> (Thanks Torsten!) More to the point, there are many people on the
>>>>>> list
>>>>>> who
>>>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>>>> common
>>>>>> practice to point people here for support on mod_perl modules.
>>>>>>
>>>>>> What are you getting at? Is there a module that you're having trouble
>>>>>> with
>>>>>> and can't get support for?
>>>>>>
>>>>>> - Perrin
>>>>>>
>>>>>>
>>>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler
>>>>>> <jschueler [at] eloquency>
>>>>>> wrote:
>>>>>> There's an existing thread with an Apache::DBI question. But
>>>>>> since I want to post a separate question to this list, I decided
>>>>>> to start a new thread.
>>>>>>
>>>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>>>> last notes suggests that this package is obsolete (having been
>>>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>>>> following:
>>>>>>
>>>>>> Edmund Mergl was the original author of Apache::DBI. It is now
>>>>>> supported
>>>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>>>> documentation
>>>>>> for instructions on how to subscribe.
>>>>>>
>>>>>> Unless Perrin Harkins agreed to take over support for this
>>>>>> module, then that statement is not true. Otherwise, out of
>>>>>> respect for Perrin, I'll try to be general.
>>>>>>
>>>>>> (Aside: Am I the only developer that comes across 'unless () {}
>>>>>> else {}' constructions?)
>>>>>>
>>>>>> It seems very few distros on CPAN are actually supported. For
>>>>>> my part, I still monitor this list to support my own
>>>>>> contributions from *many* years ago. And I k
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>
>


aw at ice-sa

May 31, 2013, 3:50 PM

Post #58 of 58 (41 views)
Permalink
Re: [OT] Apache::DBI [In reply to]

Jim,

Jim Schueler wrote:
>> With regards to Apache::DBI, it is very much supported :)
>
> No. It is not. What little I know of you, you seem knowledgable and
> experienced. But you don't seem to have read this thread. The
> documentation says that the module will be supported by this list, and
> the facts now demonstrate otherwise.

I employ and pay perl programmers. I even initially give a job to young people who are
not perl programmers and initially consider perl as something slightly disreputable -
because that's what they generally learn in school - and make the effort to "convert" them
to perl.

I also have the greatest respect and appreciation for people who create interesting perl
modules, and who then go the extra mile to make these modules available to others on CPAN.
And I will admit to being in that respect merely a "user", and to never have gone that
same extra mile with modules which my employees or myself developed in-house.

When I consequently find and use a CPAN module, and occasionally find a problem with it,
and occasionally find out that despite what the documentation says, it appears that it is
unsupported, I do not however jump through the roof, as you seem to be doing in this case.

You are right, it is not entirely correct that the documentation of a CPAN module would
state that it is supported, when in reality it may turn out that it is not so.

But what is to do about it, really ?
Say that in 5 years, someone downloads Google::Oauth, has a problem with it, looks at the
"See Also" and the "Author", tries to contact this guy, and finds out that nobody
responds. What should happen then ? There are a million possible reasons why the person
who maybe usually responds to such enquiries on this list, may be temporarily or
definitely unavailable these days. Should someone hire a booty hunter to track him down
and force him to answer, or to rectify the documentation or else ?
Nobody is really being paid to spend time scanning the CPAN module documentation, to find
out if there is really someone supporting that module, and updating the documentation to
say "unsupported, use at your own risk".

Can you think of a practical solution to that, for 118,000 modules and counting ?

>
> Several contributors have responded now. To paraphrase, they will (and
> I will and so will others) help the best they can. But that's not what
> the documentation says. I guess I'm just one of those whiners who
> expects the documentation to be reliable.
>

I use CPAN all the time, I have done so for many years, and I never paid a cent for it. I
download modules, and I incorporate them into applications which I sell for a living. I
have occasionally sent my thanks to a CPAN module developer, but I have never paid them a
commission when I sold their module as part of my applications.
On the other hand, I also do not /expect/ to get something for nothing.
So when I find out that some module is unsupported, while the documentation says that it
is, I accept that. I then try to get help somewhere else, or figure out by myself if I
can understand the source and correct the problem myself. If I can, I will generally try
to send some email to the person mentioned as the author or the maintainer anyway. Most
of the times when I have done that, I haven't got an acknowledgement either. Again, I
accept that, since I didn't pay for the thing in the first place.
Are your expectations different ?

> I followed this thread from the beginning. I compared the original
> observations with the documentation. And either the documentation is
> wrong or (more likely) incomplete. I think it's reasonable to assume
> that if no one steps up to take ownership, there is no owner. And hence
> the code is unsupported.

Agreed.

>
> Early on, I tried to clarify. Which I'll repeat:
>
> If the code has no significant user base and no identifiable
> owner/maintainer, use at your own risk. Pretty much what you say
> below.

Agreed.

>
> If the code has a significant user base but no identifiable owner,
> there's a lot less risk because you can get support from other users.
>

Agreed.

> Modules with reliable owners, such as Soap::Lite, deserve the highest
> level of confidence.
>

Agreed.

> Apache::DBI has no owner and therefore falls in category #2. Or maybe
> someone will step foward, and thus category #3. Otherwise, your
> comments below say the same thing. Yet for some reason, you turned the
> big platitude guns on me.
>
> By omission, there seems to be consensus on these guidelines. All the
> quibbling revolves around my estimate that most modules fall in the
> first category. Personally, I would prefer no one estimated that 97.5%
> (or 118,000 perl modules) are still actively supported by their authors/
> designated successors. Because I think that claim strains credibility.
>

If by this you refer to my previous relation of my own experience, I wasn't trying to
express some general statistic, and i never claimed that 97.5% of modules are actively
supported.
The only things which I stated was that in my own limited experience,
- 90% of the modules which I ever downloaded and used worked as I expected and /did not
need any support/ (for me). In that case, whether they are actually "actively supported"
or not is effectively irrelevant, and I never even tried to check if they were supported.
- of the remainder 10% (which did not work as expected and for which I seeked support),
3/4 of them seemed to be effectively supported, since I did get help. Whether that was
help from the person mentioned as the author or maintainer or not, I honestly couldn't
tell anymore; but I did get help in resolving my problem, and to me this counts as
"supported". In the last few months, I remember that we needed help once, for the
SOAP::WSDL module, and we did get immediate and effective help from the author. But of
course this is purely anecdotical and not a base for real statistics.
- and only 1/4 (thus 2.5% of the total number of modules that we tried to use) seemed to
be indeed unsupported, and either we fixed the issue ourselves or switched to an
alternative module on CPAN - for which in our case there always seemed to be one when we
really needed it.

That does not contradict your classification above. But it presents the same data in
another way, from the perspective of a potential user of CPAN modules.
Instead of classifying most modules as "unsupported, use at your own risks" - which sounds
rather sceptical if not bad - I would say "90% of CPAN modules work just fine as
downloaded, don't worry" which sounds a lot better and in my view also reflects the
practical reality better (mine, anyway).

>> ...this comes with the general open source software caveat - "Using open
>> source software doesn't mean someone will do *your work* for free".
>
> I didn't originate the thread, but this response offends me. If someone
> observes a problem with a module, is the point to discredit them instead?
>

No, but did anyone really try to do that ?
When I re-read the posts in this thread, I do not really see that.

It seems to me instead that you were the one to turn on the big guns of dismal
disappointment, when maybe there wasn't a real reason to react that way.

You took the case of one issue with one CPAN module, and seemed to turn it into a general
comment about all CPAN modules, and you seem to imply that most CPAN modules are
unsupported - although the documentation says otherwise - and that this automatically
translates to a general quality issue of these CPAN modules. I believe that this apparent
generalisation was what some people here mostly reacted to.

> So far, there seems to be a tendency to overlook the substance of the
> discussion and react defensively to outsiders (as though I haven't
> participated here for 14 or 15 years). What's up with that?
>
> Thanks for letting me get that off my chest.
>

Welcome :).


> -Jim
>
>
>
> On Fri, 31 May 2013, Fred Moyer wrote:
>
>>> In their absence, I'd note that your post has an interesting
>>> ambiguity: Is
>>> the number of unsupported modules 2.5% or 25%?
>>
>> The 'supported' metric doesn't really translate the same in reference
>> to open source software as it does to commercial software. When a
>> commercial software product becomes unsupported (think IE6), then you
>> are out in the cold. You don't have the source code, so you can't fix
>> an issue with it, or hire someone to fix the issue. Unless you are
>> really good with a hex code editor and patching binary files, you're
>> out of luck.
>>
>> With open source software like Perl, you may see statements like 'Perl
>> 5.6 is no longer officially supported'. This means you probably won't
>> be able to get the P5P team to fix bugs or security issues if they
>> come up. Still, you have the source code, so you can fix it yourself.
>>
>> CPAN is a bit more murky in that individual authors can decide to
>> deprecate modules, or they can drop off the face of the earth, but
>> widely used modules such as Apache::DBI, SOAP::Lite (maintenance
>> recently stewarded by yours truly) will almost always have volunteers
>> step up and maintain them, because those volunteers need those modules
>> to be functioning for own work. In terms of a supported metric, I'd
>> say modules that are used by more than a few people are supported
>> 100%.
>>
>> With regards to Apache::DBI, it is very much supported :) But this
>> comes with the general open source software caveat - "Using open
>> source software doesn't mean someone will do *your work* for free". If
>> there's a feature that appeals to more than a couple users, or a bug
>> that affects more than a couple users, odds are that it will get
>> fixed. Features that only one user is after will likely not be
>> implemented by the maintainers, but patches for those features are
>> usually readily accepted.
>>
>> On Fri, May 31, 2013 at 10:30 AM, Jim Schueler
>> <jschueler [at] eloquency> wrote:
>>> No apology please. In terms of trying to qualify any of this, a larger
>>> statistical pool is better. And I am no authority. My perceptions are
>>> largely based on forum postings which causes an inherent bias.
>>>
>>> I'd love to see this conversation continue, especially if participants
>>> included those who commit significant resources to their technology
>>> decisions. In other words, people who hire and pay Perl programmers.
>>> They're likely to be as skeptical as I am. I've never been a
>>> cheerleader.
>>>
>>> In their absence, I'd note that your post has an interesting
>>> ambiguity: Is
>>> the number of unsupported modules 2.5% or 25%? (For more rhetorical
>>> nit-picking, you probably don't use the ones that don't work :)
>>> Also, the
>>> significant question seems to be whether Apache::DBI is supported or
>>> not.
>>> From Mr. Zheng's point-of-view (in this case, the one that matters) the
>>> number might be much higher.
>>>
>>> -Jim
>>>
>>>
>>> On Fri, 31 May 2013, André Warnier wrote:
>>>
>>>> Just butting in, apologies.
>>>>
>>>> It may not have been Jim's intention below, but I get the impression
>>>> that
>>>> his comments on CPAN are a bit harsh.
>>>>
>>>> It is true that a number of modules are apparently no longer
>>>> supported. I
>>>> have used many modules over the years, and sometimes have had
>>>> problems with
>>>> some of them (mostly not though). And when for these problematic
>>>> cases, I
>>>> have tried to get help, the results have beem mixed; but the mix for
>>>> me has
>>>> been rather good. I would say that in my case, 90% of the CPAN
>>>> modules I
>>>> ever used worked out of the box. For the 10% remaining, in 75% of
>>>> the cases
>>>> I did get help from the person advertised as the author or the
>>>> maintainer,
>>>> and in 25% of cases I never got a response.
>>>> But then, as Jim himself indicated, people move on, without necessarily
>>>> changing their email addresses. Considering how old some of these
>>>> modules
>>>> are, I guess people also retire, or even pass away.
>>>>
>>>> But the fact of the matter is that CPAN is still an incredible
>>>> resource,
>>>> unequalled in my view by any other similar module library of any other
>>>> language anywhere. And I find it amazing that at least 90% of the
>>>> modules
>>>> which I have downloaded from CPAN and used over the last 15 years, just
>>>> work, and moreover keep on working through many, many iterations of
>>>> programs
>>>> and perl versions, and that in fact one very rarely needs additional
>>>> support
>>>> for them. When I compare this with other programming languages and
>>>> support
>>>> libraries, I believe we perl programmers are incredibly spoiled.
>>>>
>>>> Another area where CPAN shines, is the documentation of most
>>>> modules. I
>>>> cannot count the times where I was faced with a request in an area
>>>> of which
>>>> I knew nothing at all, and have just browsed CPAN for modules
>>>> related to
>>>> that area, just to read their documentation and get at least an idea
>>>> of what
>>>> this was all about.
>>>> In recent years, Wikipedia may slowly becoming a runner-up, in terms of
>>>> general information. But when it comes down to the nitty-gritty of
>>>> interfacing with whatever API (or lack of ditto) programmers in
>>>> their most
>>>> delirious moments might have come up with, these CPAN modules are
>>>> unbeatable. Even if after that you decide to program your stuff in
>>>> another
>>>> language than perl, it's still useful.
>>>> (Just for fun, go into CPAN and search for "NATO" (or more
>>>> pragmatically,
>>>> for "sharepoint" e.g.)(or even, God forbid, for "Google" or
>>>> "Facebook" ;-));
>>>> who thinks of such things ?)
>>>>
>>>> So, to summarise : that some modules on CPAN would be marked as
>>>> "maintained" or "supported" and would turn out on closer inspection
>>>> not to
>>>> really be anymore, I find this a very small price to pay for the
>>>> wealth of
>>>> good information and working code that lives there.
>>>>
>>>> My sincerest thanks to CPAN and all its contributors and maintainers
>>>> over
>>>> the years (that includes you of course, Jim). What you have done
>>>> and are
>>>> doing is of incredible benefit to many, many programmers worldwide.
>>>>
>>>> André
>>>>
>>>>
>>>> Jim Schueler wrote:
>>>>>
>>>>> I still use Alpine. And they never fixed the bug where ctrl-c (to
>>>>> cancel
>>>>> a message) and ctrl-x (to send) are so easily confused. Oops.
>>>>> Maybe it's
>>>>> time to start using a mouse.
>>>>>
>>>>> Having wasted so much time, I'll try to be succinct:
>>>>>
>>>>> Most modules on CPAN are bascially throwaways and not supported
>>>>> at all.
>>>>> Use them at your own risk.
>>>>>
>>>>> There are some modules that are just obsolete. Good intentions
>>>>> aside,
>>>>> the developers lost interest and moved on. These are less risky if
>>>>> there's an established user base.
>>>>>
>>>>> There are some very good modules, widely used, that are fully
>>>>> supported
>>>>> and perfectly safe for a production environment.
>>>>>
>>>>> Most mod_perl modules, especially the core modules, fall into that
>>>>> last,
>>>>> gold standard, category. In many cases, support is transferred
>>>>> from one
>>>>> individual to another. And so that commitment is documented. But
>>>>> if a
>>>>> module is no longer supported, don't lie about it. Support forums
>>>>> are an
>>>>> incredible resource. But if commercial software developers similarly
>>>>> blurred this distinction, every p.o.s. would be advertising free
>>>>> 24x7 tech
>>>>> support.
>>>>>
>>>>> Apache::DBI seems like a #2 pretending to be a #3. On the basis of
>>>>> your
>>>>> response, I've concluded that Apache::DBI is no longer supported
>>>>> and has
>>>>> been superceded by newer modules. Especially if no one responds and
>>>>> explicitly accepts the responsibility, this seems like the most
>>>>> appropriate
>>>>> answer for the poster of the original thread.
>>>>>
>>>>> I owe you a :) from a couple posts ago. :)
>>>>>
>>>>> -Jim
>>>>>
>>>>> On Fri, 31 May 2013, Perrin Harkins wrote:
>>>>>
>>>>>> Hi Jim,
>>>>>> I appreciate the thought, but I'm not the mod_perl list. If you
>>>>>> look at
>>>>>> who
>>>>>> has done the most support around here recently, it's probably
>>>>>> Torsten.
>>>>>> (Thanks Torsten!) More to the point, there are many people on
>>>>>> the list
>>>>>> who
>>>>>> know enough perl to help with a question about Apache::DBI. It's a
>>>>>> common
>>>>>> practice to point people here for support on mod_perl modules.
>>>>>>
>>>>>> What are you getting at? Is there a module that you're having
>>>>>> trouble
>>>>>> with
>>>>>> and can't get support for?
>>>>>>
>>>>>> - Perrin
>>>>>>
>>>>>>
>>>>>> On Fri, May 31, 2013 at 10:56 AM, Jim Schueler
>>>>>> <jschueler [at] eloquency>
>>>>>> wrote:
>>>>>> There's an existing thread with an Apache::DBI question. But
>>>>>> since I want to post a separate question to this list, I
>>>>>> decided
>>>>>> to start a new thread.
>>>>>>
>>>>>> Just got done reading the Man page for Apache::DBI. One of the
>>>>>> last notes suggests that this package is obsolete (having been
>>>>>> replaced by Class::DBI or DBIx::CLASS). Beyond that is the
>>>>>> following:
>>>>>>
>>>>>> Edmund Mergl was the original author of Apache::DBI. It is
>>>>>> now
>>>>>> supported
>>>>>> and maintained by the modperl mailinglist, see the mod_perl
>>>>>> documentation
>>>>>> for instructions on how to subscribe.
>>>>>>
>>>>>> Unless Perrin Harkins agreed to take over support for this
>>>>>> module, then that statement is not true. Otherwise, out of
>>>>>> respect for Perrin, I'll try to be general.
>>>>>>
>>>>>> (Aside: Am I the only developer that comes across 'unless
>>>>>> () {}
>>>>>> else {}' constructions?)
>>>>>>
>>>>>> It seems very few distros on CPAN are actually supported. For
>>>>>> my part, I still monitor this list to support my own
>>>>>> contributions from *many* years ago. And I k
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>
>>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.