[30051] in Perl-Users-Digest
Perl-Users Digest, Issue: 1294 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 20 18:09:44 2008
Date: Wed, 20 Feb 2008 15:09:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 20 Feb 2008 Volume: 11 Number: 1294
Today's topics:
Re: ???? <syscjm@sumire.gwu.edu>
Re: Book: Applied Perl - sourcecode required <brian.d.foy@gmail.com>
FormMail - value1=value2 <myfirstnameAHTajn.me.uk>
Re: FormMail - value1=value2 <smallpond@juno.com>
Re: FormMail - value1=value2 <joost@zeekat.nl>
Re: FormMail - value1=value2 <noreply@gunnar.cc>
Re: FormMail - value1=value2 <ben@morrow.me.uk>
Re: FormMail - value1=value2 <myfirstnameAHTajn.me.uk>
how to substitute text - special case <pauls@nospam.off>
Re: how to substitute text - special case <1usa@llenroc.ude.invalid>
Re: how to substitute text - special case <john@castleamber.com>
Re: how to substitute text - special case <lalec@nefkom.net>
Re: Number of days since 1/1/2000 <glennj@ncf.ca>
Re: Number of days since 1/1/2000 <smallpond@juno.com>
Re: Number of days since 1/1/2000 <noreply@gunnar.cc>
Re: Regular Expression to Replace UPPER Case Text with <cwilbur@chromatico.net>
Re: Regular Expression to Replace UPPER Case Text with <cwilbur@chromatico.net>
Re: Regular Expression to Replace UPPER Case Text with <cartercc@gmail.com>
RFC: new module SQL::QueryQueue mapeck65@gmail.com
Re: RFC: new module SQL::QueryQueue <smallpond@juno.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 20 Feb 2008 20:26:03 -0000
From: Chris Mattern <syscjm@sumire.gwu.edu>
Subject: Re: ????
Message-Id: <slrnfrp36r.9d6.syscjm@sumire.gwu.edu>
On 2008-02-11, Jürgen Exner <jurgenex@hotmail.com> wrote:
> paperdo.bbs@bbs.cs.nthu.edu.tw (paperdo) wrote:
>>
>>???n????????spss???p???R?? : 1.???z???p 2.T???w 3.ANOVA 4.???????R 5.?]?????R
>> 6.???]?l?????????R
> [...]
>
> What did you say?
>
> jue
Given that the Subject line included the string "big5", I'd have to ask
if you can speak Chinese.
--
Christopher Mattern
NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities
------------------------------
Date: Wed, 20 Feb 2008 14:57:55 -0600
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: Book: Applied Perl - sourcecode required
Message-Id: <200220081457555172%brian.d.foy@gmail.com>
In article <e8hor35mgdnn5879en7kefvtec0fu7in27@4ax.com>, mydaj [ROR]
wrote:
> Hi,
>
> Title: Applied Perl
> Authors: Peter Williams
> Publisher: M&T books
> ISBN: 0764547836
>
> I bought the above book, I unable to download the source code, as
> the site www.peterwilliams.net is no longer online. Could anyone point
> me to another download link.
Do you really want that source? It's a pretty old book and the source
code mostly pre-dates everything on CPAN. Plese don't learn Perl from
that book :)
------------------------------
Date: Wed, 20 Feb 2008 19:16:33 -0000
From: "Adrian Nelson" <myfirstnameAHTajn.me.uk>
Subject: FormMail - value1=value2
Message-Id: <13rov4jnkn7lt15@corp.supernews.com>
Hi, I hope a really simple question with an equally simple answer...!
Trying to get FormMail to recognise that "M_recipient" means "recipient",
for the purposes of WorldPay which can only pass on fields that begin M_.
Have tried M_recipient=recipient (wishful thinking).
Apologies if I'm posting in the wrong ng, FormMail is Perl based and I live
in hope..
Thanks in advance, Adrian.
------------------------------
Date: Wed, 20 Feb 2008 12:58:20 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: FormMail - value1=value2
Message-Id: <890298e0-64a3-46d8-af2f-ec46e85a325e@b29g2000hsa.googlegroups.com>
On Feb 20, 2:16 pm, "Adrian Nelson" <myfirstnameAHTajn.me.uk> wrote:
> Hi, I hope a really simple question with an equally simple answer...!
>
> Trying to get FormMail to recognise that "M_recipient" means "recipient",
> for the purposes of WorldPay which can only pass on fields that begin M_.
> Have tried M_recipient=recipient (wishful thinking).
>
> Apologies if I'm posting in the wrong ng, FormMail is Perl based and I live
> in hope..
>
> Thanks in advance, Adrian.
FormMail is one of the chief reasons that python was created.
It gives perl a bad name.
For starters it is missing the lines:
use taint;
use strict;
use warnings;
use CGI;
"FormMail is quite possibily the most used CGI program on the
internet"
-- Matt's Script Archive
This is true because spammers have used it billions of times.
------------------------------
Date: Wed, 20 Feb 2008 22:02:24 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: FormMail - value1=value2
Message-Id: <87ir0jnxy7.fsf@zeekat.nl>
smallpond <smallpond@juno.com> writes:
> FormMail is one of the chief reasons that python was created.
> It gives perl a bad name.
Just get the alternative version from here:
http://nms-cgi.sourceforge.net/scripts.shtml
It should be better.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
------------------------------
Date: Wed, 20 Feb 2008 22:15:31 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: FormMail - value1=value2
Message-Id: <623jg3F21cu82U1@mid.individual.net>
Adrian Nelson wrote:
> Trying to get FormMail to recognise that "M_recipient" means
> "recipient", for the purposes of WorldPay which can only pass on fields
> that begin M_. Have tried M_recipient=recipient (wishful thinking).
>
> Apologies if I'm posting in the wrong ng, FormMail is Perl based and I
> live in hope..
Unfortunately it looks like you are in the wrong newsgroup.
Note that there are multiple FormMail scripts. If you want help with
using a particular script, natural ways are to ask the script author or
make use of some list/group/forum that serves the purpose of supporting
just that script. People here can't be expected to know everything about
every Perl application out there.
OTOH, if you convert your question to a Perl question rather than a
question about a particular app, you may well post it here. Before you
do, I recommend that you study the posting guidelines for this group:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
Caveat: If it's Matt's FormMail you are trying to use, don't ask for
help here. Both Matt and his scripts have a bad reputation, and people
here are disinclined to help out with them. If that's the case, you'd
better switch to one of the scripts at
http://nms-cgi.sourceforge.net/scripts.shtml
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 20 Feb 2008 22:13:41 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: FormMail - value1=value2
Message-Id: <l9lu85-cc5.ln1@osiris.mauzo.dyndns.org>
Quoth smallpond <smallpond@juno.com>:
>
> For starters it is missing the lines:
>
> use taint;
Can't locate taint.pm in @INC...
If you think for a minute you'll see why this has to be the case... you
mean
#!/usr/bin/perl -T
Ben
------------------------------
Date: Wed, 20 Feb 2008 22:19:36 -0000
From: "Adrian Nelson" <myfirstnameAHTajn.me.uk>
Subject: Re: FormMail - value1=value2
Message-Id: <13rp9s07ccra8f@corp.supernews.com>
Thanks to you all for your replies. I understand loud and clear that Matt's
FormMail is to be avoided. I also have access to nms_formail, my original
question still applies but should I be posting in a different group?
I was approaching the problem from a php angle where I could define
parameters at the start of the app, was hoping there'd be a similar Perl
method.
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:623jg3F21cu82U1@mid.individual.net...
> Adrian Nelson wrote:
>> Trying to get FormMail to recognise that "M_recipient" means "recipient",
>> for the purposes of WorldPay which can only pass on fields that begin M_.
>> Have tried M_recipient=recipient (wishful thinking).
>>
>> Apologies if I'm posting in the wrong ng, FormMail is Perl based and I
>> live in hope..
>
> Unfortunately it looks like you are in the wrong newsgroup.
>
> Note that there are multiple FormMail scripts. If you want help with using
> a particular script, natural ways are to ask the script author or make use
> of some list/group/forum that serves the purpose of supporting just that
> script. People here can't be expected to know everything about every Perl
> application out there.
>
> OTOH, if you convert your question to a Perl question rather than a
> question about a particular app, you may well post it here. Before you do,
> I recommend that you study the posting guidelines for this group:
> http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
>
> Caveat: If it's Matt's FormMail you are trying to use, don't ask for help
> here. Both Matt and his scripts have a bad reputation, and people here are
> disinclined to help out with them. If that's the case, you'd better switch
> to one of the scripts at http://nms-cgi.sourceforge.net/scripts.shtml
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 20 Feb 2008 14:54:40 -0800
From: pauls <pauls@nospam.off>
Subject: how to substitute text - special case
Message-Id: <IJOdnXkL-YcgMiHanZ2dnUVZ_sytnZ2d@seanet.com>
I have a text file in which I need to replace a plus sign surrounded by
spaces with just a single plus sign:
this:
ua = 1.5745e-09 + (3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
becomes:
ua = 1.5745e-09+(3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
I tried this:
s/ + /+/g;
But it did not seem to work...
Thanks, all help appreciated!!
P
------------------------------
Date: Wed, 20 Feb 2008 23:06:40 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: how to substitute text - special case
Message-Id: <Xns9A4AB8362E5B5asu1cornelledu@127.0.0.1>
pauls <pauls@nospam.off> wrote in news:IJOdnXkL-
YcgMiHanZ2dnUVZ_sytnZ2d@seanet.com:
> I have a text file in which I need to replace a plus sign surrounded
by
> spaces with just a single plus sign:
>
> this:
>
> ua = 1.5745e-09 + (3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> becomes:
> ua = 1.5745e-09+(3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> I tried this:
> s/ + /+/g;
>
> But it did not seem to work...
Well, I would venture to guess that it worked perfectly fine. The fact
that perl could not read your mind and change the meaning of characters
used in a regex to match your imagination does not imply that it did not
work.
Consulting the docs first is a far more productive way of solving
problems.
C:\> perldoc perlre
...
Quantifiers
The following standard quantifiers are recognized:
...
+ Match 1 or more times
...
So, the regex above matches one or more spaces followed by a space and
replaces such sequences with the plus sign.
C:\Temp> cat t.pl
#!/usr/bin/perl
use strict;
use warnings;
my $x = ' ' x 9 . ' - ' . ' ' x 1024;
$x =~ s/ + /+/g;
print "\$x = $x\n";
C:\Temp> t
$x = +-+
It works! For even more fun, try
$x =~ s/ +? /+/g;
...
Now, to achieve what you want:
C:\Temp> cat t.pl
#!/usr/bin/perl
use strict;
use warnings;
my $x = q{1.5745e-09 + (3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2};
$x =~ s/ \+ /+/g;
print "\$x = $x\n";
C:\Temp> t
$x = 1.5745e-09+(3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.rehabitation.com/clpmisc.shtml>
------------------------------
Date: 20 Feb 2008 23:07:15 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: how to substitute text - special case
Message-Id: <Xns9A4AAE2831A8Bcastleamber@130.133.1.4>
pauls <pauls@nospam.off> wrote:
> I have a text file in which I need to replace a plus sign surrounded by
> spaces with just a single plus sign:
>
> this:
>
> ua = 1.5745e-09 + (3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> becomes:
> ua = 1.5745e-09+(3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> I tried this:
> s/ + /+/g;
>
> But it did not seem to work...
s/ \+ /+/g;
+ is a quantifier (1 or more) on the left side of the s///.
--
John
Arachnids near Coyolillo - part 1
http://johnbokma.com/mexit/2006/05/04/arachnids-coyolillo-1.html
------------------------------
Date: Thu, 21 Feb 2008 00:07:19 +0100
From: lars <lalec@nefkom.net>
Subject: Re: how to substitute text - special case
Message-Id: <fpibsb$cgq$1@svr7.m-online.net>
pauls schrieb:
> I have a text file in which I need to replace a plus sign surrounded by
> spaces with just a single plus sign:
>
> this:
>
> ua = 1.5745e-09 + (3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> becomes:
> ua = 1.5745e-09+(3.3585e-09)*((temp+273.15)/(27+273.15)-1)**2
>
> I tried this:
> s/ + /+/g;
>
> But it did not seem to work...
>
>
> Thanks, all help appreciated!!
>
> P
Try it this way
s/ \+ /\+/g
------------------------------
Date: 20 Feb 2008 16:41:57 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: Number of days since 1/1/2000
Message-Id: <slrnfrom2m.a9g.glennj@smeagol.ncf.ca>
At 2008-02-20 10:41AM, "Gunnar Hjalmarsson" wrote:
> Wouldn't it be a good idea to admit that your statement about no modules
> was over-hasty?
This seems very apropos right about now: http://xkcd.com/386/
--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
------------------------------
Date: Wed, 20 Feb 2008 08:55:22 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Number of days since 1/1/2000
Message-Id: <d0b7d6dd-1d57-4123-9ab6-4a321b59049b@62g2000hsn.googlegroups.com>
On Feb 20, 11:41 am, Glenn Jackman <gle...@ncf.ca> wrote:
> At 2008-02-20 10:41AM, "Gunnar Hjalmarsson" wrote:
>
> > Wouldn't it be a good idea to admit that your statement about no modules
> > was over-hasty?
>
> This seems very apropos right about now: http://xkcd.com/386/
>
> --
> Glenn Jackman
> "You can only be young once. But you can always be immature." -- Dave Barry
LOL. I think we can get it to go another week if we try, however:
I WAS WRONG. COUNTING CALENDAR DAYS CORRECTLY SHOULD BE DONE WITH A
TESTED, CORRECT MODULE AND NOT WITH AN AD-HOC SOLUTION.
But the OP was looking for a solution that did not require
modules.
------------------------------
Date: Wed, 20 Feb 2008 18:19:12 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Number of days since 1/1/2000
Message-Id: <6235l0F21lpt7U1@mid.individual.net>
smallpond wrote:
>> At 2008-02-20 10:41AM, "Gunnar Hjalmarsson" wrote:
>>> Wouldn't it be a good idea to admit that your statement about no modules
>>> was over-hasty?
>
> I WAS WRONG. COUNTING CALENDAR DAYS CORRECTLY SHOULD BE DONE WITH A
> TESTED, CORRECT MODULE AND NOT WITH AN AD-HOC SOLUTION.
Thanks. Now I'm going to sleep well tonight. :)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 20 Feb 2008 12:05:36 -0500
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case text
Message-Id: <87odab36e7.fsf@mithril.chromatico.net>
>>>>> "cc" == ccc31807 <cartercc@gmail.com> writes:
cc> I occasionally attend one of the various user group meetings
cc> that these people frequent, and on occassion participate in
cc> the discussion. I remember at least once when discussing the
cc> conversion of a bank's records (that were presented as CSV
cc> files) I suggested that Perl might do well at the conversion,
cc> which was met (litteraly) by guffaws. "You're simply joking,
cc> everybody knows that Perl can't take a file, change a few
cc> things, and write it out to another file, you've got to use a
cc> serious language for that kind of job, like Java or Visual
cc> Basic."
cc> I have found by experience that journeyman programmers, at
cc> least in my city, regard Perl as a joke, unable to do anything
cc> serious. Of course, they don't know the language, and
cc> typically they have the philosophy that you should know only
cc> one language and know it well, otherwise you will merely be
cc> confused. Some project managers have told me, using these
cc> words, that they wouldn't hire any programmer that knew more
cc> than one language.
So they're idiots. Why do you care about the opinions of idiots?
cc> I recently did an analysis of the employment postings for nine
cc> different languages. Here are some raw numbers:
....that mean absolutely nothing. I've seen the same position
advertised over a dozen times because the hiring manager was
desperate, and contacted over a dozen recruiters; I've seen a dozen
positions in a company advertised with one ad.
To reiterate: you're putting up an elaborate rationalization to
justify that people who are demonstrably idiots are laughing at you,
as if the problem is Perl's. Consider, rather, that the problem is
*you*, in that you give far too much credence to the opinion of
idiots.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: 20 Feb 2008 14:46:08 -0500
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case text
Message-Id: <87k5kz2yyn.fsf@mithril.chromatico.net>
>>>>> "cc" == ccc31807 <cartercc@gmail.com> writes:
cc> You have completely misunderstood what I said. The people I
cc> mentioned are not idiots, they're simply ignorant. These
cc> people have well paying, responsible jobs, but the jobs are
cc> MANAGEMENT jobs, not technical or engineering jobs. Typically
cc> they have a business degree with one course in VB and one
cc> course in SQL, and they are convinced that they know
cc> everything there is to know about technology. Why? Because
cc> their opinions have been validated again and again by real
cc> world experience. Again, this is managerial and business
cc> experience, not engineering or technical experience. These are
cc> bankers and marketers and insurance executives, not
cc> programmers or software engineers.
You seem to think that "he's an idiot" can be countered by "but he's
not a programmer or a software engineer." Technical management is
equal parts technical knowledge and management knowledge, which is why
it's so often done poorly.
>> Consider, rather, that the problem is *you*, in that you give
>> far too much credence to the opinion of idiots.
cc> In the first place, they aren't idiots but middle and uppermid
cc> level managers who have done well in their careers.
You also seem to think that "he's an idiot" can be countered by "he's
done well in his career." Examples of successful idiots abound;
you've even offered a number of anecdotes yourself.
cc> In the second place, I evangelize my beliefs, which basically
cc> are Perl and Python in a BSD or Linux server connected to a
cc> Postgres or MySQL DB served up by Apache.
You do a very poor job of evangelizing for Perl if you're advising
people that (a) they'll be laughed at for using it and (b) it's best
avoided, as it's 1980s technology.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: Wed, 20 Feb 2008 11:35:51 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case text
Message-Id: <8d68c6a9-da1c-43f0-be98-27e72d4ec176@34g2000hsz.googlegroups.com>
On Feb 20, 12:05 pm, Charlton Wilbur <cwil...@chromatico.net> wrote:
> cc> different languages. Here are some raw numbers:
>
> ....that mean absolutely nothing. I've seen the same position
> advertised over a dozen times because the hiring manager was
> desperate, and contacted over a dozen recruiters; I've seen a dozen
Not exactly. What these numbers represent are advertised positions. I
think they're correct to an order of magnitude. Don't you think that
there are more Java jobs than, say, Python jobs, and more Python jobs
than, say, Erlang jobs?
> positions in a company advertised with one ad.
>
> To reiterate: you're putting up an elaborate rationalization to
> justify that people who are demonstrably idiots are laughing at you,
> as if the problem is Perl's.
You have completely misunderstood what I said. The people I mentioned
are not idiots, they're simply ignorant. These people have well
paying, responsible jobs, but the jobs are MANAGEMENT jobs, not
technical or engineering jobs. Typically they have a business degree
with one course in VB and one course in SQL, and they are convinced
that they know everything there is to know about technology. Why?
Because their opinions have been validated again and again by real
world experience. Again, this is managerial and business experience,
not engineering or technical experience. These are bankers and
marketers and insurance executives, not programmers or software
engineers.
(Tuesday, I asked one of these if he was a vi man or an emacs man, and
he looked at me as if I were stark, raving mad. The ONLY IDE he has
ever heard of is Visual Studio.)
> Consider, rather, that the problem is
> *you*, in that you give far too much credence to the opinion of
> idiots.
In the first place, they aren't idiots but middle and uppermid level
managers who have done well in their careers. In the second place, I
evangelize my beliefs, which basically are Perl and Python in a BSD or
Linux server connected to a Postgres or MySQL DB served up by Apache.
CC
------------------------------
Date: Wed, 20 Feb 2008 12:19:25 -0800 (PST)
From: mapeck65@gmail.com
Subject: RFC: new module SQL::QueryQueue
Message-Id: <6fd86af3-6243-4414-ae88-09845d1d240d@f47g2000hsd.googlegroups.com>
Looking for comments on the name, as well as the function of this
module proposal. This will be my first public module submission, of a
module I have developed and used privately for a few months. The
intention of the module is to provide a FIFO queue for execution of
SQL statements, providing a fault-tolerant, abstraction of the DBI.
During times of lost database connectivity, statements will be queued
while the SQL::QueryQueue object tries to reconnect. Once a
connection has been reestablished, the queue will resume processing.
SYNOPSIS:
use SQL::QueryQueue;
...
my $queue = SQL::QueryQueue->instance($db_dsn, $db_user_id,
$db_password);
my $sql = qq { update test set ip = '209.197.123.153' where domain
= ?};
$queue->submit_job($sql, 'perlmonks.org');
...
# in another sub somewhere in your program...
my $q = SQL::QueryQueue->instance();
my $sql = qq{ select * from test where ip like '209.%' };
my $array_ref = $q->submit_job($sql);
foreach my $row (@$array_ref) {
print join ', ', @$row, "\n";
}
The SQL::QueryQueue object inherits from Class::Singleton and depends
on DBI. The current implementation also depends on Log::Log4perl and
Linuga::EN::Numbers::Ordinate, though these dependencies could be
removed.
Any comments & suggestions are greatly appreciated.
Michael Peck
mpeck [at] pobox.com
------------------------------
Date: Wed, 20 Feb 2008 14:03:12 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: RFC: new module SQL::QueryQueue
Message-Id: <aae34de2-5a83-470f-a21a-1dfe11890638@z70g2000hsb.googlegroups.com>
On Feb 20, 3:19 pm, mapec...@gmail.com wrote:
> Looking for comments on the name, as well as the function of this
> module proposal. This will be my first public module submission, of a
> module I have developed and used privately for a few months. The
> intention of the module is to provide a FIFO queue for execution of
> SQL statements, providing a fault-tolerant, abstraction of the DBI.
> During times of lost database connectivity, statements will be queued
> while the SQL::QueryQueue object tries to reconnect. Once a
> connection has been reestablished, the queue will resume processing.
>
> SYNOPSIS:
>
> use SQL::QueryQueue;
> ...
> my $queue = SQL::QueryQueue->instance($db_dsn, $db_user_id,
> $db_password);
> my $sql = qq { update test set ip = '209.197.123.153' where domain
> = ?};
> $queue->submit_job($sql, 'perlmonks.org');
> ...
> # in another sub somewhere in your program...
> my $q = SQL::QueryQueue->instance();
> my $sql = qq{ select * from test where ip like '209.%' };
> my $array_ref = $q->submit_job($sql);
> foreach my $row (@$array_ref) {
> print join ', ', @$row, "\n";
>
> }
>
> The SQL::QueryQueue object inherits from Class::Singleton and depends
> on DBI. The current implementation also depends on Log::Log4perl and
> Linuga::EN::Numbers::Ordinate, though these dependencies could be
> removed.
>
> Any comments & suggestions are greatly appreciated.
>
> Michael Peck
> mpeck [at] pobox.com
Looks like a good idea, but why the limitation to a single instance?
I've known of applications using multiple connected databases.
--S
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1294
***************************************