A great Perlism to try and implement is its syntactic sugar and any effort along those lines (for me at least) is a welcome effort.
However, after looking at your code I wonder how useful some of your idioms (specifically your implementation of foreach) are compared to that of generics which is slated for 1.5?
Given that not many people would upgrade to 1.5 right away I think I've kind of answered my own question :).
I was also wondering about your class structure.
The *accepted* method would be some form of delegate object but one that conforms to an interface. That said, the STRATEGY pattern here would surely have helped tremendously? You could still use your base Block() class but then subclassed it for each Perl idiom.
A final point/question, are you expecting the user of your API to undertake all the Thread handling? There are areas where I can see you're going to have problems unless you make this absolutely clear.
I do have more points but they are more related to Java than Perl which I think is a little *too* OT :).
Please don't get me wrong - this is interesing work :).
Update: made a boo boo - thought you weren't using anonymous classes when I think you are. Still nm :)
The stuff about anonymous classes.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.