<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Righty-o,<div><br></div><div>There's a workable draft in trunk. &nbsp;Before you panic, don't: it's not yet used by TAP::Parser, I just wanted to commit something as a discussion point.<div><br></div><div>The best starting point is t/source_factory.t &nbsp;and TAP::Parser::SourceFactory. &nbsp;If you want to see it working, swap the comment on lines 484 &amp; 485 of TAP::Parser, and run t/parse.t</div><div><br></div><div>Design notes:</div><div>* went for registry rather than auto-discovered plugins</div><div>** means less easy to extend, but perhaps more guaranteed operability</div><div>*** eg: a dodgy plugin would have to be loaded with a -P first, in order to affect everything</div><div>** really useful &amp; reliable plugins can still be auto-detected 'manually' with some more hacking</div><div>* went for levels of confidence for source detectors</div><div>** that way can be overridden</div><div>* not sure if we need both Sources &amp; SourceDetectors</div><div>** could be useful in some cases though</div><div>** eg: using a different Perl, as discussed earlier in this thread</div><div><br></div><div>If this is the right way, to finish this I reckon we'd need to:</div><div><br></div><div>1. make TAP::Parser::Source more generic</div><div>* not everything's a cmd anymore</div><div>* so subclassing 'pgTAP' would make sense</div><div><br></div><div>2. integrate the SourceFactory into TAP::Parser</div><div>* replace all the source stuff in _initialize() with it</div><div>* maybe replace the 'exec' stuff too?</div><div>** if not, introduce an 'exec_source_class'</div><div><br></div><div>3. update docs</div><div>* subclassing guide</div><div><br></div><div>All of this requires a deprecation cycle... which means a release. &nbsp;I suppose all the work could be done in a sub-class of TAP::Parser.</div><div><br></div><div><div>What do people think - is this the right way forward?</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">+--</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">&nbsp;&nbsp;Steve Purkis</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div></div></div></div></span></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On 10 Apr 2009, at 20:48, Andy Armstrong wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 10 Apr 2009, at 20:11, Steve Purkis wrote:<br><blockquote type="cite">Good to know you're interested. &nbsp;If work doesn't take over my life<br></blockquote><blockquote type="cite">again, I should be able to get something together next week.<br></blockquote><br><br>Thanks for this Steve - sounds like a spendid idea.<br><br>-- <br>Andy Armstrong, Hexten<br><br>_______________________________________________<br>tapx-dev mailing list<br><a href="mailto:tapx-dev@hexten.net">tapx-dev@hexten.net</a><br>http://www.hexten.net/mailman/listinfo/tapx-dev<br>cpan: http://search.cpan.org/dist/TAP-Parser/<br>bugs: http://rt.cpan.org/Public/Dist/Display.html?Name=TAP-Parser<br></div></blockquote></div><br></div></div></body></html>