[Bast-commits] r9798 -
Class-Accessor-Grouped/trunk/lib/Class/Accessor
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Nov 25 18:14:34 GMT 2010
Author: ribasushi
Date: 2010-11-25 18:14:34 +0000 (Thu, 25 Nov 2010)
New Revision: 9798
Modified:
Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
Log:
Minor refactor to allow for braindead CDBICompat code (no methname passed in)
Modified: Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
===================================================================
--- Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-11-25 18:03:18 UTC (rev 9797)
+++ Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-11-25 18:14:34 UTC (rev 9798)
@@ -621,17 +621,18 @@
$class = $c;
}
- my $fq_name = "${class}::${methname}";
# When installing an XSA simple accessor, we need to make sure we are not
# short-circuiting a (compile or runtime) get_simple/set_simple override.
# What we do here is install a lazy first-access check, which will decide
# the ultimate coderef being placed in the accessor slot
if ($USE_XS and $group eq 'simple') {
+ my $fq_name = "${class}::${methname}";
($accessor_maker_cache->{xs}{$field}{$type}{$fq_name} ||= do {
die sprintf( "Class::XSAccessor requested but not available:\n%s\n", __CAG_NO_CXSA )
if __CAG_NO_CXSA;
+
sub { sub {
my $current_class = Scalar::Util::blessed( $_[0] ) || $_[0];
@@ -688,7 +689,7 @@
no warnings 'redefine';
local $@ if __CAG_UNSTABLE_DOLLARAT;
- eval "sub ${fq_name}{$src}";
+ eval "sub ${class}::${methname}{$src}";
undef; # so that no attempt will be made to install anything
}
More information about the Bast-commits
mailing list