[26376] in Perl-Users-Digest
Perl-Users Digest, Issue: 8548 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 20 09:05:28 2005
Date: Thu, 20 Oct 2005 06:05:04 -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 Thu, 20 Oct 2005 Volume: 10 Number: 8548
Today's topics:
ActivePerl 5.8.7 crashes <daveandniki@ntlworld.com>
Re: getElementsByTagName, tag does not exist <matthew.garrish@sympatico.ca>
Re: Microsoft Hatred FAQ <my_email_is_posted_on_my_website@munged.invalid>
Re: why the perl docs suck <phaylon@dunkelheit.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 20 Oct 2005 14:22:22 +0200
From: "Dave" <daveandniki@ntlworld.com>
Subject: ActivePerl 5.8.7 crashes
Message-Id: <43578c18$0$27410$8fcfb975@news.wanadoo.fr>
The following program (I have removed all the functionality but retained the
problem), causes Perl to crash with a 'Free to wrong pool' error when fed
with a large XML file containing Unicode data. (but not with a minimal xml
unicode file).
Perl 5.8.6 on cygwin runs fine.
If I remove the binmode line it is OK.
It is the executable rather than the shell that causes the problem (as I
have fed the Activestate version from the cygwin shell and the cygwin perl
from the cmd shell to test this).
Does anyone know why?
use XML::Parser;
use strict;
use warnings;
binmode(STDIN, ":utf8") or die "Couldn't binmode STDIN";
my $parser = new XML::Parser(Handlers => {Start => sub {},
End => sub {},
Char => sub {}});
$parser->parse(*STDIN);
------------------------------
Date: Thu, 20 Oct 2005 08:04:45 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: getElementsByTagName, tag does not exist
Message-Id: <rJL5f.11566$ns3.959327@news20.bellglobal.com>
<robic0@yahoo.com> wrote in message
news:cmfel1pas2i6b65oadd4ub42u9dvmt6cf8@4ax.com...
> On Tue, 11 Oct 2005 23:11:25 -0700, robic0@yahoo.com wrote:
[ TOFU corrected ]
>>The alternative to DOM is SAX, widely used in modern code.
>>Its basically a simple event driven model, calling handlers
>>when the basic structured xml components are encountered. This
>>allows you to control going from xml to internal data structures
>>and/or back out to xml. Expat provides hooking handlers to most
>>of the current W3c constructs. These are just the basic ones.
>>Its up to you to extract the data into internal structures.
>>For that XML:Simple is a good tool. With Expat you can accumulate
>>nested data in a single string. Then Simple will create nested
>>Perl structures using tag names. Then you can Dumper it.
> You know, I'm gonna go one step further here and say:
> If you use nodes your some kind of a dumb ass. Not the
> modern thinking at all !!
Your logic has me convinced. Oh wait, there is no logic. You do realize that
you're just trying to create your own DOM tree by jumping through a bunch of
hoops, right? SAX will let you do that, but I don't see how what you're
suggesting would be an improvement over a regular DOM tree.
SAX has its uses (especially for large documents you don't want to read into
memory), but it's hardly a reason not to use DOM. If I need the whole
document in memory before beginning to process, SAX is a needlessly complex
way of doing that. If I just want to fire off events as I come across
elements, DOM is a needlessly complex way of doing that.
Picking one method over the other requires analyzing what your needs are.
Simplistic statements like sax for everything aren't helpful.
Matt
------------------------------
Date: Thu, 20 Oct 2005 11:08:20 GMT
From: Roedy Green <my_email_is_posted_on_my_website@munged.invalid>
Subject: Re: Microsoft Hatred FAQ
Message-Id: <d8uel1ldn28q45ka1mrb2ep26cvmmuv6pq@4ax.com>
On Wed, 19 Oct 2005 03:15:03 -0700, "David Schwartz"
<davids@webmaster.com> wrote or quoted :
> Did I say their obligation was to secure their shareholders as much
>profit as possible? I said their obligation was to their shareholders.
You are literally saying people work for a company have an obligation
to the shareholders. That is too obvious to be bothered with
announcing. The employees take the shareholder's money, so obviously
they have an obligation to produce something in return. When I read
your words, I think you really mean this is the prime or sole
obligation of an employee. I disagree with that. There are many
loyalties that compete.
Personally, the loyalty to the preservation of my planet is far above
loyalty to any company. For example, I would feel a moral obligation
to be a whistleblower of actions of a company that was destroying the
environment.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
------------------------------
Date: 20 Oct 2005 11:40:50 GMT
From: Robert Sedlacek <phaylon@dunkelheit.at>
Subject: Re: why the perl docs suck
Message-Id: <43578242$0$12674$9b4e6d93@newsread4.arcor-online.net>
Fred@fred.net <Fred@fred.net> wrote
> Imagine a world without rules.... it's not as ridiculous as it sounds.
> One of my favorite quotes is:
I'm sorry to inform you that Mr. Crowley meant someones individual higher
will, also personalized in the Holy Guardian Angel.
Love is the Law, Love under Will.
p
--
thou shallst fear ..
------------------------------
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 V10 Issue 8548
***************************************