[29831] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1074 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 28 09:09:40 2007

Date: Wed, 28 Nov 2007 06:09:04 -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, 28 Nov 2007     Volume: 11 Number: 1074

Today's topics:
    Re: Close function blocks forever when reading from pip <google@markginsburg.com>
    Re: named pipe and "Text file busy" alexfayn@gmail.com
        new CPAN modules on Wed Nov 28 2007 (Randal Schwartz)
    Re: out of memory <smallpond@juno.com>
    Re: out of memory <tzz@lifelogs.com>
    Re: page 124 of the camel book <wade@zaxfuuq.net>
    Re: Path to Perl <noreply@gunnar.cc>
    Re: Path to Perl <1usa@llenroc.ude.invalid>
        Salut <c.cheroux@yahoo.fr>
        trace of method calls <avilella@gmail.com>
    Re: trace of method calls <s.denaxas@gmail.com>
    Re: trace of method calls <bugbear@trim_papermule.co.uk_trim>
    Re: trace of method calls <avilella@gmail.com>
    Re: trace of method calls <bugbear@trim_papermule.co.uk_trim>
        two hash tables, keys comparision? <robertchen117@gmail.com>
    Re: two hash tables, keys comparision? <peter@makholm.net>
    Re: two hash tables, keys comparision? <krahnj@telus.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 27 Nov 2007 22:50:21 -0800 (PST)
From: Mark <google@markginsburg.com>
Subject: Re: Close function blocks forever when reading from piped output
Message-Id: <582515fc-bb44-46f5-9c59-4bde5915d492@d21g2000prf.googlegroups.com>

On Nov 27, 5:58 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Mark <goo...@markginsburg.com>:
>
> > On Nov 27, 2:19 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> > > This is probably your problem :). Try killing the process before closing
> > > the pipe: open '-|' returns a pid, and kill TERM => $pid should do
> > > something reasonable on Win32.
>
> > > Otherwise try IPC::Run, or do it all by hand with Win32::Process.
>
> > I tried killing the process from within my while(<$FH>) loop and that
> > did allowed the program to complete.  However, I was looking for a
> > more elegant solution.
>
> IPC::Run, as I said. It has a lot of options, but it makes the sort of
> thing you are trying to do very simple.
>
> Ben

Thanks Ben.  I will check it out.


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

Date: Wed, 28 Nov 2007 03:51:43 -0800 (PST)
From: alexfayn@gmail.com
Subject: Re: named pipe and "Text file busy"
Message-Id: <8d04f241-17db-4cef-8ef2-2a48eb700891@s19g2000prg.googlegroups.com>

> That's bizarre. Attempting to write to apipewhich isn't open for
> reading should raise SIGPIPE, and if that is caught the write should
> fail with EPIPE. Are you *sure* this is what's happening? What happens
> if you run this Perl program to write to thepipe:
>


If i just create a new pipe and there's no script (reader) running,
then the program blocks.
If i've got the script running later - it will read 'foo'  from the
pipe. However after i kill the script and then
run this program again (it does not matter whether i start the reader
this time, the behavior is identical with either my Perl script
running or stopped) the program can't write and reports an error "Text
file busy"

Thanks


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

Date: Wed, 28 Nov 2007 05:42:27 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Nov 28 2007
Message-Id: <Js7Bur.F0K@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

CFPlus-0.9956
http://search.cpan.org/~mlehmann/CFPlus-0.9956/
undocumented utility garbage for our crossfire client 
----
Catalyst-Model-Jifty-DBI-0.03
http://search.cpan.org/~ishigaki/Catalyst-Model-Jifty-DBI-0.03/
Jifty::DBI Model Class with some magic on top 
----
DBIx-Perform-0.694
http://search.cpan.org/~bkchapin/DBIx-Perform-0.694/
Informix Perform(tm) emulator 
----
Date-Manip-5.48
http://search.cpan.org/~sbeck/Date-Manip-5.48/
date manipulation routines 
----
Dicop-Workerframe-2.19
http://search.cpan.org/~bsi/Dicop-Workerframe-2.19/
----
EV-1.4
http://search.cpan.org/~mlehmann/EV-1.4/
perl interface to libev, a high performance full-featured event loop 
----
Eludia-07.11.27
http://search.cpan.org/~dmow/Eludia-07.11.27/
----
Email-Send-SMTP-TLS-0.01
http://search.cpan.org/~fayland/Email-Send-SMTP-TLS-0.01/
Send Messages using Net::SMTP::TLS 
----
Exporter-5.60
http://search.cpan.org/~ferreira/Exporter-5.60/
Implements default import method for modules 
----
Finance-Currency-Convert-BChile-0.031
http://search.cpan.org/~huguei/Finance-Currency-Convert-BChile-0.031/
Currency conversion module between Chilean Pesos (CLP) and USA Dollars (USD). 
----
Gungho-0.09005_02
http://search.cpan.org/~dmaki/Gungho-0.09005_02/
Yet Another High Performance Web Crawler Framework 
----
InSilicoSpectro-1.3.11
http://search.cpan.org/~alexmass/InSilicoSpectro-1.3.11/
Open source Perl library for proteomics 
----
Infobot-0.91_01
http://search.cpan.org/~sargie/Infobot-0.91_01/
Developer's Overview 
----
Log-Dynamic-0.03
http://search.cpan.org/~jconerly/Log-Dynamic-0.03/
OOish dynamic and customizable logging 
----
Mac-iTunes-Library-XML-0.01_04
http://search.cpan.org/~dinomite/Mac-iTunes-Library-XML-0.01_04/
Perl extension for parsing an iTunes XML library 
----
MobilePhone-0.01
http://search.cpan.org/~alic/MobilePhone-0.01/
A Collection of Classes and Function modules related to manipulating Mobile Phone data. 
----
Net-UCP-0.30
http://search.cpan.org/~nemux/Net-UCP-0.30/
Perl extension for EMI - UCP Protocol. 
----
Object-InsideOut-3.34
http://search.cpan.org/~jdhedden/Object-InsideOut-3.34/
Comprehensive inside-out object support module 
----
Ogre-0.32
http://search.cpan.org/~slanning/Ogre-0.32/
Perl binding for the OGRE C++ graphics library 
----
Parse-Marpa-0.001_048
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_048/
(pre-Alpha) Jay Earley's general parsing algorithm, with LR(0) precomputation 
----
PerlIO-locale-0.04
http://search.cpan.org/~rgarcia/PerlIO-locale-0.04/
PerlIO layer to use the encoding of the current locale 
----
SNMP-Class-0.06
http://search.cpan.org/~aduitsis/SNMP-Class-0.06/
A convenience class around the NetSNMP perl modules. 
----
Sepia-0.95_01
http://search.cpan.org/~seano/Sepia-0.95_01/
Simple Emacs-Perl Interface 
----
Set-IntSpan-Fast-1.10
http://search.cpan.org/~andya/Set-IntSpan-Fast-1.10/
Fast handling of sets containing integer spans. 
----
Set-IntSpan-Fast-1.11
http://search.cpan.org/~andya/Set-IntSpan-Fast-1.11/
Fast handling of sets containing integer spans. 
----
Signal-StackTrace-0.03
http://search.cpan.org/~lembark/Signal-StackTrace-0.03/
install signal handler to print a stacktrace. 
----
String-LCSS_XS-0.5
http://search.cpan.org/~limaone/String-LCSS_XS-0.5/
Find The Longest Common Substring of Two Strings. 
----
Test-UseAllModules-0.09
http://search.cpan.org/~ishigaki/Test-UseAllModules-0.09/
do use_ok() for all modules MANIFESTed 
----
Text-Template-Simple-0.49_03
http://search.cpan.org/~burak/Text-Template-Simple-0.49_03/
Simple text template engine 
----
Tk-GraphItems-0.09
http://search.cpan.org/~lamprecht/Tk-GraphItems-0.09/
Display relation-graphs on a Tk::Canvas 
----
Tk-GraphItems-0.10
http://search.cpan.org/~lamprecht/Tk-GraphItems-0.10/
Display relation-graphs on a Tk::Canvas 
----
XML-Compile-0.61
http://search.cpan.org/~markov/XML-Compile-0.61/
Compilation based XML processing 
----
XML-Compile-0.62
http://search.cpan.org/~markov/XML-Compile-0.62/
Compilation based XML processing 
----
XML-Compile-SOAP-0.64
http://search.cpan.org/~markov/XML-Compile-SOAP-0.64/
base-class for SOAP implementations 
----
arclog-3.00
http://search.cpan.org/~imacat/arclog-3.00/
Archive the log files monthly 
----
google_talk_bot
http://search.cpan.org/~goyali/google_talk_bot/
----
google_talk_bot_v_01
http://search.cpan.org/~goyali/google_talk_bot_v_01/
----
slackget10-0.12
http://search.cpan.org/~dupuisarn/slackget10-0.12/
The main slack-get 1.0 library 
----
slackget10-0.12b
http://search.cpan.org/~dupuisarn/slackget10-0.12b/
The main slack-get 1.0 library 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 27 Nov 2007 21:56:47 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: out of memory
Message-Id: <c61a3f71-feb0-459f-9b70-a86ddf0e69a9@o42g2000hsc.googlegroups.com>

On Nov 27, 11:57 pm, aniait <aithalanir...@gmail.com> wrote:
> Is there any way to solve the 'out of memory exception' of perl on
> windows? I got this when i tried to dump a large hash into a file
> using Dumper.


Do you have to use Dumper on the whole hash?

What's wrong with:

foreach my $key (keys %myhash) {
  print FH $key,":",$myhash{$key}, "\n";
}

or even:

foreach my $key (keys %myhash) {
  print FH "KEY=",$key,"\n", Dumper($myhash{$key}),"\n";
}


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

Date: Wed, 28 Nov 2007 07:54:25 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: out of memory
Message-Id: <86sl2q4gry.fsf@lifelogs.com>

On Tue, 27 Nov 2007 20:57:27 -0800 (PST) aniait <aithalanirudh@gmail.com> wrote: 

a> Is there any way to solve the 'out of memory exception' of perl on
a> windows? I got this when i tried to dump a large hash into a file
a> using Dumper.

Try it with the YAML module, you may have better luck (and the results
are quite readable).  In general as smallpond suggested you may just
have to do it key by key.

Ted


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

Date: Wed, 28 Nov 2007 01:22:04 -0700
From: "Wade Ward" <wade@zaxfuuq.net>
Subject: Re: page 124 of the camel book
Message-Id: <1196244317_8205@sp12lax.superfeed.net>



"Jürgen Exner" <jurgenex@hotmail.com> wrote in message 
news:gJ33j.14791$Jy1.3782@trndny02...
> Wade Ward wrote:
>> already on this one simple prog.  I was astonished when I couldn't
>> break;
>> ,  like you do in C.
>
> May I suggest you take an introductory class in structured programming? 
> Then you don't need those remnants of goto.
> Yes, there are rare circumstances where breaking out of a loop in its 
> middle seems to be convenient. But is never a necessity and usually 
> indicates the programmer is not all that familiar with modern program 
> design.
I received my post-grad transcripts today.  They begin with Jay Goldman and 
end with a geometry class from the MN dept of edu in which I appear to have 
gotten a D while having gotten an A in the like material from the dept of 
math.  Ask Carl.

Strange communists.

>> That's when I started throwing the camel book around like an angry
>> gorilla. Page 124 is on the largest-surviving chunk.
>
> Of course structured programming and good program design is independant of 
> the programming language used.
I received my structured prog instruction from the Y in 1988.  I would like 
to talk somewhat of independacne, which anothr might render as indepedence.
-- 
wade ward

wade@zaxfuuq.net
435 -838-7760 



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


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

Date: Wed, 28 Nov 2007 10:10:48 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Path to Perl
Message-Id: <5r4ph1F12mgmdU1@mid.individual.net>

Ron Bergin wrote:
> On Nov 27, 9:01 am, Gunnar Hjalmarsson <nore...@gunnar.cc> wrote:
>> CGI scripts need the correct path to perl also on Windows.
> 
> Sorry Gunnar, but that's not true.  Apache can be configured to use
> the Windows registry to locate perl instead of using the shebang
> line.  Here's the required config line.
> 
> ScriptInterpreterSource registry
> 
> http://httpd.apache.org/docs/1.3/mod/core.html#scriptinterpretersource

Thanks for the correction; that directive was new to me.

TMTOWTDI

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 28 Nov 2007 13:50:28 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Path to Perl
Message-Id: <Xns99F659EE9C392asu1cornelledu@127.0.0.1>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in
news:5r30ncF12m0fuU1@mid.individual.net: 

> Sherman Pendley wrote:
>> "chuck" <chuck@no.where> writes:
>>>
>>> from his Windows development machine to our Linux web server.
> 
> Sounds like CGI scripts to me ...
> 
>> Just use "#!/usr/bin/perl" - Windows uses its file-type associations
>> to find the Perl binary anyway, so it won't care.
> 
> ... and if so, that's not true. CGI scripts need the correct path to 
> perl also on Windows.

Not really.

http://httpd.apache.org/docs/2.2/mod/core.html#scriptinterpretersource

Use that option, and you rarely have to tinker with shebang lines.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>



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

Date: Wed, 28 Nov 2007 00:27:58 -0800 (PST)
From: "Cath." <c.cheroux@yahoo.fr>
Subject: Salut
Message-Id: <abe46d37-4099-4bc4-8f92-d8ff1e3bb682@s36g2000prg.googlegroups.com>

ce nom de groupe e007 exixte -t il d=E9j=E0 ?
Merci !
Cath


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

Date: Wed, 28 Nov 2007 02:00:18 -0800 (PST)
From: "avilella@gmail.com" <avilella@gmail.com>
Subject: trace of method calls
Message-Id: <b1e17693-dc4d-4fbb-8860-69baffd08a15@e23g2000prf.googlegroups.com>

Hi,

I would like to trace all the method calls for a script. What is the
best module people would recommend for this?

Cheers,

    Albert.


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

Date: Wed, 28 Nov 2007 02:14:04 -0800 (PST)
From: Spiros Denaxas <s.denaxas@gmail.com>
Subject: Re: trace of method calls
Message-Id: <e8ea0ac8-231c-4241-8ade-ff7ac3f04d7b@a39g2000pre.googlegroups.com>

On Nov 28, 10:00 am, "avile...@gmail.com" <avile...@gmail.com> wrote:
> Hi,
>
> I would like to trace all the method calls for a script. What is the
> best module people would recommend for this?
>
> Cheers,
>
>     Albert.

Hi Albert,

I would use the Perl debugger for this.

perl -d script.pl

tracing is available with 'T' and it toggled with 't'.

Run 'perldoc perldebtut' for more info.

Addionally, I believe the Perl profiler has a similar output support.
Have a look at:

http://search.cpan.org/~nwclark/perl-5.8.6/utils/dprofpp.PL
and
http://search.cpan.org/perldoc?Devel::DProf

hope this helps,
Spiros


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

Date: Wed, 28 Nov 2007 10:22:43 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: trace of method calls
Message-Id: <13kqgbjj7itlv75@corp.supernews.com>

avilella@gmail.com wrote:
> Hi,
> 
> I would like to trace all the method calls for a script. What is the
> best module people would recommend for this?

Dynamically, or statically?

   BugBear


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

Date: Wed, 28 Nov 2007 02:50:22 -0800 (PST)
From: "avilella@gmail.com" <avilella@gmail.com>
Subject: Re: trace of method calls
Message-Id: <f4418c57-a39e-4128-82f7-5b95b2531d9e@g30g2000hsb.googlegroups.com>

On Nov 28, 10:22 am, bugbear <bugbear@trim_papermule.co.uk_trim>
wrote:
> avile...@gmail.com wrote:
> > Hi,
>
> > I would like to trace all the method calls for a script. What is the
> > best module people would recommend for this?
>
> Dynamically, or statically?
>
>    BugBear

I think what I want is statically. I can use breakpoints and "T", but
I rather want to run the script completely and then have a debug file
with all the method calls.


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

Date: Wed, 28 Nov 2007 13:50:06 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: trace of method calls
Message-Id: <13kqsgeh1kdaj8c@corp.supernews.com>

avilella@gmail.com wrote:
> On Nov 28, 10:22 am, bugbear <bugbear@trim_papermule.co.uk_trim>
> wrote:
>> avile...@gmail.com wrote:
>>> Hi,
>>> I would like to trace all the method calls for a script. What is the
>>> best module people would recommend for this?
>> Dynamically, or statically?
>>
>>    BugBear
> 
> I think what I want is statically. I can use breakpoints and "T", but
> I rather want to run the script completely and then have a debug file
> with all the method calls.

That's "dynamic".

    BugBear


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

Date: Wed, 28 Nov 2007 00:30:36 -0800 (PST)
From: "robertchen117@gmail.com" <robertchen117@gmail.com>
Subject: two hash tables, keys comparision?
Message-Id: <637f6d20-5884-48f1-99fe-3aa7f3197640@i12g2000prf.googlegroups.com>

let's say I have two hash tables: new, old

How to find out the keys in new, but not in old?
How to find out the keys in old, but not in new?

tell me the quickest way.

Thanks.


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

Date: Wed, 28 Nov 2007 08:36:21 +0000
From: Peter Makholm <peter@makholm.net>
Subject: Re: two hash tables, keys comparision?
Message-Id: <87wss2g41m.fsf@hacking.dk>

"robertchen117@gmail.com" <robertchen117@gmail.com> writes:

> How to find out the keys in new, but not in old?
> How to find out the keys in old, but not in new?
>
> tell me the quickest way.

What have you tried?


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

Date: Wed, 28 Nov 2007 11:59:20 GMT
From: "John W. Krahn" <krahnj@telus.net>
Subject: Re: two hash tables, keys comparision?
Message-Id: <474D57CE.C7395A87@telus.net>

"robertchen117@gmail.com" wrote:
> 
> let's say I have two hash tables: new, old
> 
> How to find out the keys in new, but not in old?

my @keys_in_new_not_old = grep !exists $old{$_}, keys %new;


> How to find out the keys in old, but not in new?

my @keys_in_old_not_new = grep !exists $new{$_}, keys %old;




John
-- 
use Perl;
program
fulfillment


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

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


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