1
1
package Perl5::CoreSmokeDB::Client::Database ;
2
2
use Moo;
3
3
4
- with(
5
- ' Perl5::CoreSmokeDB::ValidationTemplates' ,
6
- ' MooX::Params::CompiledValidators'
7
- );
4
+ with qw<
5
+ Perl5::CoreSmokeDB::ValidationTemplates
6
+ MooX::Params::CompiledValidators
7
+ > ;
8
+
9
+ our $VERSION = ' 1.001' ;
8
10
9
11
use version;
10
12
use DateTime;
11
- use Date::Parse qw( str2time ) ;
13
+ use Date::Parse qw< str2time > ;
12
14
13
15
=head1 NAME
14
16
@@ -22,15 +24,13 @@ An instance of L<Perl5::CoreSmokeDB::Schema>.
22
24
23
25
=cut
24
26
25
- use Types::Standard qw( InstanceOf ) ;
27
+ use Types::Standard qw< InstanceOf > ;
26
28
has schema => (
27
29
is => ' ro' ,
28
30
isa => InstanceOf[" Perl5::CoreSmokeDB::Schema" ],
29
31
required => 1
30
32
);
31
33
32
- my @_binary_data = qw/ log_file out_file manifest_msgs compiler_msgs nonfatal_msgs / ;
33
-
34
34
=head1 DESCRIPTION
35
35
36
36
This is the interface between the database and the API, it executes queries and
@@ -244,15 +244,15 @@ sub get_latest_reports {
244
244
},
245
245
},
246
246
{
247
- columns => [qw/
247
+ columns => [qw<
248
248
id architecture hostname osname osversion
249
249
perl_id git_id git_describe plevel smoke_branch
250
250
username smoke_date summary cpu_count cpu_description
251
- / ],
251
+ > ],
252
252
order_by => [
253
253
{ ' -desc' => ' smoke_date' },
254
254
{ ' -desc' => ' plevel' },
255
- qw/ architecture osname osversion hostname/
255
+ qw< architecture osname osversion hostname > ,
256
256
],
257
257
}
258
258
);
@@ -661,12 +661,12 @@ sub get_reports_by_perl_version {
661
661
$self -> get_filter_query_report(\%$raw_filter ),
662
662
},
663
663
{
664
- columns => [qw/
664
+ columns => [qw<
665
665
id architecture hostname osname osversion
666
666
perl_id git_id git_describe plevel smoke_branch
667
667
username smoke_date summary cpu_count cpu_description
668
- / ],
669
- order_by => [qw/ architecture hostname osname osversion/ ],
668
+ > ],
669
+ order_by => [qw< architecture hostname osname osversion > ],
670
670
}
671
671
);
672
672
return [ $reports -> all() ];
@@ -699,7 +699,7 @@ sub count_reports_by_filter {
699
699
},
700
700
{
701
701
join => ' configs' ,
702
- columns => [qw/ id / ],
702
+ columns => [qw< id > ],
703
703
distinct => 1,
704
704
}
705
705
)-> count();
@@ -736,11 +736,11 @@ sub get_reports_by_filter {
736
736
},
737
737
{
738
738
join => ' configs' ,
739
- columns => [qw/
739
+ columns => [qw<
740
740
id architecture hostname osname osversion
741
741
perl_id git_id git_describe plevel smoke_branch
742
742
username smoke_date summary cpu_count cpu_description
743
- / ],
743
+ > ],
744
744
distinct => 1,
745
745
order_by => { -desc => ' smoke_date' },
746
746
page => $page ,
@@ -762,9 +762,9 @@ sub get_architecture_host_os {
762
762
my $architecture = $self -> schema-> resultset(' Report' )-> search(
763
763
undef ,
764
764
{
765
- columns => [qw/ architecture hostname osname osversion/ ],
766
- group_by => [qw/ architecture hostname osname osversion/ ],
767
- order_by => [qw/ architecture hostname osname osversion/ ],
765
+ columns => [qw< architecture hostname osname osversion > ],
766
+ group_by => [qw< architecture hostname osname osversion > ],
767
+ order_by => [qw< architecture hostname osname osversion > ],
768
768
},
769
769
);
770
770
return [ $architecture -> all() ];
@@ -782,9 +782,9 @@ sub get_compilers {
782
782
my $compilers = $self -> schema-> resultset(' Config' )-> search(
783
783
undef ,
784
784
{
785
- columns => [qw/ cc ccversion/ ],
786
- group_by => [qw/ cc ccversion/ ],
787
- order_by => [qw/ cc ccversion/ ],
785
+ columns => [qw< cc ccversion > ],
786
+ group_by => [qw< cc ccversion > ],
787
+ order_by => [qw< cc ccversion > ],
788
788
}
789
789
);
790
790
return [ $compilers -> all() ];
@@ -834,13 +834,16 @@ sub post_report {
834
834
time_zone => ' UTC' ,
835
835
);
836
836
837
- my @to_unarray = qw/
837
+ my @log_data = qw< log_file out_file > ;
838
+ $report_data -> {$_ } = delete $data -> {$_ } for @log_data ;
839
+
840
+ my @to_unarray = qw<
838
841
skipped_tests applied_patches
839
842
compiler_msgs manifest_msgs nonfatal_msgs
840
- / ;
843
+ > ;
841
844
$report_data -> {$_ } = join (" \n " , @{delete ($data -> {$_ }) || []}) for @to_unarray ;
842
845
843
- my @other_data = qw/ harness_only harness3opts summary/ ;
846
+ my @other_data = qw< harness_only harness3opts summary > ;
844
847
$report_data -> {$_ } = delete $data -> {$_ } for @other_data ;
845
848
846
849
my $configs = delete $data -> {' configs' };
@@ -851,7 +854,7 @@ sub post_report {
851
854
852
855
for my $config (@$configs ) {
853
856
my $results = delete $config -> {' results' };
854
- for my $field (qw/ cc ccversion/ ) {
857
+ for my $field (qw< cc ccversion > ) {
855
858
$config -> {$field } ||= ' ?' ;
856
859
}
857
860
$config -> {started } = DateTime-> from_epoch(
0 commit comments