1. Shlomi Fish
  2. perl-Test-Run

Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 218575e

Placed the initialisation of the output property in the plugin because
it's not used at all in Test::Run::Core.

  • Participants
  • Parent commits c9c6284
  • Branches move-non-core-functionality-to-plugins

Comments (0)

Files changed (3)

File modules/Test-Shlomif-Harness/Build.PL

View file
  • Ignore whitespace
         'Test::Harness' => "2.53",
         'Scalar::Util' => 0,
         'TAPx::Parser' => "0.30",
+        'NEXT' => 0,
     },
     dist_version_from => "lib/Test/Run/Core.pm",
     license => "bsd",

File modules/Test-Shlomif-Harness/lib/Test/Run/Core.pm

View file
  • Ignore whitespace
     }
 }
 
-sub _get_new_output
-{
-    my $self = shift;
-    my $args = shift;
-
-    return Test::Run::Output->new(
-        $args,
-    );
-}
 
 sub _get_new_strap
 {
     $self->Switches("-w");
     $self->_init_simple_params(\%args);
     $self->dir_files([]);
-    $self->output($self->_get_new_output(\%args));
     $self->Strap(
         $self->_get_new_strap(\%args),
     );

File modules/Test-Shlomif-Harness/lib/Test/Run/Plugin/CmdLine/Output.pm

View file
  • Ignore whitespace
 use warnings;
 
 use Carp;
-use Benchmark qw(timestr); 
+use Benchmark qw(timestr);
+use NEXT;
 
 use Test::Run::Core;
 
 
 @ISA=(qw(Test::Run::Core));
 
+__PACKAGE__->mk_accessors(qw(
+    output
+));
+
+sub _get_new_output
+{
+    my $self = shift;
+    my $args = shift;
+
+    return Test::Run::Output->new(
+        $args,
+    );
+}
+
+sub _initialize
+{
+    my $self = shift;
+
+    my (%args) = @_;
+
+    $self->output($self->_get_new_output(\%args));
+
+    return $self->NEXT::_initialize(@_);
+}
+
 sub _report_dubious
 {
     my ($self, $args) = @_;