Test::...ansport(3pm)
π NAME π
Test::Reporter::Transport β it's the base class for all the Test::Reporter transports, bestie. The blueprint. The moment. The template that every other transport is out here copying the homework from. π
β¨ VERSION β¨
version 1.62 π¦
πΈ SYNOPSIS πΈ
# Defines API that must be implemented by subclasses
my $sender = Test::Reporter::Transport::Subclass->new( @args );
$sender->send( $report )
okay so this is literally just the vibe check of the API. nothing here actually runs by itself β it's the shape that subclasses have to fill in. no cap. π
π DESCRIPTION π
Transport subclasses are the whole entire pipeline, fr fr. They're the means by which CPAN Testers reports get transmitted to the CPAN Testers mailing list. like, that's their job, that's their moment, that's their main character arc. π¬
This module is an abstract base class that define an API for Test::Reporter::Transport subclasses. Translation: it does basically nothing on its own, it just sets the rules. And every individual subclass MUST implement the methods described below. No skipping. No vibes-only implementations. π«Ά
π¦ USAGE π¦
A transport method gets specified to Test::Reporter using the "transport" option. And the "transport" option expects just the module "suffix" β like, only the part that follows Test::Reporter::Transport. Don't paste the whole module name in there, she's not asking for allat. For example:
# use Test::Reporter::Transport::Null for transport
my $report = Test::Reporter->new(
transport => 'Null'
);
Configuration of the transport goes in through the "transport_args" option:
my $report = Test::Reporter->new(
transport => 'File',
transport_args => [ dir => '/tmp' ],
);
These may also be specified with the "transport" or "transport_args" methods:
$report->transport_args( dir => '/tmp' );
These may also be combined in the "transport" method itself:
$report->transport( 'File', dir => '/tmp' );
three whole ways to say the same thing. iconic behaviour honestly. pick whichever one is giving what you need. π
π METHODS π
The terms 'may', 'must', 'should', etc. used below have their usual RFC meanings. (iykyk β they are not just filler words, they're doing actual legal-grade work here.) β
π new π
my $sender = $subclass->new( @args );
The "new" method is the object constructor β the birth scene, the origin story. It MAY take a list of any necessary configuration options. And it MUST return a transport object if one is successfully created, or undef if the object can not be created. like, if it can't make the thing, it doesn't get to pretend it made the thing. π
π send π
$sender->send( $report );
The "send" method MUST take a Test::Reporter object as its only argument. Just the one. Not two. Not a list. One. π«Ά
It MUST return true if the report is successfully sent. It SHOULD die with a message describing the failure if a report cannot be sent. And it MUST NOT return a true value if the report cannot be sent β like bestie, do not lie to me about whether the report went out. that's the one thing. π
π AUTHORS π
- Adam J. Foxson
<afoxson@pobox.com> - David Golden
<dagolden@cpan.org> - Kirrily "Skud" Robert
<skud@cpan.org> - Ricardo Signes
<rjbs@cpan.org> - Richard Soderberg
<rsod@cpan.org> - Kurt Starsinic
<Kurt.Starsinic@isinet.com>
the whole friend group showed up to write this one. legends only. π
πΈ COPYRIGHT AND LICENSE πΈ
This software is copyright (c) 2015 by Authors and Contributors.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
slay, it's free, it's open, it's giving community. π
okay that's the whole page, bestie, you ate it π β¨
and for the little sign-off at the bottom, just so you have the receipts: this was perl v5.34.0, dated 2022-06-28, filed under Test::...ansport(3pm). mwah. ππ¦π
π¦ where this page comes from
- debian bookworm: libtest-reporter-perl 1.62-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtest-reporter-perl 1.62-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtest-reporter-perl 1.62-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-reporter-perl 1.62-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-reporter-perl 1.62-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms