Revision history for Class::Accessor::Grouped.
+0.09005 Wed Sep 1 04:00:00 2010
+ - Again, remove Class::XSAccessor for Win32 sine it still breaks
+
0.09004 Wed Aug 11 04:23:15 2010
- Changed the way Class::XSAccessor is invoked if available
(recommended by C::XSA author)
- Tweak code for pure speed while fixing performance issue when assigning @_
under Perl 5.10.0
-0.07000
+0.07000
- Altered get_inherited to return undef rather than () when no value
set for Class::Data::(Inheritable|Accessor) compatiblity
- Fixed spelling test error
use MRO::Compat;
use Sub::Name ();
-our $VERSION = '0.09004';
+our $VERSION = '0.09005';
$VERSION = eval $VERSION;
+# Class::XSAccessor is segfaulting on win32, so be careful
+# Win32 users can set $hasXS to try to use it anyway
+
our $hasXS;
sub _hasXS {
if (not defined $hasXS) {
$hasXS = 0;
- eval {
- require Class::XSAccessor;
- $hasXS = 1;
- };
+ if ($^O ne 'MSWin32') {
+ eval {
+ require Class::XSAccessor;
+ $hasXS = 1;
+ };
+ }
}
return $hasXS;
# So we don't have to do lots of lookups inside the loop.
$maker = $self->can($maker) unless ref $maker;
-
+
my $hasXS = _hasXS();
foreach my $field (@fields) {
my $name = $field;
($name, $field) = @$field if ref $field;
-
+
my $alias = "_${name}_accessor";
my $full_name = join('::', $class, $name);
my $full_alias = join('::', $class, $alias);
else {
my $accessor = $self->$maker($group, $field);
my $alias_accessor = $self->$maker($group, $field);
-
+
*$full_name = Sub::Name::subname($full_name, $accessor);
#unless defined &{$class."\:\:$field"}
-
+
*$full_alias = Sub::Name::subname($full_alias, $alias_accessor);
#unless defined &{$class."\:\:$alias"}
}