| 1 | package Test::Run::Straps::StrapsDetailsObj; | ||
| 2 | |||
| 3 | 15 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 15 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | Test::Run::Straps::StrapsDetailsObj - a struct representing the details of | ||
| 9 | the straps class. | ||
| 10 | |||
| 11 | =head1 DESCRIPTIONS | ||
| 12 | |||
| 13 | Inherits from Test::Run::Base::Struct. | ||
| 14 | |||
| 15 | =head1 METHODS | ||
| 16 | |||
| 17 | =cut | ||
| 18 | |||
| 19 | 15 | ▶ | use vars qw(@fields); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 15 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | 15 | extends('Test::Run::Base::Struct'); | |
| 24 | |||
| 25 | sub _pre_init | ||
| 26 | 201 | ▶ | { |
|
Subroutine
_pre_init: called CC=1 SCAR=0.0
| |||
| 27 | 201 | my $self = shift; | |
| 28 | 201 | $self->diagnostics(""); | |
| 29 | } | ||
| 30 | |||
| 31 | 15 | has 'actual_ok' => (is => "rw", isa => "Bool"); | |
| 32 | 15 | has 'diagnostics' => (is => "rw", isa => "Str"); | |
| 33 | 15 | has 'name' => (is => "rw", isa => "Str"); | |
| 34 | 15 | has 'ok' => (is => "rw", isa => "Num"); | |
| 35 | 15 | has 'reason' => (is => "rw", isa => "Str"); | |
| 36 | 15 | has 'type' => (is => "rw", isa => "Str"); | |
| 37 | |||
| 38 | =head2 $self->append_to_diag($text) | ||
| 39 | |||
| 40 | Appends $text to the diagnostics. | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | sub append_to_diag | ||
| 45 | 19 | ▶ | { |
|
Subroutine
append_to_diag: called CC=1 SCAR=0.0
Pod
documented
| |||
| 46 | 19 | my ($self, $text) = @_; | |
| 47 | 19 | $self->diagnostics($self->diagnostics().$text); | |
| 48 | } | ||
| 49 | |||
| 50 | 15 | 1; | |
| 51 | |||
| 52 | __END__ | ||