[29218] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 462 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 27 09:10:23 2007

Date: Sun, 27 May 2007 06:09:05 -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           Sun, 27 May 2007     Volume: 11 Number: 462

Today's topics:
    Re: cgi script causing perl loop???? <mmccaws@comcast.net>
    Re: cgi script causing perl loop???? <thepoet_nospam@arcor.de>
    Re: cgi script causing perl loop???? <mmccaws@comcast.net>
    Re: cgi script causing perl loop???? <hjp-usenet2@hjp.at>
    Re: FAQ 4.46 How do I handle linked lists? (David Combs)
        search Web for a file type and download them <lev.weissman@creo.com>
    Re: Soap/WSDL perl versus java ? <RedGrittyBrick@SpamWeary.foo>
        welcome to www.wow-of.com for you World of Warcraft Gol wowof001@gmail.com
    Re: welcome to www.wow-of.com,Welcome to our website fo wowof001@gmail.com
    Re: welcome to www.wow-of.com,Welcome to our website fo wowof001@gmail.com
    Re: welcome to www.wow-of.com wowof001@gmail.com
        WWW::Search produces no output <lev.weissman@creo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 26 May 2007 09:02:17 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: cgi script causing perl loop????
Message-Id: <1180195337.666994.26610@r19g2000prf.googlegroups.com>

On May 25, 2:12 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> mmccaws2 wrote:
> > Hi
>
> > I'm developing a CGI script on an intel Mac and noticed that I
> > probably wrote something that is causing hi cpu utilization.  Every
> > time that I submit the form in the browser starts responding and
> > hanges.  So the question is how do I know if it's a perl problem or an
> > apache problem.  And if it's my Perl code how do I find where it's
> > hanging.
>
> Ahhhh.. run it from the command line, add a few prints, etc. In
> other words, debug it like any other perl program.
>
> Maybe this is worth reading:
>
> perldoc perlfaq9

I guess the real question is how do I determine the run away process
then stop it in an unix environment.  It might be perl or mysql.  I
don't want
to have to reboot each time.

Thanks



------------------------------

Date: Fri, 25 May 2007 18:21:52 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: cgi script causing perl loop????
Message-Id: <46585c98$0$10184$9b4e6d93@newsspool4.arcor-online.net>

mmccaws2 wrote:
> I'm developing a CGI script on an intel Mac and noticed that I
> probably wrote something that is causing hi cpu utilization.  Every
> time that I submit the form in the browser starts responding and
> hanges.  So the question is how do I know if it's a perl problem or an
> apache problem.  And if it's my Perl code how do I find where it's
> hanging.
> 
> I do have these error messages:
> 
> Timeout waiting for output from CGI script /final.cgi, referer:/
> final.cgi?page=register (I've left out the directory info)
> 
> Premature end of script headers: final.cgi, referer:/final.cgi?
> page=register
> 
> perl(677) malloc:  *** vm_allocate(size=452612096) failed (error
> code=3) referer:/final.cgi?page=register
> perl(677) malloc:  *** error: can't allocate region, referer:/
> final.cgi?page=register
> perl(677) malloc:  *** set a breakpoint in szone_error to debug,
> referer:/final.cgi?page=register
> Out of memory!
> referer:/final.cgi?page=register
> 
> These seem to be saying that I've a perl code problem? Right?

Looks a lot like either an endless loop or a problem with
recursion, as your script is trying to allocate 452 megs of ram.

-Chris


------------------------------

Date: 26 May 2007 09:49:14 -0700
From: mmccaws2 <mmccaws@comcast.net>
Subject: Re: cgi script causing perl loop????
Message-Id: <1180198153.753709.183060@d30g2000prg.googlegroups.com>

On May 25, 9:21 am, Christian Winter <thepoet_nos...@arcor.de> wrote:
> mmccaws2 wrote:
> > I'm developing a CGI script on an intel Mac and noticed that I
> > probably wrote something that is causing hi cpu utilization.  Every
> > time that I submit the form in the browser starts responding and
> > hanges.  So the question is how do I know if it's a perl problem or an
> > apache problem.  And if it's my Perl code how do I find where it's
> > hanging.
>
> > I do have these error messages:
>
> > Timeout waiting for output from CGI script /final.cgi, referer:/
> > final.cgi?page=register (I've left out the directory info)
>
> > Premature end of script headers: final.cgi, referer:/final.cgi?
> > page=register
>
> > perl(677) malloc:  *** vm_allocate(size=452612096) failed (error
> > code=3) referer:/final.cgi?page=register
> > perl(677) malloc:  *** error: can't allocate region, referer:/
> > final.cgi?page=register
> > perl(677) malloc:  *** set a breakpoint in szone_error to debug,
> > referer:/final.cgi?page=register
> > Out of memory!
> > referer:/final.cgi?page=register
>
> > These seem to be saying that I've a perl code problem? Right?
>
> Looks a lot like either an endless loop or a problem with
> recursion, as your script is trying to allocate 452 megs of ram.
>
> -Chris

Thanks

it was a subroutine accidentally copied into the subroutine that was
calling it.  probably a recursive nightmare.

But I'm stil looking for good techniques on how to identify processes
that run away.

Mike



------------------------------

Date: Sat, 26 May 2007 21:12:26 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: cgi script causing perl loop????
Message-Id: <slrnf5h1kq.jkk.hjp-usenet2@zeno.hjp.at>

On 2007-05-26 16:02, mmccaws2 <mmccaws@comcast.net> wrote:
> I guess the real question is how do I determine the run away process
> then stop it in an unix environment.  It might be perl or mysql.  I
> don't want
> to have to reboot each time.

Setting resource limits (size of VM per process, number of processes per
user, etc.) helps to prevent runaway processes from gobbling up all
available resources. Either they will die when they hit the ceiling, or
at least they won't grow further while you still have a useable system,
so you can examine what is going on.

	hp


-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | hjp@hjp.at         |
__/   | http://www.hjp.at/ |	-- Sam in "Freefall"


------------------------------

Date: Sun, 27 May 2007 00:53:04 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: FAQ 4.46 How do I handle linked lists?
Message-Id: <f3akpg$ac3$1@reader2.panix.com>

In article <n7ng33lv7blnnu0alfv7lvsl28fgk8c7k3@4ax.com>,
Michele Dondi  <bik.mido@tiscalinet.it> wrote:
>On 1 May 2007 15:29:59 -0700, Brad Baxter <baxter.brad@gmail.com>
>wrote:
>
>>> >s/Both pop and shift are both/Both pop and shift are/;
>>>
>>> s/(?<=Both pop and shift are) both//;
>>
>>:-)
>>
>>s/ both//;
>
># D'Oh!


Simpler, more straightforward, clearer?:

    pop and shift are each ...


David




------------------------------

Date: 27 May 2007 05:16:09 -0700
From: MoshiachNow <lev.weissman@creo.com>
Subject: search Web for a file type and download them
Message-Id: <1180268169.193543.308490@q75g2000hsh.googlegroups.com>

HI=D7=AA

For a project I'm working for, I now manualy search Web for strings
"=2Eps.Z" (compressed postscript files).Normally these are found on FTP://
 . Then I go page by page and download these files one by one,then
process them.
I need to  create code that will do it automatically and download
found files .
I was thinking of something like 'WWW::Mechanize' .
Will appreciate advise on searching and downloading the found files -
possibly with some sample code.

Thanks



------------------------------

Date: Sat, 26 May 2007 16:18:19 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: Soap/WSDL perl versus java ?
Message-Id: <7sqdnb555vU00sXbnZ2dnUVZ8qydnZ2d@bt.com>

wbsurfver@yahoo.com wrote:
>  We need to develop a SOAP service on appache. Java axis 2 with Resin
> seems like what we should do, however  I was wondering if doing this
> in Perl might be a good idea ? I did see that the WSDL generator on
> CPAN says it does not work in Perl 5.8 because of autoload problem in
> 5.8. 

I've successfully used POD::WSDL to generate WSDL using Perl 5.8.x.

I've used that generated WSDL to create C# client stubs for Perl 
web-services. I had to edit two of the namespace definitions though

<wsdl:definitions ...
       xmlns:tns1="http://namespaces.soaplite.com/perl">
   ...
   <wsdl:types>
     <schema targetNamespace="http://namespaces.soaplite.com/perl"

I'm not sure if I could have avoided this by configuring POD::WSDL or 
SOAP::Lite to use consisten namespace values.

> I know that when I had to support an XML parser in Java, it
> seemed complex and the same Perl parser would have been perhaps 5
> times less code. Since there will not be much more than 1000 lines of
> Perl code, any maintenance issues would not be a big problem.

My limited experience of web-services in Perl and Java suggests that 
Perl can be an order of magnitude simpler to code. But it depends. 
Marshalling complex objects seems slow in Perl (SOAP::Lite) but I've not 
benchmarked it against Java. I think Java (6) really starts to win out 
if you have to deal with digitally signed SOAP messages.

Since web-services in Perl means SOAP::Lite, the RPC/Encoded vs 
Document/Literal issue may be something to consider if you *must* 
generate a Doc/Literal service (though I suspect Doc/Literal-Wrapped can 
be, er, simulated, using SOAP::Lite).

If you have complex payloads then Perl SOAP::Lite is least work if you 
return properly constructed Perl objects. Constructing return values 
using SOAP::Data gives you a lot of flexibility but is more work. I was 
forced to do this to make the serializer consistently tag data types 
(string, integer ...) instead of guessing based on value, some non-Perl 
clients don't like it when a string "1" is given an "int" attribute :-)

At the moment, I'd prefer Perl for web-services of low to medium 
complexity where the throughput is not high.

If I was more proficient in Java, I suppose my view might change.


------------------------------

Date: 26 May 2007 08:37:42 -0700
From: wowof001@gmail.com
Subject: welcome to www.wow-of.com for you World of Warcraft Gold.
Message-Id: <1180193862.603874.203650@n15g2000prd.googlegroups.com>

welcome to www.wow-of.com,the cheapest price,the fastest delievery.We
strives to offer the fastest and most reliable service on the web for
all your gaming needs. Feel free to contact us 24 hours a day, 7 days
a week by phone, live chat and email.

Welcome to our website for you World of Warcraft Gold,Wow Gold,Cheap
World of Warcraft Gold,cheap wow gold,buy cheap wow gold,real wow
gold,sell wow gold, ... Here wow gold of 1000 gold at $39.99-
$49.9,World Of Warcraft Gold,buy wow gold,sell world of warcraft
gold(wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--
buy cheap wow gold,sell wow gold.welcome to buy cheap wow gold--cheap,
easy, wow gold purchasing.World of Warcraft,wow gold Super ... We can
have your wow gold,buy wow gold,wow gold game,world of warcraft
gold,wow Gold Cheap wow, Cheap wow gold,world of warcraft gold
deal,Cheap WOW Gold ... Welcome to our website for you World of
Warcraft Gold,Wow Gold,Cheap World of Warcraft Gold,wow gold,buy cheap
wow gold,real wow gold,sell wow gold, ... Here wow gold of 1000 gold
at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell world of
warcraft gold(wow gold),Cheap wow gold,cheapest wow gold store ... wow
gold--buy cheap wow gold,sell wow gold.welcome to buy cheap wow gold--
cheap, easy, wow gold purchasing.World of Warcraft,wow gold Super



------------------------------

Date: 26 May 2007 08:32:28 -0700
From: wowof001@gmail.com
Subject: Re: welcome to www.wow-of.com,Welcome to our website for you World of Warcraft Gold
Message-Id: <1180193547.937419.124510@x35g2000prf.googlegroups.com>

welcome towww.wow-of.com,thecheapest price,the fastest delievery.We
strives to offer the fastest and most reliable service on the web for
all your gaming needs. Feel free to contact us 24 hours a day, 7 days
a week by phone, live chat and email.
> Welcome to our website for you World of Warcraft Gold,Wow Gold,Cheap
> World of Warcraft
>
> Gold,cheap wow gold,buy cheap wow gold,real wow gold,sell wow
> gold, ... Here wow gold of
>
> 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> world of warcraft gold
>
> (wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--buy
> cheap wow gold,sell
>
> wow gold.welcome to buy cheap wow gold--cheap, easy, wow gold
> purchasing.World of
>
> Warcraft,wow gold Super ... We can have your wow gold,buy wow gold,wow
> gold game,world of
>
> warcraft gold,wow Gold Cheap wow, Cheap wow gold,world of warcraft
> gold deal,Cheap WOW
>
> Gold ... Welcome to our website for you World of Warcraft Gold,Wow
> Gold,Cheap World of
>
> Warcraft Gold,wow gold,buy cheap wow gold,real wow gold,sell wow
> gold, ... Here wow gold
>
> of 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> world of warcraft
>
> gold(wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--
> buy cheap wow
>
> gold,sell wow gold.welcome to buy cheap wow gold--cheap, easy, wow
> gold purchasing.World of Warcraft,wow gold Super




------------------------------

Date: 27 May 2007 05:54:10 -0700
From: wowof001@gmail.com
Subject: Re: welcome to www.wow-of.com,Welcome to our website for you World of Warcraft Gold
Message-Id: <1180270450.241310.266410@x35g2000prf.googlegroups.com>

On May 26, 11:32 pm, wowof...@gmail.com wrote:
> welcome towww.wow-of.com,the cheapestprice,the fastest delievery.We
> strives to offer the fastest and most reliable service on the web for
> all your gaming needs. Feel free to contact us 24 hours a day, 7 days
> a week by phone, live chat and email.
>
>
>
> > Welcome to our website for you World of Warcraft Gold,Wow Gold,Cheap
> > World of Warcraft
>
> > Gold,cheap wow gold,buy cheap wow gold,real wow gold,sell wow
> > gold, ... Here wow gold of
>
> > 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> > world of warcraft gold
>
> > (wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--buy
> > cheap wow gold,sell
>
> > wow gold.welcome to buy cheap wow gold--cheap, easy, wow gold
> > purchasing.World of
>
> > Warcraft,wow gold Super ... We can have your wow gold,buy wow gold,wow
> > gold game,world of
>
> > warcraft gold,wow Gold Cheap wow, Cheap wow gold,world of warcraft
> > gold deal,Cheap WOW
>
> > Gold ... Welcome to our website for you World of Warcraft Gold,Wow
> > Gold,Cheap World of
>
> > Warcraft Gold,wow gold,buy cheap wow gold,real wow gold,sell wow
> > gold, ... Here wow gold
>
> > of 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> > world of warcraft
>
> > gold(wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--
> > buy cheap wow
>
> > gold,sell wow gold.welcome to buy cheap wow gold--cheap, easy, wow
> > gold purchasing.World of Warcraft,wow gold Super- Hide quoted text -
>
> - Show quoted text -




------------------------------

Date: 27 May 2007 05:52:04 -0700
From: wowof001@gmail.com
Subject: Re: welcome to www.wow-of.com
Message-Id: <1180270324.656196.223540@q19g2000prn.googlegroups.com>

On May 26, 11:19 am, wowof...@gmail.com wrote:
> welcome towww.wow-of.com,thecheapest price,the fastest delievery.We
> strives to offer the
>
> fastest and most reliable service on the web for all your gaming
> needs. Feel free to
>
> contact us 24 hours a day, 7 days a week by phone, live chat and
> email.
>
> Welcome to our website for you World of Warcraft Gold,Wow Gold,Cheap
> World of Warcraft
>
> Gold,cheap wow gold,buy cheap wow gold,real wow gold,sell wow
> gold, ... Here wow gold of
>
> 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> world of warcraft gold
>
> (wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--buy
> cheap wow gold,sell
>
> wow gold.welcome to buy cheap wow gold--cheap, easy, wow gold
> purchasing.World of
>
> Warcraft,wow gold Super ... We can have your wow gold,buy wow gold,wow
> gold game,world of
>
> warcraft gold,wow Gold Cheap wow, Cheap wow gold,world of warcraft
> gold deal,Cheap WOW
>
> Gold ... Welcome to our website for you World of Warcraft Gold,Wow
> Gold,Cheap World of
>
> Warcraft Gold,wow gold,buy cheap wow gold,real wow gold,sell wow
> gold, ... Here wow gold
>
> of 1000 gold at $39.99-$49.9,World Of Warcraft Gold,buy wow gold,sell
> world of warcraft
>
> gold(wow gold),Cheap wow gold,cheapest wow gold store ... wow gold--
> buy cheap wow
>
> gold,sell wow gold.welcome to buy cheap wow gold--cheap, easy, wow
> gold purchasing.World
>
> of Warcraft,wow gold Super




------------------------------

Date: 27 May 2007 05:50:30 -0700
From: MoshiachNow <lev.weissman@creo.com>
Subject: WWW::Search produces no output
Message-Id: <1180270230.838247.311680@m36g2000hse.googlegroups.com>

HI,

I wonder why the following code produces no output on my XP ?Modules
seem to be properly installed.
===============================
require WWW::Search;

my $sQuery = 'postscript';
my $oSearch = new WWW::Search('AltaVista');
$oSearch->native_query(WWW::Search::escape_query($sQuery));

while (my $oResult = $oSearch->next_result())   {
      print $oResult->url, "\n";
      sleep 1;
} # while



------------------------------

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 462
**************************************


home help back first fref pref prev next nref lref last post