I don't think this code is Windows friendly for the following reasons: a) When you are installing you are probably using
perl makefile.pl nmake install nmake nmake test
And you go nutty when you run the 'nmake test'. If you look in the /t folder where you expanded the .gz file you will find various test files with the .t extension. Inside of the buildxml.t file is where your nmake test is hanging up, particularly on line 81:
my $sid = $stream->OpenFile("t/test.xml"); my %status; while( %status = $stream->Process()) ...
Note: I had to change the path on Windows to "..\\t\\test.xml" to even get past this step. More debugging leads me to the infinite loop that is caused by trying to use IO::Select on a filehandle in windows (see line 1221+ in Stream.pm):
my $buff = ""; while($self->{SIDS}->{newconnection}->{status} == 0) { $self->debug(5,"OpenFile: can_read(",join(",",$self->{SIDS}->{ +newconnection}->{select}->can_read(0)),")"); if ($self->{SIDS}->{newconnection}->{select}->can_read(0)) ...
The can_read(0) function returns nothing and no error is generated. You can try this for yourself like this:
C:\Temp\XML-Stream-1.22\t>perl -e "use IO::Select; open(H, qq|c:\\temp +\\foo.cpp|) or die $!; my $n = new IO::Select(H); print $n->can_read( +0); close(H);"
I have tried all sorts of variations of the above using \*STDIN, etc. from the examples in the POD and always got the same result. It just doesn't appear to work on Windows. Bummer. The reality is that you will have to pay special attention to scripts/modules that were not built/tested on Windows because strange things might happen. For instance, last night I ran a script from one of merlyn's articles for creating your own mini CPAN. I started it at around 11:00 p.m. CST in an Emacs shell buffer so that I could look at output in the morning. When I awoke all of the CPAN modules were copied to my machine...and then immediately after they were all ERASED by the same script! The moral? Well, take your pick: MORAL #1) Don't expect everything to work on Windows and MORAL #2) Consider switching to Linux (I am actually leaning toward the latter myself).

Celebrate Intellectual Diversity


In reply to Re: XML Stream Freezing during test by InfiniteSilence
in thread XML Stream Freezing during test by eric256

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.