Skip to content

Commit b2d6d46

Browse files
committed
Make more attributes with default values lazy
1 parent 004ddfe commit b2d6d46

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/MetaCPAN/Role/Script.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ has index => (
8888
reader => '_index',
8989
is => 'ro',
9090
isa => Str,
91+
lazy => 1,
9192
default => 'cpan',
9293
documentation =>
9394
'Index to use, defaults to "cpan" (when used: also export ES_SCRIPT_INDEX)',
@@ -97,13 +98,15 @@ has cluster_info => (
9798
isa => HashRef,
9899
traits => ['Hash'],
99100
is => 'rw',
101+
lazy => 1,
100102
default => sub { {} },
101103
);
102104

103105
has indices_info => (
104106
isa => HashRef,
105107
traits => ['Hash'],
106108
is => 'rw',
109+
lazy => 1,
107110
default => sub { {} },
108111
);
109112

0 commit comments

Comments
 (0)