[Bast-commits] r9207 - in trunk/Class-Accessor-Grouped: .
lib/Class/Accessor
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat Apr 24 09:52:09 GMT 2010
Author: ribasushi
Date: 2010-04-24 10:52:09 +0100 (Sat, 24 Apr 2010)
New Revision: 9207
Modified:
trunk/Class-Accessor-Grouped/Changes
trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm
Log:
Do as Steffen says
Modified: trunk/Class-Accessor-Grouped/Changes
===================================================================
--- trunk/Class-Accessor-Grouped/Changes 2010-04-24 02:13:45 UTC (rev 9206)
+++ trunk/Class-Accessor-Grouped/Changes 2010-04-24 09:52:09 UTC (rev 9207)
@@ -1,5 +1,8 @@
Revision history for Class::Accessor::Grouped.
+ - Changed the way Class::XSAccessor is invoked if available
+ (recommended by C::XSA author)
+
0.09003 Fri Apr 23 23:00:19 2010
- use Class::XSAccessor if available for 'simple' accessors, except on
MSWin32, with documentation
Modified: trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm
===================================================================
--- trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm 2010-04-24 02:13:45 UTC (rev 9206)
+++ trunk/Class-Accessor-Grouped/lib/Class/Accessor/Grouped.pm 2010-04-24 09:52:09 UTC (rev 9207)
@@ -103,13 +103,16 @@
my $alias = "_${name}_accessor";
my $full_name = join('::', $class, $name);
my $full_alias = join('::', $class, $alias);
-
if ( $hasXS && $group eq 'simple' ) {
require Class::XSAccessor;
- Class::XSAccessor::newxs_accessor("${class}::${name}", $field, 0);
- Class::XSAccessor::newxs_accessor("${class}::${alias}", $field, 0);
-
- # XXX: is the alias accessor really necessary?
+ Class::XSAccessor->import({
+ replace => 1,
+ class => $class,
+ accessors => {
+ $name => $field,
+ $alias => $field,
+ },
+ });
}
else {
my $accessor = $self->$maker($group, $field);
More information about the Bast-commits
mailing list