From 1e8b5370f159e1235dd8fd331d1efcd4be73fd71 Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sat, 25 Apr 2015 09:16:15 +0200 Subject: [PATCH] Constants from lexical variables potentially modified elsewhere are deprecated Make sure that the new deprecation warning does not happen anymore. This fixes https://rt.cpan.org/Ticket/Display.html?id=103958 --- lib/constant/tiny.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/constant/tiny.pm b/lib/constant/tiny.pm index 594eaaa..f9fc72b 100644 --- a/lib/constant/tiny.pm +++ b/lib/constant/tiny.pm @@ -68,6 +68,7 @@ my $normal_constant_name = qr/^_?[A-Za-z0-9][A-Za-z0-9_]+\z/; $symtab->{$name} = \$scalar; ++$flush_mro; } else { + my $scalar = $scalar; *$full_name = sub () { $scalar }; } } elsif (@_) { -- 2.1.2