"TAPlug"s for TAP::Harness
Eric Wilhelm
scratchcomputing at gmail.com
Wed Jun 10 16:13:18 GMT 2009
# from Andy Armstrong
# on Wednesday 10 June 2009 07:03:
>> with $callback_name => $subref, each of which is then installed in
>> the $harness object. TAP::Harness would be responsible for
>> require()ing each plug.
>> ...
>That's certainly possible. It's already nearly possible. You can pass
> a list of callbacks to TAP::Harness->new. If you had an additional
> callback that was called during TAP::Harness construction you could
> write:
>
> TAP::Harness->new(
> callbacks => { postinit => sub {
> my $self = shift;
> TAPlug::Archiver->hook($self, @args);
> }});
>
>Which I think achieves the same thing but with less hard wired
> plumbing.
Ok, but I think that hard-wiring the require() and the simple init()
interface is the strength of my proposal with regard to passing through
the layers of abstraction/callers.
Of course, it could be another package which does all of this, including
holding the data for plugs to detect conflicts, etc:
my $harness = TAP::Harness->new(...);
TAPx::Plugs->new($harness, Archiver => [...], Ponies => [...]);
Or something.
--Eric
--
software: a hypothetical exercise which happens to compile.
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the tapx-dev
mailing list