Shlomi Fish
2013-09-06 15:16:06 UTC
Hi all,
I'd like to know what is the best way to create a plugin for
https://metacpan.org/module/TAP::Harness which will behave similarly to
https://metacpan.org/module/Test::Run::Plugin::TrimDisplayedFilenames . I found
out that the runtests method can accept aliases to be displayed instead of the
filename itself using an arrayref of [ $test, $alias ], so I can simply wrap
runtests() in a subclass, process the arguments, and call next::method with the
modified arguments.
However, I still don't know how to write a plugin like that exactly (and how to
get prove to recognise it). This section -
https://metacpan.org/module/TAP::Harness#WRITING-PLUGINS - explains a bit about
how to do that with some hand-waving, but does not show any complete
top-to-bottom example, and I could not find anything with a metacpan search.
My motivation for doing this is to port the rest of the functionality I miss in
Test::Run (which failed to gain mainstream acceptance, and few people
aside from me are using it) into TAP::Harness.
Regards,
Shlomi Fish
I'd like to know what is the best way to create a plugin for
https://metacpan.org/module/TAP::Harness which will behave similarly to
https://metacpan.org/module/Test::Run::Plugin::TrimDisplayedFilenames . I found
out that the runtests method can accept aliases to be displayed instead of the
filename itself using an arrayref of [ $test, $alias ], so I can simply wrap
runtests() in a subclass, process the arguments, and call next::method with the
modified arguments.
However, I still don't know how to write a plugin like that exactly (and how to
get prove to recognise it). This section -
https://metacpan.org/module/TAP::Harness#WRITING-PLUGINS - explains a bit about
how to do that with some hand-waving, but does not show any complete
top-to-bottom example, and I could not find anything with a metacpan search.
My motivation for doing this is to port the rest of the functionality I miss in
Test::Run (which failed to gain mainstream acceptance, and few people
aside from me are using it) into TAP::Harness.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Selina Mandrake - The Slayer (Buffy parody) - http://shlom.in/selina
bzr is slower than Subversion in combination with Sourceforge.
— Sjors, http://dazjorz.com/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Selina Mandrake - The Slayer (Buffy parody) - http://shlom.in/selina
bzr is slower than Subversion in combination with Sourceforge.
— Sjors, http://dazjorz.com/
Please reply to list if it's a mailing list post - http://shlom.in/reply .