[31648] in Perl-Users-Digest
Perl-Users Digest, Issue: 2911 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 14 21:09:28 2010
Date: Wed, 14 Apr 2010 18:09:10 -0700 (PDT)
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, 14 Apr 2010 Volume: 11 Number: 2911
Today's topics:
$$$Cheap Wholesale Nike Air Max Shoes Air Jordan Shoes <hhl678@sohu.com>
Best modules for XML/SOAP web services <abc@def.com>
Re: Best modules for XML/SOAP web services <lskatz@gmail.com>
Help troubleshooting Perl issue <emartin24@gmail.com>
Re: Help troubleshooting Perl issue <tzz@lifelogs.com>
Re: Help troubleshooting Perl issue <smallpond@juno.com>
Re: Help troubleshooting Perl issue <emartin24@gmail.com>
Re: Help troubleshooting Perl issue <emartin24@gmail.com>
Re: Help troubleshooting Perl issue <jurgenex@hotmail.com>
Re: Help troubleshooting Perl issue <tzz@lifelogs.com>
Re: Net::SMTP errors <hjp-usenet2@hjp.at>
perl/PHP sessioning <lskatz@gmail.com>
Re: Using new features of Perl <tzz@lifelogs.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Apr 2010 08:05:55 -0700 (PDT)
From: huang <hhl678@sohu.com>
Subject: $$$Cheap Wholesale Nike Air Max Shoes Air Jordan Shoes Air Force one shoes(PayPal Payment)(www.24hoursneakers.com)
Message-Id: <480c9ac4-99f4-4194-9820-3f6c40c874d9@y14g2000yqm.googlegroups.com>
Are you searching for good quality and low price products?our company
want to be you reliable supplier in china,we offer brand
shoes,bags,jeans,clothes,we accept a variety of payment
methods .Convenient for you the more you order the better price for
you! if you interested in our goods,pls don't hestate to contact me
Our website (http://www.24hoursneakers.com/)
=E2=97=A5=E2=96=88=E2=96=84=E2=96=83=E2=96=81
...=E2=97=A5=E2=96=88=E2=98=86=E2=96=88=E2=96=85=E2=96=84=E2=96=83=E2=96=81=
=E2=96=81=E2=96=81=E2=96=81=E2=96=81=E2=96=81=E2=96=81=E2=96=83=E2=96=84=E2=
=96=85=EF=B8=BF@=EF=B8=BF=E2=96=85=E2=96=84=E2=96=81
=E3=80=93=E2=96=87=E2=96=88=E2=96=88=E2=96=88=E2=96=88Ship Wholesaler=E2=
=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=
=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=85=E2=96=84=E2=96=83=E2=96=81=
=E2=96=81
=E3=80=93=E3=80=93=E3=80=93=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=
=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88
Nike Air Max87 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max88 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max89 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max90 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max91 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max95 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max97 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max2003 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max2009 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max360 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max95 360 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max90 360 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max LTD Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max TN Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max180 Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
Nike Air Max90 Boot Shoes Wholesale(http://www.24hoursneakers.com/)
(PayPal Payment)
------------------------------
Date: Wed, 14 Apr 2010 23:00:08 +0100
From: zaphod <abc@def.com>
Subject: Best modules for XML/SOAP web services
Message-Id: <cNWdnS3CHuJ1p1vWnZ2dnUVZ8hGdnZ2d@brightview.co.uk>
I'm about to put together a web service based on a database I've been developing but it's a long time since I looked at the CPAN environment for this sort of thing. So, what are currently the best of breed modules for XML parsing and the creation of SOAP web services. Or, if SOAP is no longer the standard what to use instead.
zaphod
------------------------------
Date: Wed, 14 Apr 2010 15:26:09 -0700 (PDT)
From: Lee <lskatz@gmail.com>
Subject: Re: Best modules for XML/SOAP web services
Message-Id: <432f41f4-1d37-4ac2-b7ca-68460c7198b6@k33g2000yqc.googlegroups.com>
On Apr 14, 6:00=A0pm, zaphod <a...@def.com> wrote:
> I'm about to put together a web service based on a database I've been dev=
eloping but it's a long time since I looked at the CPAN environment for thi=
s sort of thing. So, what are currently the best of breed modules for XML p=
arsing and the creation of SOAP web services. Or, if SOAP is no longer the =
standard what to use instead.
>
> zaphod
I've always used SOAP::Lite.
------------------------------
Date: Tue, 13 Apr 2010 21:33:33 -0700 (PDT)
From: Eric Martin <emartin24@gmail.com>
Subject: Help troubleshooting Perl issue
Message-Id: <b50bab21-c299-40d6-b06d-5af05d9f7d4e@c36g2000yqm.googlegroups.com>
I have an image gallery script that people have used since 2003.
Recently I've been getting a lot of messages about hosts disabling the
script because of hight CPU usage.
I've done some investigating and can't pinpoint the problem. I ran gdb
against one of the processes and got the following:
Reading symbols from /usr/bin/perl...(no debugging symbols
found)...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Reading symbols from /lib/libnsl.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libm.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libutil.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/tls/libc.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/perl5/5.8.8/i686-linux/auto/Cwd/Cwd.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl5/5.8.8/i686-linux/auto/Cwd/Cwd.so
Reading symbols from /usr/lib/perl5/5.8.8/i686-linux/auto/Fcntl/
Fcntl.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl5/5.8.8/i686-linux/auto/Fcntl/Fcntl.so
0x0021597e in __xstat64@GLIBC_2.1 () from /lib/tls/libc.so.6
Am I correct in thinking that the issue is with Fcntl/flock? Are there
any other suggestions on what I can check?
Thanks!
------------------------------
Date: Wed, 14 Apr 2010 09:05:20 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <8739yy6sf3.fsf@lifelogs.com>
On Tue, 13 Apr 2010 21:33:33 -0700 (PDT) Eric Martin <emartin24@gmail.com> wrote:
EM> I have an image gallery script that people have used since 2003.
EM> Recently I've been getting a lot of messages about hosts disabling the
EM> script because of hight CPU usage.
EM> I've done some investigating and can't pinpoint the problem. I ran gdb
EM> against one of the processes and got the following:
...
EM> Loaded symbols for /usr/lib/perl5/5.8.8/i686-linux/auto/Fcntl/Fcntl.so
EM> 0x0021597e in __xstat64@GLIBC_2.1 () from /lib/tls/libc.so.6
EM> Am I correct in thinking that the issue is with Fcntl/flock? Are there
EM> any other suggestions on what I can check?
You should look through the source code and look for potential problems.
We could do it too, if you showed it to us. As it is, you're showing us
a black box and asking us to guess what's inside and why it's not
running well.
Ted
------------------------------
Date: Wed, 14 Apr 2010 08:07:32 -0700 (PDT)
From: smallpond <smallpond@juno.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <85756cb4-5faa-49f0-b0ab-5f22edf2ebd7@z3g2000yqz.googlegroups.com>
On Apr 14, 12:33=A0am, Eric Martin <emarti...@gmail.com> wrote:
> I have an image gallery script that people have used since 2003.
> Recently I've been getting a lot of messages about hosts disabling the
> script because of hight CPU usage.
>
> I've done some investigating and can't pinpoint the problem. I ran gdb
> against one of the processes and got the following:
>
.. snip ...
>
> Am I correct in thinking that the issue is with Fcntl/flock? Are there
> any other suggestions on what I can check?
>
flock in Linux blocks, so could be. Why do you need to flock?
There is probably a better way to provide exclusive access to the
resource which needs to be shared.
------------------------------
Date: Wed, 14 Apr 2010 08:49:39 -0700 (PDT)
From: Eric Martin <emartin24@gmail.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <4ee038b6-e68e-49f7-bf87-852e5533f378@j21g2000yqh.googlegroups.com>
On Apr 14, 7:05=A0am, Ted Zlatanov <t...@lifelogs.com> wrote:
> On Tue, 13 Apr 2010 21:33:33 -0700 (PDT) Eric Martin <emarti...@gmail.com=
> wrote:
>
snip
>
> You should look through the source code and look for potential problems.
>
> We could do it too, if you showed it to us. =A0As it is, you're showing u=
s
> a black box and asking us to guess what's inside and why it's not
> running well.
Thanks Ted. Problem is, the source code is very large, and admittedly,
pretty bad. I was hoping that the output of gdb would provide some
clues.
What I don't get is why this is all of a sudden an issue. Not sure if
it's related to a Perl upgrade or OS, etc. The other problem is that
it doesn't happen consistently, so I haven't been able to reproduce it
yet.
I was wondering if there were some troubleshooting techniques, but it
sounds like a code review and more debugging might be in order.
>
> Ted
------------------------------
Date: Wed, 14 Apr 2010 08:53:01 -0700 (PDT)
From: Eric Martin <emartin24@gmail.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <93b5cb17-cb2f-4aa4-a382-fb198296b54b@b33g2000yqc.googlegroups.com>
On Apr 14, 8:07=A0am, smallpond <smallp...@juno.com> wrote:
> On Apr 14, 12:33=A0am, Eric Martin <emarti...@gmail.com> wrote:
>
> > I have an image gallery script that people have used since 2003.
> > Recently I've been getting a lot of messages about hosts disabling the
> > script because of hight CPU usage.
>
> > I've done some investigating and can't pinpoint the problem. I ran gdb
> > against one of the processes and got the following:
>
> .. snip ...
>
> > Am I correct in thinking that the issue is with Fcntl/flock? Are there
> > any other suggestions on what I can check?
>
> flock in Linux blocks, so could be. =A0Why do you need to flock?
> There is probably a better way to provide exclusive access to the
> resource which needs to be shared.
Why? I guess when I wrote the program, I thought it was needed to
prevent data collisions. Here's an example of an open and write:
open(TMP,$template_path) || error("100|$template_path");
eval q{ flock(TMP,LOCK_EX); };
my @template =3D <TMP>;
close(TMP);
open(IMG2,">$cat_path") || error_log(__FILE__, __LINE__, "could not
add information to a data file ($cat_path): $!");
eval q{ flock(IMG2,LOCK_EX); };
print IMG2 @cat_info;
close(IMG2);
If you have any suggestions on a better way, I'm all ears. Thanks for
your help.
------------------------------
Date: Wed, 14 Apr 2010 09:01:59 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <3lpbs592kngajc7khafn1j3sq4pk0evamk@4ax.com>
Eric Martin <emartin24@gmail.com> wrote:
>I have an image gallery script that people have used since 2003.
>Recently I've been getting a lot of messages about hosts disabling the
>script because of hight CPU usage.
>
[...]
>I was wondering if there were some troubleshooting techniques, but it
>sounds like a code review and more debugging might be in order.
No, not debugging but profiling.
jue
------------------------------
Date: Wed, 14 Apr 2010 11:34:59 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Help troubleshooting Perl issue
Message-Id: <87pr223scs.fsf@lifelogs.com>
On Wed, 14 Apr 2010 08:53:01 -0700 (PDT) Eric Martin <emartin24@gmail.com> wrote:
EM> Why? I guess when I wrote the program, I thought it was needed to
EM> prevent data collisions. Here's an example of an open and write:
EM> open(TMP,$template_path) || error("100|$template_path");
EM> eval q{ flock(TMP,LOCK_EX); };
EM> my @template = <TMP>;
EM> close(TMP);
EM> open(IMG2,">$cat_path") || error_log(__FILE__, __LINE__, "could not
EM> add information to a data file ($cat_path): $!");
EM> eval q{ flock(IMG2,LOCK_EX); };
EM> print IMG2 @cat_info;
EM> close(IMG2);
EM> If you have any suggestions on a better way, I'm all ears. Thanks for
EM> your help.
You probably don't need LOCK_EX on read, but LOCK_SH instead. Look at
`perldoc -f flock' and especially
To avoid the possibility of miscoordination, Perl now flushes
FILEHANDLE before locking or unlocking it.
That may be the problem. Now how can you tell if flock() is a problem?
Step 1: write a benchmark with an without flock. This is really easy,
there are modules to do all the boring details. Make sure you get at
least 100K iterations on an active system and you'll probably hit the
flock() trouble spots if they exist.
Step 2: reconsider using plain files as databases. Perhaps SQLite is
more suitable for your needs, or perhaps one of the *dbm solutions will
work. Maybe you can use an external DB server; DBI supports practically
everything (including SQLite). If you must have a file, break it down
into multiple files and lock only the ones you use.
On Wed, 14 Apr 2010 08:49:39 -0700 (PDT) Eric Martin <emartin24@gmail.com> wrote:
EM> Thanks Ted. Problem is, the source code is very large, and admittedly,
EM> pretty bad. I was hoping that the output of gdb would provide some
EM> clues.
EM> What I don't get is why this is all of a sudden an issue. Not sure if
EM> it's related to a Perl upgrade or OS, etc. The other problem is that
EM> it doesn't happen consistently, so I haven't been able to reproduce it
EM> yet.
EM> I was wondering if there were some troubleshooting techniques, but it
EM> sounds like a code review and more debugging might be in order.
I would reconsider hand-rolled file-based databases. Nowadays that's
not likely to give you good performance or reliability compared to the
many available third-party solutions on CPAN and elsewhere.
Ted
------------------------------
Date: Wed, 14 Apr 2010 14:08:31 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Net::SMTP errors
Message-Id: <slrnhsbc1v.hms.hjp-usenet2@hrunkner.hjp.at>
On 2010-04-13 11:46, Shmuel Metz <spamtrap@library.lspace.org.invalid> wrote:
> In <45022a07-aed7-4312-beca-aaab40fecf9b@12g2000yqi.googlegroups.com>, on
> 04/12/2010
> at 11:31 AM, "david.karr" <davidmichaelkarr@gmail.com> said:
>
>> $smtp->mail($ENV{USER});
>
> From RFC 5321:
>
> Mailbox = Local-part "@" ( Domain / address-literal )
>
>>Net::SMTP=GLOB(0x10b822c0)<<< 553 5.5.4 <<myid>>... Domain name required
>>for sender address <myid>
>
> See above.
Yup.
>>Net::SMTP=GLOB(0x10b822c0)>>> RCPT TO:<<myid>@<mydomain>>
>
> That looks like a bug; it should have sent a QUIT after the 553 on the
> MAIL command.
The server announced that it supports pipelinging, so the client is
allowed to send
MAIL FROM:<...>
RCPT TO:<...>
RCPT TO:<...>
RCPT TO:<...>
DATA
all in one fell swoop and then pick up the responses. But you are right
that it doesn't look as if it did. And if the client does wait for the
response to MAIL FROM: it might as well act on it.
hp
------------------------------
Date: Wed, 14 Apr 2010 15:04:03 -0700 (PDT)
From: Lee <lskatz@gmail.com>
Subject: perl/PHP sessioning
Message-Id: <3cc76c86-f7e8-4373-9002-cdbc08524366@u34g2000yqu.googlegroups.com>
Hi, I wanted to know how to use PHP sessioning with Perl.
In short, I am using sessioning to keep track of particular variables
between SOAP calls. The SOAP server is being run with PHP and cannot
be changed to another language because of the PHP infrastructure that
has already been built. When I use a PHP client, it remembers the
variables. When I use SOAP::Lite, it does not remember the session
variables. How can I make Perl interface with PHP's sessioning?
Thank you for any help.
My problem is detailed very well on the PHP forum at
http://groups.google.com/group/comp.lang.php/browse_thread/thread/7657d5bf882f287b
------------------------------
Date: Wed, 14 Apr 2010 09:08:30 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Using new features of Perl
Message-Id: <87y6gq5dpd.fsf@lifelogs.com>
On Tue, 13 Apr 2010 20:56:15 +0100 Ben Morrow <ben@morrow.me.uk> wrote:
BM> IMHO best practice would be
BM> use 5.010;
BM> at the top of any file using these features, but note the 'would be'
BM> rather than 'is' since 'feature' as a whole is fairly new and it's not
BM> necessarily clear yet if there are any significant gotchas.
I like to use Modern::Perl. It does that plus a few other nice
features:
For now, this only enables the strict and warnings pragmas, as well as
all of the features available in Perl 5.10. It also enables C3 method
resolution order; see "perldoc mro" for an explanation. In the future,
it will include additional CPAN modules which have proven useful and
stable.
Ted
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 2911
***************************************