Test::Reporter::Transport::Socket - Simple socket transport for Test::Reporter
my $report = Test::Reporter->new( transport => 'Socket', transport_args => [ host => 'metabase.relay.example.com', port => 58008, ], ); # use space-separated in a CPAN::Reporter config.ini transport = Socket host metabase.relay.example.com ...
This is a Test::Reporter::Transport that sends test report data serialised over a TCP socket.
The idea is to keep dependencies in the tester perl to a bear minimum and offload the bulk of submission to a Metabase instance to a relay.
See Test::Reporter and Test::Reporter::Transport for general usage information.
Unlike most other Transport classes, this class requires transport arguments to be provided as key-value pairs:
my $report = Test::Reporter->new( transport => 'Socket', transport_args => [ host => 'metabase.relay.example.com', port => 58008, ], );
Arguments include:
host
The name or IP address of a host where we want to send our serialised data.
port
The TCP port on the above host to send our serialised data.
These methods are only for internal use by Test::Reporter.
my $sender = Test::Reporter::Transport::Socket->new( %params );
The new method is the object constructor.
new
$sender->send( $report );
The send method transmits the report.
send
David A. Golden (DAGOLDEN) Richard Dawe (RICHDAWE) Chris Williams (BINGOS)
Portions Copyright (c) 2009 by Richard Dawe Portions Copyright (c) 2009-2010 by David A. Golden Portions Copyright (c) 2010 by Chris Williams This module inlines Config::Perl::V Copyright (C) 2009-2010 H.Merijn Brand
Licensed under the same terms as Perl itself (the "License"). You may not use this file except in compliance with the License. A copy of the License was distributed with this file or you may obtain a copy of the License from http://dev.perl.org/licenses/
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
To install Config::Perl::V, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Perl::V
CPAN shell
perl -MCPAN -e shell install Config::Perl::V
For more information on module installation, please visit the detailed CPAN module installation guide.