In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7064c127ddaf90b0127815f523631025a6ab49af?hp=c5764f70840f5068e5ce459d0b23d3afa4eb65de>
- Log ----------------------------------------------------------------- commit 7064c127ddaf90b0127815f523631025a6ab49af Author: Nicholas Clark <[email protected]> Date: Tue Aug 18 11:36:02 2009 +0100 No need to flush the package's MRO cache if we've just flushed it. ----------------------------------------------------------------------- Summary of changes: lib/constant.pm | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/constant.pm b/lib/constant.pm index b77c085..255aa99 100644 --- a/lib/constant.pm +++ b/lib/constant.pm @@ -4,7 +4,7 @@ use strict; use warnings::register; use vars qw($VERSION %declared); -$VERSION = '1.18'; +$VERSION = '1.19'; #======================================================================= @@ -45,6 +45,7 @@ sub import { my $constants; my $multiple = ref $_[0]; my $pkg = caller; + my $done_mro; my $symtab; if (_CAN_PCS) { @@ -123,7 +124,8 @@ sub import { # constants from cv_const_sv are read only. So we have to: Internals::SvREADONLY($scalar, 1); $symtab->{$name} = \$scalar; - mro::method_changed_in($pkg); + # No need to flush the cache if we've just flushed it. + mro::method_changed_in($pkg) unless $done_mro++; } else { *$full_name = sub () { $scalar }; } -- Perl5 Master Repository
