This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Module-CoreList/t/maintainer.t: silence warning
authorDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 11:13:20 +0000 (12:13 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 11:13:20 +0000 (12:13 +0100)
../dist/Module-CoreList/t/maintainer.t .. Name
"Module::CoreList::released" used only once: possible typo

dist/Module-CoreList/t/maintainer.t

index 7a3d658..b096269 100644 (file)
@@ -24,5 +24,8 @@ is( scalar keys %vers, 1, 'All Module-CoreList modules should have the same $VER
 
 # Check that there is a release entry for the current perl version
 my $released = $Module::CoreList::released{ $] };
+# duplicate fetch to avoid 'used only once: possible typo' warning
+$released = $Module::CoreList::released{ $] };
+
 ok( defined $released, "There is a released entry for $]" );
 like( $released, qr!^\d{4}\-\d{2}\-\d{2}$!, 'It should be a date in YYYY-MM-DD format' );