Test/Shared/Fixture/Data/Message/Board/Example.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Data/Message/Board/Comment.pm ↑ Summary
1 package Test::Shared::Fixture::Data::Message::Board::Example;
2  
3 8 ▶use base qw(Data::Message::Board);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 use strict;
5 use warnings;
6  
7 use Data::Message::Board::Comment;
8 use Data::Person;
9 use DateTime;
10  
11 our $VERSION = 0.06;
12  
13 sub new {
14 my $class = shift;
15  
16 my @params = (
17 'author' => Data::Person->new(
18 'name' => 'John Wick',
19 ),
20 'comments' => [
21 Data::Message::Board::Comment->new(
22 'author' => Data::Person->new(
23 'name' => 'Gregor Herrmann',
24 ),
25 'date' => DateTime->new(
26 'day' => 25,
27 'month' => 5,
28 'year' => 2024,
29 'hour' => 17,
30 'minute' => 53,
31 'second' => 27,
32 ),
33 'id' => 1,
34 'message' => 'apt-get update; apt-get install perl;',
35 ),
36 Data::Message::Board::Comment->new(
37 'author' => Data::Person->new(
38 'name' => 'Emmanuel Seyman',
39 ),
40 'date' => DateTime->new(
41 'day' => 25,
42 'month' => 5,
43 'year' => 2024,
44 'hour' => 17,
45 'minute' => 53,
46 'second' => 37,
47 ),
48 'id' => 2,
49 'message' => 'dnf update; dnf install perl-intepreter;',
50 ),
51 ],
52 'date' => DateTime->new(
53 'day' => 25,
54 'month' => 5,
55 'year' => 2024,
56 'hour' => 17,
57 'minute' => 53,
58 'second' => 20,
59 ),
60 'id' => 7,
61 'message' => 'How to install Perl?',
62 );
63  
64 my $self = $class->SUPER::new(@params);
65  
66 return $self;
67 }
68  
69 1;
70  
71 __END__
« Data/Message/Board/Comment.pm ↑ Summary