… | |
… | |
107 | |
107 | |
108 | =item Documentation Quality |
108 | =item Documentation Quality |
109 | |
109 | |
110 | At the time of this writing, POE was in its tenth year. Still, its |
110 | At the time of this writing, POE was in its tenth year. Still, its |
111 | documentation is extremely lacking, making it impossible to implement |
111 | documentation is extremely lacking, making it impossible to implement |
112 | stuff as trivial as AnyEvent watchers without havign to resort to |
112 | stuff as trivial as AnyEvent watchers without having to resort to |
113 | undocumented behaviour or features. |
113 | undocumented behaviour or features. |
114 | |
114 | |
115 | For example, the POE::Kernel manpage has nice occurances of the word TODO |
115 | For example, the POE::Kernel manpage has nice occurances of the word TODO |
116 | with an explanation of whats missing. Some other gems: |
116 | with an explanation of whats missing. In general, the POE manpages are |
|
|
117 | littered with comments like "section not yet written". |
|
|
118 | |
|
|
119 | Some other gems: |
117 | |
120 | |
118 | This allows many object methods to also be package methods. |
121 | This allows many object methods to also be package methods. |
119 | |
122 | |
120 | This is nice, but since it doesn't document I<which> methods these are, |
123 | This is nice, but since it doesn't document I<which> methods these are, |
121 | this is utterly useless information. |
124 | this is utterly useless information. |
122 | |
125 | |
123 | Terminal signals will kill sessions if they are not handled by a |
126 | Terminal signals will kill sessions if they are not handled by a |
124 | "sig_handled"() call. The OS signals that usually kill or dump a |
127 | "sig_handled"() call. The OS signals that usually kill or dump a |
125 | process are con‐ sidered terminal in POE, but they never trigger a |
128 | process are considered terminal in POE, but they never trigger a |
126 | coredump. These are: HUP, INT, QUIT and TERM. |
129 | coredump. These are: HUP, INT, QUIT and TERM. |
127 | |
130 | |
128 | Although AnyEvent calls sig_handled, removing it has no apparent effects |
131 | Although AnyEvent calls C<sig_handled>, removing it has no apparent |
129 | on POE handling SIGINT. |
132 | effects on POE handling SIGINT. |
130 | |
133 | |
131 | Furthermore, since the Kernel keeps track of everything sessions do, it |
134 | Furthermore, since the Kernel keeps track of everything sessions do, it |
132 | knows when a session has run out of tasks to perform. |
135 | knows when a session has run out of tasks to perform. |
133 | |
136 | |
134 | This is impossible - how does the kernel now that a session is no longer |
137 | This is impossible - how does the kernel now that a session is no longer |
135 | watching for some (external) event (e.g. by some other session)? It |
138 | watching for some (external) event (e.g. by some other session)? It |
136 | cannot, and therefore this is wrong. |
139 | cannot, and therefore this is wrong - but you would be hard pressed to |
|
|
140 | find out how to work around this and tell the kernel manually about such |
|
|
141 | events. |
137 | |
142 | |
138 | It gets worse, though - the notion of "task" or "resource", although used |
143 | It gets worse, though - the notion of "task" or "resource", although used |
139 | throughout the documentation, is not defined in a usable way. For example, |
144 | throughout the documentation, is not defined in a usable way. For example, |
140 | waiting for a timeout is considered to be a task, waiting for a signal is |
145 | waiting for a timeout is considered to be a task, waiting for a signal is |
|
|
146 | not (a session that only waits for a signal is considered finished and |
141 | not. The user is left guessing when waiting for an event counts as task |
147 | gets removed). The user is left guessing when waiting for an event counts |
142 | and when not. |
148 | as task and when not. |
143 | |
149 | |
144 | One could go on endlessly - ten years, no usable docs. |
150 | One could go on endlessly - ten years, no usable documentation. |
145 | |
151 | |
146 | It is likely that differences between documentation, or the one or two |
152 | It is likely that differences between documentation, or the one or two |
147 | things I had to guess, cause unanticipated problems with the backend. |
153 | things I had to guess, cause unanticipated problems with this adaptor. |
148 | |
154 | |
149 | =item Bad API |
155 | =item Bad API |
150 | |
156 | |
151 | The POE API is extremely inconsistent - sometimes you have to pass a |
157 | The POE API is extremely inconsistent - sometimes you have to pass a |
152 | session argument, sometimes it gets ignored, sometimes a session-specific |
158 | session argument, sometimes it gets ignored, sometimes a session-specific |
153 | method must not use a session argument. |
159 | method must not use a session argument. |
154 | |
160 | |
|
|
161 | Error handling is sub-standard as well: even for programming mistakes, |
|
|
162 | POE does not C<croak> but, in most cases, just sets C<$!> or simply does |
|
|
163 | nothing at all, leading to fragile programs. |
|
|
164 | |
155 | Sometimes registering a handler uses "eventname, parameter" (timeouts), |
165 | Sometimes registering a handler uses the "eventname, parameter" ordering |
156 | sometimes it is "parameter, eventname" (signals). There is little |
166 | (timeouts), sometimes it is "parameter, eventname" (signals). There is |
157 | consistency. |
167 | little consistency overall. |
158 | |
168 | |
159 | =back |
169 | =back |
160 | |
170 | |
161 | On the good side, AnyEvent allows you to write your modules in a 100% |
171 | On the good side, AnyEvent allows you to write your modules in a 100% |
162 | POE-compatible way (bug-for-bug compatible even), without forcing your |
172 | POE-compatible way (bug-for-bug compatible even), without forcing your |