Skip Menu |

This queue is for tickets about the Mason CPAN distribution.

Report information
The Basics
Id: 100507
Status: resolved
Priority: 0/
Queue: Mason

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Fix for 5.21.6
Dodge the new deprecation warning about my $var; sub () { $var }; \$var; where perl sees the \$var and thinks, ‘Wait, this was meant to be a closure!’ (Also applies to func($var).)
Subject: open_7TippNxw.txt
diff -rup Mason-2.22-hQjl7O-orig/lib/Mason/Component/Moose.pm Mason-2.22-hQjl7O/lib/Mason/Component/Moose.pm --- Mason-2.22-hQjl7O-orig/lib/Mason/Component/Moose.pm 2014-02-01 11:45:55.000000000 -0800 +++ Mason-2.22-hQjl7O/lib/Mason/Component/Moose.pm 2014-11-22 05:39:16.000000000 -0800 @@ -15,8 +15,10 @@ sub init_meta { Method::Signatures::Simple->import( into => $for_class ); MooseX::HasDefaults::RW->import( { into => $for_class } ); { + # This var must not be referenced elsewhere: + my $temp = $for_class; no strict 'refs'; - *{ $for_class . '::CLASS' } = sub () { $for_class }; # like CLASS.pm + *{ $for_class . '::CLASS' } = sub () { $temp }; # like CLASS.pm *{ $for_class . '::CLASS' } = \$for_class; } } diff -rup Mason-2.22-hQjl7O-orig/lib/Mason/Moose.pm Mason-2.22-hQjl7O/lib/Mason/Moose.pm --- Mason-2.22-hQjl7O-orig/lib/Mason/Moose.pm 2014-02-01 11:45:55.000000000 -0800 +++ Mason-2.22-hQjl7O/lib/Mason/Moose.pm 2014-11-22 05:40:19.000000000 -0800 @@ -18,8 +18,10 @@ sub init_meta { MooseX::StrictConstructor->import( { into => $for_class } ); MooseX::HasDefaults::RO->import( { into => $for_class } ); { + # This var must not be referenced elsewhere: + my $temp = $for_class; no strict 'refs'; - *{ $for_class . '::CLASS' } = sub () { $for_class }; # like CLASS.pm + *{ $for_class . '::CLASS' } = sub () { $temp }; # like CLASS.pm } }
Thanks, in next release.