forked from rcaputo/poe
/
Changes
1865 lines (1300 loc) · 66.8 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
$Id$
Revision history for POE
========================
Changes marked with "(!!!)" may break backward compatibility.
Changes marked with "(???)" are informational.
Version numbers have four fields: X.YYZZAA
X is the interface version, currently 0 as public interfaces gel.
YY is the major revision number.
ZZ is the minor revision number. It's 00 for public CPAN releases,
or nonzero for beta web site releases.
AA is a testing revision. It's usually 00, which means the tarball
is a public release. Nonzero versions are limited alpha level
releases (development snapshots) for specific testers.
[ Hey, Rocco, don't forget to assign a tag to the release after you
make dist on it! 0.0910 is ``v0_0910''! For example:
cvs tag -Rc v0_11 .
cvs tag -Rc v0_1009 .
]
,----- To Do (actual changes appear afterwards) -----
|
| _enqueue_alarm has already tested against the first and last items
| in the alarm queue by the time it gets to the small and large queue
| code. Does it need to compare against the whole list?
|
| Better alarms API. Roderick has threatened to do something.
|
| Why does samples/tk.perl leak memory, and, if it's my fault, how
| can I fix it?
|
| caller() calls in POE::Kernel report POE::Kernel lines. They
| should follow the call chain out to someone else's code. This
| will be slow.
|
| Write a Filter::HTTPD test. Which may involve writing a web
| server and client. Ow! Ow! Ow! PoCo::Client::HTTP would simplify
| things greatly...
|
| Samples, long term: Split them out and turn them into proper
| tutorials. They take up something like half the distribution!
|
| POE::NFA test.
|
| Benchmark index vs. rindex vs. regexp for finding line terminators.
| Use this to optimize Filter::Line.
|
| Real streams. Wheels are getting in the way for more serious
| applications.
|
| How can startup be sped up without going into C? Macros and stuff
| are nice, but they're killing startup time. What can be done
| without losing POE's "pure Perl" aspect?
|
`----------------------------------------------------
0.1110 2000.11.11 (!!!)
-----------------------
Added ARG1 to Wheel::ListenAccept's AcceptState parameter. This
contains the accept() call's return address.
Cleaned up and tested the samples. They all should work with the
latest version of POE.
The InterMezzo team contributed &POE::Kernel::select_pause_read() and
&POE::Kernel::select_resume_read(). Added and documented them.
The InterMezzo team contributed &POE::Kernel::get_active_session() and
&POE::Session::get_heap(). Added and documented them.
(!!!) The InterMezzo team suggested replacing exists() parameter
checks with defined(). The change will make undefined parameters (in
the form C<Parameter => undef>) look like they were not passed. This
simplifies code in some cases while not complicating it anywhere. In
most cases, this change should not alter the way existing code
behaves. It's sweeping enough, however, than I've marked it
compatibility-breaking just in case. Modules affected: FollowTail.pm;
ListenAccept.pm; ReadWrite.pm; SocketFactory.pm; Block.pm; Line.pm;
SysRW.pm. Note, however, than undefined InputLiteral in the Line
filter has a special meaning, so its exists() check was retained.
0.1109 2000.10.30
-----------------
Revised large chunks of POE::Preprocessor. Added conditional code
inclusion on the assumption that not performing macro substitution and
compiling code we don't use will be faster. This could well be false.
Added DEBUG_INVOKE and DEBUG_DEFINE to POE::Preprocessor, mainly so
the defining and invoking output doesn't clutter up DEBUG'S.
Revised POE::Kernel to use conditional code inclusion instead of
optimized-away optrees.
Revised t/05_macros.t to test conditional code inclusion.
Revised t/01_sessions.t to time out in coverage tests. Previously,
the tracing library would cause some subtle hang.
Revised the coverage testing tools to cope with conditional code
inclusion. Conditional code inclusion inside macros changes line
numbers no matter what I do, so the coverage report has to cope.
POE::Preprocessor didn't allow consts which weren't all-caps; now it
does. Also permit consts which aren't all letters. This allows a
crude sort of operator overloading.
Lifted most of Ilya Zakharevich's nifty Text::Trie to rewrite the
regexp optimizer in POE::Preprocessor.
Added POE::NFA, the nondeterministic finite automaton flavor of
POE::Session.
Tweaked test t/00_coverage.t to load each module in a separate
package. POE::NFA and POE::Session both export constants which
overlap.
Tweaked POE.pm to load Session by default. If NFA is specified, it
overrides Session. This should prevent accidentally loading Session
and NFA at once.
0.1108 2000.10.06
-----------------
Added Gtk support. Added t/21_gtk.t to test it.
(!!!) Broke Tk backward compatibility. POE supports different X
toolkits now, so it's silly to export ${"poe_$toolkit_main_window"}
for each. Renamed $poe_tk_main_window to $poe_main_window. Both Tk
and Gtk use it for the top-level/main window.
(!!!) Broke Tk backward compatibility again. POE supports different X
toolkits now, so it's silly to have a separate DESTROY signal for
each. Renamed TKDESTROY to UIDESTROY, and both Gtk and Tk use it.
Updated POE::Kernel docs.
0.1107 2000.10.04
-----------------
Document POE::Preprocessor's debugging constants, and allow them to be
overridden by defining them before POE::Preprocessor is used. This is
the same scheme that POE::Kernel's TRACE/ASSERT constants use.
Philip Gwyn thinks SIGCHLD was broken after 0.1104, so I've
restructured test programs 11 and 12 (POE and Event signal watchers).
Child process death is synchronized by the parent program (read:
SIGINT) instead of with sleep and Time::HiRes. They ought to die
closer together now.
0.1106 2000.09.01
-----------------
(!!!) Wheels always return object references now, even if they fail.
This may break programs that rely on some wheels' (most notably
SocketFactory's) new() methods returning undef when they cannot be
created successfully. This change was necessary to complete the
wheels-have-unique-ids change also in this version.
Wheels have unique IDs now. These IDs are included in every event
generated by a wheel, and they're accessible with the $wheel->ID()
method. It's now possible to determine which wheel generated which
event, which is useful if you have several wheels in the same session.
Many of the tests determined whether a wheel succeeded by its
constructor's return value. Revised them to fail if error events are
thrown.
0.1105 2000.08.24
-----------------
Updated README and POE's main manpage to point to the new mailing list
and web addresses.
Added a note about using the same versions of the same modules when
passing messages across different machines. Differences in modules or
versions can introduce some pretty subtle and nasty problems.
t/19_filterchange.t wouldn't work without Storable. Made it use
lib/MyOtherFreezer instead, so at least filter changing can be tested.
Bypass alarm(3) calls in lib/TestPipe.pm when trying to create
non-blocking pipes on MSWin32 systems.
Bypass DISPLAY environment variable checking in t/06_tk.t on MSWin32
systems. Perl/Tk doesn't seem to use DISPLAY there.
Made the tests' missing module messages more comprehensible.
Hopefully they'll have a lesser tendency to be mistaken for test
failures now.
Skipped UNIX domain sockets tests on MSWin32, which seems not to
support them.
Skipped signals tests on MSWin32, which doesn't seem to do signals.
TRACE_PROFILE output was mixed across STDERR and STDOUT. Put it all
on STDERR. evilPetey's got a good evilEye.
0.1104 2000.08.12
-----------------
Jaxdahl donated some shell time on his Win32 machine, allowing me to
figure out why POE was failing miserably with ActiveState's Perl port.
I made a bad assumption about source code newlines in
POE::Preprocessor.
Wheel::ListenAccept wasn't as lagged behind Wheel::SocketFactory as I
had thought. It required only minor changes to be brought up to date.
Skip some tests on Win32 because pipes can't be made non-blocking
there.
Brian Buchanan found and fixed a problem where SIGCHLD would not be
delivered when child processes exited by signal.
Added t/20_accept.t to test Wheel::ListenAccept.
Wrote lib/TestPipe.pm. This file tries to make a portable two-way
pipe. It uses a pair of pipe(2)s, or a plain INET socket if that
fails. This would make a great basis for an open3 thingy.
0.1103 2000.08.06
-----------------
Addi provided an algorithm for automatically detecting incoming
newlines in Filter::Line, and we both implemented it in parallel. The
best bits of both implementations are in POE::Filter::Line; see the
documentation for how to enable this nifty feature.
Addi caught on that long lines in samples/filterchange.perl were
wrapped by some misguided program. I reformatted the source so that
no lines are longer than 79 columns, just in case.
Made Wheel::ReadWrite carp about unknown parameters.
Added t/19_filterchange.t to test filter changing between every filter
that supports the get_pending() method. This test does its damnedest
to make some sort of pipe, trying socketpair and pipe calls before
failing. The code here could be a good basis for an open3 thing.
Tweaked the timing on t/11_signals_poe.t and t/12_signals_ev.t. These
tests now take about a minute and a half each everywhere, but the
results are more consistent across the spectrum of system speeds.
Added a message to t/06_tk.t to let anyone paying attention to the
test terminal know that a Tk window will pop up.
0.1102 2000.07.27
-----------------
Dennis Taylor supplied a Filter::Line patch that allows new newline
regexps. Bits of his patch relied on perl 5.005 or newer, so I wrote
around them. I also added the ability to specify incoming newlines as
literal strings, and it's now also possible to change the outbound
line terminator.
Added t/18_filter_line.t to test the now multi-faceted Filter::Line.
Tweaked the way t/06_tk.t skips so it doesn't look like my problem.
0.1101 2000.07.26
-----------------
This public release also contains the changes found in private testing
releases 0.110001 and 0.110002. Please see the changes in those
revisions as well.
A peculiar sort of memory corruption is occurring when POE 0.11 is
running under perl 5.6.0 (not perl-current, it seems) and Perl/Tk
800.021 (and 800.022). One specific string encounters a substitution,
in the same place but at random times. It seems that its "->"
substring is being changed into "-<", which causes samples/tk.perl to
fail quietly. Changing the substring to "-!>" `fixes' the problem, as
does removing the arrow altogether (which is what I eventually did).
I don't know why it's happening, and close scrutiny seems to make the
problem go away.
0.110002 2000.07.23
-------------------
This is a private testing release for a single person.
Tweak samples/tk.perl. Add labels to the different fields, add a
counter to run in the background when the window loses its focus, and
add a _default state to catch misnamed events. This is part of a bug
hunt in Wheel::FollowTail.
It seems to be a Bad Thing to set a Tk callback from a Tk callback of
the same type. I had discovered this early on with the Tk afterIdle()
callback that drives POE's FIFO queue, but the problem didn't occur
with the Tk after() callback that drives POE's alarms. Well, the
deadlock does occur for alarms, but it only happens when they're
scheduled for sooner than the current callback returns. I've changed
the Tk after() callback to reset itself from a Tk afterIdle()
callback, making this a two-phase sort of flip-flop thing like the
afterIdle() callback. (The afterIdle() callback resets itself from an
after() callback scheduled for 0us hence.)
Added debugging and coverage code to the MANIFEST: lib/Devel/Null.pm;
lib/Devel/Trace.pm; lib/coverage.perl.
0.110001 2000.07.21
-------------------
This is a private testing release for a single person.
Supply a Tk::Event::IO::SEEK in Wheel::FollowTail, since FollowTail
needs sysseek, which calls SEEK, and Tk::Event::IO doesn't include
one. Use sysseek in FollowTail to clear the eof indicator, but wrap
it in a block eval for times when one oughtn't be seeking.
sysseek(2) can seek back past the start of a file on some systems. Do
some extra gyrations in Wheel::FollowTail to prevent its SeekBack
parameter (or the default) from seeking back farther than the file's
start.
Added samples/neural-net.perl. Crysflame was lamenting over perl's
threads, and he needed parallel computing for a neural network he
wanted to write, so I wrote this prototype/tutorial for him. Not
knowing much about neural networks, it's pretty useless. It does show
off POE for pseudo-concurrency, though.
POE::Filter::HTTPD relied on HTTP::Response's as_string() method
returning something that could be shipped to a web browser as-is.
This was wrong: as_string() returned the entire HTTP response okay,
but the headers were generated with "\n" newlines instead of network
ones ("\x0D\x0A"). The result is that pickier browsers such as MSIE
and Lynx were displaying the HTTP headers as part of the content.
Bleah! Stole HTTP::Response's as_string() method, and fixed the code
up a bit.
Addi pointed out that a "fixme" (comments indicating a bug) in
samples/httpd.perl was fixed in 0.100201, so I removed it.
0.11 2000.07.12
---------------
A-mused found samples/thrash.perl failing on Redhat 6.0. The chain of
events goes something like this: (1) select says a non-blocking
connecting socket's ready for writing. (2) getsockopt(SO_ERROR)
reports that the socket is fine. (3) getpeername returns undef, and
$! becomes ENOTCONN. (4) unpack_sockaddr_in predictably fails.
... The same test passes on other machines, including Solaris 7, OS/2,
and FreeBSD 4.0-STABLE. I patched SocketFactory to report an error if
getpeername fails, and this cleared up the failure's symptom.
0.1011 2000.06.29
-----------------
Added t/17_filter_ref.t: 80 tests for Filter::Reference.
Removed an errant diagnostic from t/11_signals_poe.t; thanks a-mused.
The garbage collection tidy in 0.1008 had broken GC in certain
instances. The problem didn't show up anywhere but the queue.perl
sample, as far as I can tell. I think it's corrected now.
69% test coverage now. Check the README for stats.
0.1010 2000.06.20
-----------------
Wheel::FollowTail was working on its filehandles before setting them
non-blocking. Rearranged a couple lines of code to turn off blocking
before working with filehandles.
Tweaked the signals tests to wait longer for child processes to
terminate.
(!!!) I have nothing good to say about POE::Kernel's experimental
fork() method, so I will refrain from saying anything more than "It
has been removed." Please use plain fork(2).
(!!!) Added variable-length block support to Filter::Block. In this
mode, each item will be received the same as it was put(). This
borrows heavily from Filter::Reference which did it first. Oh, the
"!!!" is because Filter::Block's new() method doesn't default to
512-byte blocks anymore; an unspecified/undefined BlockSize enables
variable-length blocks, and a <1 BlockSize is an error.
Added a new test, t/15_filter_block.t to exercise the block filter.
Made Filter::Stream's put() method copy the chunks it's given rather
than pass them on by reference. This seems to be the safest thing to
do, but I'm not sure why I think so.
Added a new test, t/16_filter_stream.t to exercise the stream filter.
0.1009 2000.06.17
-----------------
(!!!) Documented in the changes for 0.1006 that $kernel->fork() was
broken.
Added Filter::Block to 00_coverage.t.
Added t/14_wheels_ft.t to test Wheel::FollowTail and Filter::Block.
FollowTail would go into an infinite loop while discarding initial
data. It wasn't checking drivers' get() methods' return values for
emptiness.
Driver::SysRW's get() method wasn't checking sysread's return value
for definedness.
Dieter Pearcey sent in a patch to FollowTail that lets programs
specify how far to seek back into a file before tailing it. When
SeekBack is used, everything up to the current end of file is
returned. These changes look okay, but they are not yet tested.
samples/followtail.perl still works, which is encouraging.
Dieter Pearcey also submitted Filter::Block, a fixed-length block
filter. This filter is not yet tested.
Translated Filter::Block's internal object into an anonymous list
reference. This will be more efficient, and I understand Dieter's
application may need it.
Windows compatibility seems to have gone all to heck in this version.
I'm not sure why, either, since I didn't do anything specific to
Windows but enhance its support.
Tweaked POE::Preprocessor to do something approaching right things
when debugging or tracing are turned on.
Optimized away a function in lib/TestSetup.pm.
Added t/13_wheels_udp.t and a corresponding MANIFEST entry.
Jonathan Feinber graciously loaned a Windows NT shell for testing and
development, opening whole new worlds of pain to me. :)
Tweaked the Win32 FIONBIO ioctls for non-blocking filehandles in
POE::Kernel and POE::Wheel::SocketFactory.
Added t/00_coverage.t to the MANIFEST. Whoops!
Added a crucial newline between 1; and __END__ in POE::Session.
Jonathan Feinber reported that ActiveState 5.6.0, build 613 doesn't
implement F_GETFL and F_SETFL. These constants aren't used for the
MSWin32 code, so now POE::Kernel and POE::Wheel::SocketFactory define
dummies for them.
0.1008 2000.06.14
-----------------
Tidied Session garbage collection tests.
Stopped setting $SIG{CH?LD} handlers when using Event.
The wheels tests were failing on DOSISH systems because the 1-byte
blocksize generated fake newlines. CR and LF coming in separately and
being interpreted as two newlines. Increased the BlockSize so this
won't happen.
Prevented the TKDESTROY signal from being fired if POE finishes before
Tk does. There's nothing to receive the signal!
Enhanced the "# line" directives that POE::Preprocessor injects into
macros. Now they're added when macros are used; this enables them to
include not only the macro name and line number but also the source
file and line number. For example: "Use of uninitialized value in
concatenation (.) at macro ssid (line 1) invoked from POE/Kernel.pm
line 1007." This doesn't nest, though.
Added a postback test to t/06_tk.t, discovering in the process that
the postback's blessed coderefs were part of POE::Session::postback's
code tree and thus not being DESTROYed when Tk::After was done with
them. I thought this might be a Perl bug and posted to perl5-porters
about it. Wolfgang Laun and Nick Ing-Simmons sent back enlightening
replies, and the game once again is afoot!
0.1007 2000.06.07
-----------------
Version 0.1006 was put on the web site, but ignatz found a bug in
SocketFactory that prevented t/09_wheels_unix.t from passing on
Linux machines. a-mused confirmed that the problem appears on Linux
but not Solaris. My own FreeBSD system was not affected. The bug
relates to calling getpeername on UNIX domain sockets. The resulting
unpack_sockaddr_un call would fail when getpeername returned an
undefined (not undef) value. The failing code is now wrapped in
eval, and it will gracefully recover from this sort of error.
Many thanks to ignatz and a-mused for quick testing, and to Fletch
for verifying that 0.1007 works on RedHat 6.2 x86!
0.1006 2000.06.07
-----------------
This version was placed on the web site, but a-mused and ignatz found
bugs SocketFactory right away. As a result, I held off announcing it
to the mailing list until a fix could be included.
Added t/12_signals_ev.t to test Event's SIGCHLD handler. It's pretty
much the same as t/11_signals_poe.t, but using Event or skipping itself
if Event is not available.
Increased the time that t/11_signals_poe.t waits to reap children. On
memory- and cpu-challenged systems, swap times could delay process
exits, causing false failures when the test program timed out.
Fimmtiu discovered why it's bad to post _start yourself, and I decided
it would be best for everyone to document it.
Philip Gwyn patched POE::Kernel to unwind SIGCHLD reaping loops. This
greatly reduces the amount of work done in POE's stock $SIG{CHLD}
handlers which in turn reduces the probability that SIGCHLD will
segfault Perl. Note, however, that the chance of this occurring will
remain nonzero as long as Perl is not signal safe. (Also, the patch
wouldn't apply and I sort of redid the code as I spliced it into the
the Kernel. I'll know when Philip tests it whether I've broken his
algorithm.)
(!!!) $kernel->fork() was broken during the SIGCHLD revision.
Tweaked postbacks. Older Perl versions were not doing the right
things with \@_ in POE::Session's postback() method. Replaced it
with [ @_ ] instead.
Expanded t/02_alarms.t to test the big-queue binary search and insert
code. Previous tests didn't expand the alarm queue past the maximum
threshhold for linear insertion.
Macro-ized some of the redundant bits between the Tk and Event code.
Normalized the names of some functions; added leading underscores here
and there.
Added test coverage information to the README.
Added t/09_wheels_unix.t to test Wheel::ReadWrite and
Wheel::SocketFactory against UNIX domain sockets. This will fail
terribly wherever UNIX sockets aren't supported; I should skip it on
platforms where people complain about its failure.
Added t/10_wheels_tcp.t to test Wheel::ReadWrite and
Wheel::SocketFactory against INET/TCP sockets.
Added t/11_signals_poe.t to test POE's stock signal handlers. These
are Perl's own signal handlers, and all the caveats apply.
Added Exporter; TestSetup exports its functions now. TestSetup use
syntax changed, so I added &test_setup to set things up instead of
&import.
Added &ok, ¬_ok and &results to buffer and report on the results of
tests that occur in indeterminate orders.
Added TestSetup functions stderr_pause() and stderr_resume() to turn
STDERR off and back on when testing code known to show diagsonstics.
Added ID resolution tests to t/03_aliases.t.
Added the kernel's ID to its ID-to-session lookup table, so that
$kernel->ID_id_to_session($kernel->ID) would return $kernel. It's
silly but complete now.
Added t/08_errors.t to test error conditions, something that the other
tests never covered.
Added lib/Devel/Trace.pm. This is a custom debugging module (used
with -d:Trace) that collects information about runnable Perl
statements and the ones actually called. It's only used for reporting
on test coverage during development and isn't installed.
Added lib/coverage.perl. This program runs t/*.t with -d:Trace to
collect coverage statistics; then it gathers up the results and writes
a report.
Added t/00_coverage.t to load every "released" module so that the test
coverage report can learn the set of all testable modules.
Philip Gwyn pointed out that waitpid() returns 0 on some platforms to
indicate outstanding child processes that haven't yet exited. I was
treating 0 as a valid PID. The waitpid() return value checks are
fixed now.
Fletch found all sorts of badness in POE::Kernel's fork() method and
related polling loop. It boiled down to bad assumptions about
$SIG{CHLD} = 'IGNORE' and a stupid use of keys() without scalar().
(!!!) Revised the Changes for 0.0906, dated 2000.02.20 to note an
interface change in Wheel::ReadWrite's put() method. This Changes
change isn't a compatibility issue, but the original change is.
POE::Preprocessor adds "# line" directives so that macro expansions
don't break line numbers in warnings and errors. Unfortunately, this
badly breaks -d modules, such as the debugger and various profilers.
So now POE::Preprocessor omits "# line" directives when -d is used.
This'll let you see everything being run, at the expense of correct
line numbers.
Added a rudimentary signals test to t/01_sessions.t, which uses POE's
own event loop.
Added a rudimentary signals test to t/07_event.t, which uses Event's
event loop.
Will not add a signals test to t/06_tk.t. Tk does not have its own
signal watchers, so this would only test POE's.
Made minor revisions to the tiny and relatively new POE::Preprocessor
documentation.
0.1005 2000.05.23
-----------------
I forgot to document POE::Session's constructors. Oops! Now thery
are documented.
Rewrote the POE::Wheel POD.
Found the Perl symbols that weren't being exported for OS/2 and AIX
(and maybe Windows). Fixed makedef.pl to export them, and now Event
builds and tests ok. Sweet! Added initial Event support to
POE::Kernel and removed the Event caveats throughout POE's
documentation.
Added t/06_tk.t to test Tk support. This tests file, idle and after
events. It does nothing with signals, which Tk doesn't handle, and
nothing heavy duty. Tk support is functional but still experimental.
a-mused pointed out that samples/tk.perl wasn't stopping its alarm
counters when it ought to. This turned out to be a problem with
POE::Kernel's delay() method not clearing timed events. Fixed!
Turned the idle kernel check into a macro, and used it not only from
POE::Kernel's run() method but also from the Tk and Event callbacks.
Before this, IDLE would never be posted when using Tk or Event.
Enhanced TestSetup (used privately by the t/*.t tests) to skip entire
test files when given 0 for the number of tests.
The Tk version of POE::Kernel's run() method would never exit, even
when there were no more sessions. This has been fixed, after much
guts wrangling.
Added t/07_event.t to test Event support. While this is a proper test
of Event's timer, io and idle events, it doesn't cover signals or any
heavy duty tasks. Thus the Event support is functional but still
experimental.
0.1004 2000.05.21
-----------------
Rewrote the POE, POE::Kernel and POE::Session PODs. Documented Tk
support. Documented Event support, but it's not in yet.
t/04_select.t assumed that two-argument syswrite was legal, but it
isn't back in 5.005_02. Added a length() call to make it legal on
older perls. Thanks again, a-mused!
alarm_add() would enqueue an alarm for an undefined state. Fixed it
to ignore such requests.
The call() method did not reliably set $! to zero on success. Now it
does.
(!!!) Added parameter checking and return values to the timed event
functions: alarm, alarm_add, delay, and delay_add.
(!!!) alarm() and alarm_add() no longer clip past times to time(2).
Instead, events posted for the past will be entered into the
appropriate places in POE's time-ordered alarm/delay queue. The
obvious results will occur.
(!!!) Changed POE::Kernel::alias_* to return 0 on success or an error
code on failure. They no longer touch $!.
(!!!) Changed POE::Kernel::state to return 0 on success or an error
code on failure. It no longer touches $!.
(!!!) Changed POE::Kernel::refcount_(in|de)crement to return the new
reference count on success or undef on failure.
0.1003 2000.05.12
-----------------
Addi found a list of Win32 error codes, including the elusive
EINPROGRESS. I changed the dummy value to the correct one in
POE::Kernel and POE::Wheel::SocketFactory. Now SocketFactory works on
Win32, in perl 5.005_03. Mileage may vary as MSWin32 perl evolves.
I finally found a system where Perl/Tk builds. This isn't a comment
on Perl/Tk (which is huge to build; 77 megs!) as much as it is on
the state of its OS/2 port. The samples/tk.perl example program is
working!
Documentation is still lagging behind development at the moment, but
I should have more time to focus on it now that the Tk support is in
open beta on the 'web site.
Since 0.100201 was a private beta for Win32 support testing, and maybe
two people at most have seen it, you should give its section of the
Changes a look.
0.100201 2000.05.10
-------------------
This is a private release, 0.10_02_01, for Addi. He's been having
trouble with POE and POE::Component::IRC on Win32.
Found a bug in Wheel::ReadWrite that prevented separate InputHandle
and OutputHandle from working correctly.
Finished initial Tk support. Posted/yielded events, alarms/delays,
and selects are now handled through the Tk event loop, if Tk is used
before POE.
Philip Gwyn has noticed POE leaving zombie processes behind. This was
traced back to naive signal handlers for $SIG{CH?LD} and the
$kernel->fork() "safe" polling code. Both handlers have been changed
to use waitpid() and loop until all children have been reaped.
Deleted $POE::Kernel::{signal} before defining &POE::Kernel::signal.
As of 5.6.0, perl warns of a redefined function, even though it's
supposed to be called as a POE::Kernel method. Grrr.
Addi pointed out that the PREREQ_PM line for Filter was incorrect. It
should be requiring Filter::Util::Call 1.04. Fixed!
Addi also noted that the Perl debugger sets $SIG{BUS} under MSWin32.
MSWin32 doesn't support a $SIG{BUS}, so POE dies when it grovels
%SIG's keys to register handlers. Bleah! POE::Kernel now avoids
$SIG{BUS} on MSWin32 systems.
Fixed a bug that Addi found in Wheel::SocketFactory. SocketFactory
needed code to manage temporary states. These states are created from
coderefs which are passed to the SocketFactory constructor instead of
state names. Anyway, to do this, SocketFactory instances needed to
register and remove success and failure states from sessions that own
them. Unfortunately, they deregistered states even when they were
passed by name, removing the owning session's states without its prior
consent or knowledge! Even more troublesome, if the event is a result
of constructor failure, then the SocketFactory instance dies (and
deregisters the FailureState) before the failure event can be
delivered. The upshot is: Bind errors in samples/httpd.perl never
displayed an error message.
Randal Schwartz wanted examples of programs that used job queues, so I
banged out samples/queue.perl. Cleaning it up, documenting it, and
including it in the POE distribution took longer than writing it. :/
Updated the README to point to a new CPAN Testers location.
Added samples/tk.perl, in case anyone wants to try the Tk code in
POE::Kernel and POE::Session.
0.1002 2000.04.20
-----------------
Added t/05_macros.t to test POE::Preprocessor.
Split the event queue into a FIFO for plain state transitions and a
time-ordered priority queue for alarms. This puts POE one step closer
to coexistence with Tk and Event.
Tony Cook found and patched brokenness while defining mapped package
states with POE::Session->create.
Optimized POE::Kernel::run to reclaim the speed that was lost during
the queue split. Time::HiRes' presence is required to enable a big
part of the reclaimed speed, but POE will do its best without it. See
the FIFO_DISPATCH_TIME constant's comments for notes on tweaking
0.1002's performance higher than 0.1001's. :)
0.1001 2000.04.17
-----------------
MJD pointed out (heh) that references have string/number magic like
$!. That is, they return just a number in numeric context, and in
fact they're are stored as numbers internally, so string context
wastes time making them look pretty in the first place.
Added POE::Preprocessor, a source filter for macro preprocessing,
constants, and enumerations.
Overhauled POE::Kernel's source. Commented just about everything.
Broke apart some monolithic subroutines. Replaced redundant code and
smaller internal subs with inline POE::Preprocessor macros.
Overhauled POE::Kernel's manpage SYNOPSIS. Made the formatting a
little neater. Made the parameter names a little clearer. Explained
what's going on in greater detail.
(!!!) Removed the silly and long-depreciated $kernel->session_create
method.
(!!!) Split the debugging constants between assertions which die
noisily and traces that show ongoing activity. Renamed them to
ASSERT_* and TRACE_* to reflect their function.
Added ASSERT_DEFAULT and TRACE_DEFAULT to change the defaults for
ASSERT_* and TRACE_*. These let programs turn everything on with one
or two statements.
Set ASSERT_DEFAULT to true in t/*.t so the tests are more thorough.
Documented the ASSERT_* and TRACE_* constants.
Added t/03_aliases.t to test session aliases.
Added t/04_selects.t to test filehandle watchers.
Overhauled POE::Session's source. Commented just about everything,
including the strange but true POE::Session->new() constructor.
Replaced redundant code and smaller internal subs with inline
POE::Preprocessor macros.
Overhauled POE::Session's manpage SYNOPSIS. Made the formatting a
little neater. Made the parameters a little clearer. Explained
what's going on in greater detail.
Optimized away the recursion for redirecting unknown states to
_default in POE::Session::_invoke_state. Programs that rely on
_default should run a bit faster without the extra function call.
Removed poing.perl from the samples directory. It had evolved into a
separate program in its own right. It's now available from the
author's page at <http://www.newts.org/~troc/poe-grams.html>.
Documented $kernel->fork() as experimental.
Added experimental postback features to POE::Session.
Un-depreciated $kernel->ID_session_to_id. While
$kernel->alias_resolve does the same thing, ID_session_to_id can be
faster when code expects to be working with session IDs.
0.10 2000.03.23
---------------
Added POE::Component to the MANIFEST. Whoops!
Everything from 0.0901 through 0.0910 is included in this public
CPAN release. People using 0.09 should read through to see
what has changed, paying extra attention to the bits marked
incompatible.
0.0910 2000.03.09
-----------------
POE now keeps track of the file and line number where an event was
generated. $session->option( default => 1 ) will report the line and
file, so you know where strange events came from.
(!!!) Add session ID to reference lookup from alias_resolve.
ID_id_to_session is depreciated. The incompatibility here is that
session IDs take precedence over aliases, so sessions shouldn't be
aliased to numbers.
(!!!) Depreciated ID_session_to_id, since alias_resolve does the same
thing. No warnings have been set yet, to give developers time to
react to the change. [This depreciation is rescinded in 0.1001.]
Tweaked the Win32 support to eliminate some redefined sub warnings.
0.0909 2000.03.10
-----------------
Removing closures in 0.0907 re-broke code that expect $wheel->event()
to take immediate effect. Changed the wheels to use references
instead of direct event names, so that anonymous coderefs could have
closures whose values can be changed from outside.
0.0908 2000.03.09
-----------------
Added logging to samples/poing.perl. Now it records up and down times
to a tab-delimited file.
Added POE::Kernel::select_(pause|resume)_write, to pause and resume a
write select without bothering to maintain POE::Kernel's reference
counts on the filehandle. Made POE::Wheel::ReadWrite use this instead
of POE::Kernel::select_write, which should improve performance a
little bit.
POE::Kernel::call was setting $! to 0 when it oughtn't. $! now
properly reflects the status of POE::Kernel::call.
Removed the place-holder test that suggested people try the samples
directory.
Added t/01_sessions.t to test sessions (new and inline create) and
basic events (post, yield and call);
Added t/02_alarms.t to test delayed events (alarm, delay, alarm_add
and delay_add).
Added POE::Kernel::(alarm|delay)_add to post additional alarms to a
particular state. Unlike POE::Kernel::(alarm|delay), these don't
clear existing alarms for the destination state.
Kicked off the POE::Component heirarchy with
POE::Component::Server::TCP (POE::Component is frequently abbreviated
as P::C in conversation but not in code).
0.0907 2000.03.02
-----------------
Revised Wheel::SocketFactory's internal states to eliminate closures
keeping instances from self-destructing at proper times. This would
keep socket factories alive after their last outside references were
removed.
Updated documentation for POE::Kernel::alarm()
0.0906 2000.02.20
-----------------
(!!!) Revised Wheel::ReadWrite->put() to return true if the high
watermark is reached; false if it hasn't been. ReadWrite->put() may
return true without a corresponding high or low watermark event.
Changed samples/watermarks.perl to use ReadWrite->put()'s return
value, as well as the high and low mark states. Commented the program
while I was in it.
Adding the water mark code reintroduced the closure bug that was fixed
in version 0.0804. Now it is fixed. Yet again.
Changed how DEB_* are defined in POE::Kernel. It's now possible to
override the debugging constants before the first POE::Kernel use.
This lets programs have access to POE::Kernel's debugging code without
requiring programmers to find Kernel.pm and edit it.
Fixed POE::Session's debugging constant to work like POE::Kernel's.
Documented POE::Kernel and POE::Session debugging flags in the
corresponding manpages.
0.0905 2000.02.20
-----------------
Changed Wheel::ReadWrite's baaaaad $self to be a listref instead of a
hashref. It should run marginally faster without having to look
things up in a hash all the time.
Added statistics accessors to Driver::SysRW (it's the only one so
far), and added corresponding accesors to Wheel::ReadWrite.
Added HighState and LowState to Wheel::ReadWrite->event, so these
states can be redefined on the fly.
Documented Wheel::ReadWrite->set_(high|low)_mark; they weren't
documented up to 0.0904.
Expanded samples/poing.perl to accept different forms of host lines in
.rc files. Now accepts "host ip_address" or "host hostname" or "host
ip_address alias". It will look up the missing information when the
first two formats are used; it can totally bypass looking up names or
addresses when the last format is used. And aliases can be more
meaningful than host names.
EINPROGRESS isn't provided by ActiveState's POSIX module. It also
seems to be meaningless on MSWin32 systems. Since it's pretty
important for non-blocking connect() otherwise, I added a dummy
constant for it when POE is running on MSWin32 platforms. This