smokeinabox

 view release on metacpan or  search on metacpan

cpansmokebox/inc/bundle/Test/Reporter/Transport/File.pm  view on Meta::CPAN

# ABSTRACT: File transport for Test::Reporter

use base 'Test::Reporter::Transport';

sub new {
  my ($class, $dir) = @_;

  die "target directory '$dir' doesn't exist or can't be written to"
    unless -d $dir && -w $dir;

  return bless { dir => $dir } => $class;
}

sub send {
    my ($self, $report) = @_;
    $report->dir( $self->{dir} );
    return $report->write();
}

1;

cpansmokebox/inc/bundle/Test/Reporter/Transport/HTTPGateway.pm  view on Meta::CPAN

use base 'Test::Reporter::Transport';

use LWP::UserAgent;

sub new {
  my ($class, $url, $key) = @_;

  die "invalid gateway URL: must be absolute http or https URL"
    unless $url =~ /\Ahttps?:/i;

  bless { gateway => $url, key => $key } => $class;
}

sub send {
  my ($self, $report) = @_;

  # construct the "via"
  my $report_class   = ref $report;
  my $report_version = $report->VERSION;
  my $via = "$report_class $report_version";
  $via .= ', via ' . $report->via if $report->via;

cpansmokebox/inc/bundle/Test/Reporter/Transport/Mail/Send.pm  view on Meta::CPAN

package Test::Reporter::Transport::Mail::Send;
our $VERSION = '1.57';
# ABSTRACT: Mail::Send transport for Test::Reporter

use base 'Test::Reporter::Transport';

use Mail::Send;

sub new {
    my ($class, @args) = @_;
    bless { args => \@args } => $class;
}

sub send {
    my ($self, $report, $recipients) = @_;
    $recipients ||= [];

    my $perl_version = $report->perl_version->{_version};
    my $via = $report->via();
    my $msg = Mail::Send->new();

cpansmokebox/inc/bundle/Test/Reporter/Transport/Net/SMTP.pm  view on Meta::CPAN

use strict;
BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } }
package Test::Reporter::Transport::Net::SMTP;
our $VERSION = '1.57';
# ABSTRACT: SMTP transport for Test::Reporter

use base 'Test::Reporter::Transport';

sub new {
    my ($class, @args) = @_;
    bless { args => \@args } => $class;
}

sub _net_class {
    my ($self) = @_;
    my $class = ref $self ? ref $self : $self;
    my ($net_class) = ($class =~ /^Test::Reporter::Transport::(.+)\z/);
    return $net_class;
}

# Next two subs courtesy of Casey West, Ricardo SIGNES, and Email::Date



( run in 0.421 second using v1.01-cache-2.11-cpan-65fba6d93b7 )