[Bast-commits] r9667 - in Class-Accessor-Grouped/trunk: .
lib/Class/Accessor
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Wed Sep 1 21:03:42 GMT 2010
Author: frew
Date: 2010-09-01 22:03:42 +0100 (Wed, 01 Sep 2010)
New Revision: 9667
Modified:
Class-Accessor-Grouped/trunk/Changes
Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
Log:
I was wrong, we still need this check
Modified: Class-Accessor-Grouped/trunk/Changes
===================================================================
--- Class-Accessor-Grouped/trunk/Changes 2010-09-01 04:13:03 UTC (rev 9666)
+++ Class-Accessor-Grouped/trunk/Changes 2010-09-01 21:03:42 UTC (rev 9667)
@@ -1,5 +1,8 @@
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)
@@ -40,7 +43,7 @@
- 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
Modified: Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
===================================================================
--- Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-09-01 04:13:03 UTC (rev 9666)
+++ Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-09-01 21:03:42 UTC (rev 9667)
@@ -7,19 +7,24 @@
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;
@@ -81,7 +86,7 @@
# 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) {
@@ -93,7 +98,7 @@
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);
@@ -111,10 +116,10 @@
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"}
}
More information about the Bast-commits
mailing list