Skip to content

Commit

Permalink
Merge pull request #95 from PerlToolsTeam/use-feature-compat-class
Browse files Browse the repository at this point in the history
Use Feature::Compat::Class everywhere. Turn off experimental warnings
  • Loading branch information
davorg authored Sep 30, 2024
2 parents deb90e5 + c498ef0 commit 88a3900
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requires 'Object::Pad';
requires 'Feature::Compat::Class';
requires 'Object::Pad', '0.813';
requires 'Feature::Compat::Class', '0.07';
requires 'JSON';
requires 'Path::Tiny', '0.125';
requires 'Template';
Expand Down
5 changes: 3 additions & 2 deletions lib/Dashboard/App.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use v5.36;
use Feature::Compat::Class;

no if $^V >= v5.38, warnings => 'experimental::class';

class Dashboard::App {
use strict;
use warnings;
Expand All @@ -17,8 +19,7 @@ class Dashboard::App {

field $mcpan = MetaCPAN::Client->new;
field $json = JSON->new->pretty->canonical->utf8;
# Annoyingly, I can't use $json here
field $global_cfg = JSON->new->pretty->canonical->utf8->decode(path('dashboard.json')->slurp_utf8);
field $global_cfg = $json->decode(path('dashboard.json')->slurp_utf8);
field $tt;
field @authors;
field @all_authors;
Expand Down
4 changes: 3 additions & 1 deletion lib/Dashboard/Author.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use 5.36.0;
use Object::Pad;
use Feature::Compat::Class;

no if $^V >= v5.38, warnings => 'experimental::class';

class Dashboard::Author {
use Dashboard::Distribution;
Expand Down
4 changes: 3 additions & 1 deletion lib/Dashboard/BadgeMaker.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use v5.26;
use Object::Pad ':experimental(init_expr)';
use Feature::Compat::Class;

no if $^V >= v5.38, warnings => 'experimental::class';

class Dashboard::BadgeMaker {
use strict;
Expand Down
6 changes: 4 additions & 2 deletions lib/Dashboard/Distribution.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use 5.36.0;
use Object::Pad;
use Feature::Compat::Class;

no if $^V >= v5.38, warnings => 'experimental::class';

class Dashboard::Distribution {

Expand Down Expand Up @@ -155,4 +157,4 @@ class Dashboard::Distribution {

return $repo_def_branch->{$dist_data->{repo_owner}}{$dist_data->{repo_name}};
}
}
}

0 comments on commit 88a3900

Please sign in to comment.