require XSAccessor in case someone just set hasXS to true manually
Peter Rabbitson [Fri, 23 Apr 2010 23:05:27 +0000 (23:05 +0000)]
lib/Class/Accessor/Grouped.pm

index 008347e..a62d12e 100644 (file)
@@ -103,6 +103,7 @@ sub mk_group_accessors {
             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);