Permalink
Browse files

Remove class_xsaccessor from master for now.

  • Loading branch information...
ingydotnet committed Oct 1, 2011
1 parent 47c5257 commit df38160d950272f78ddbcc70aeab520a0a676e33
Showing with 0 additions and 56 deletions.
  1. +0 −3 lib/Mo/class_xsaccessor.pm
  2. +0 −1 pkg/manifest.skip
  3. +0 −1 src/Makefile
  4. +0 −17 src/Mo/class_xsaccessor.pm
  5. +0 −34 t/class_xsaccessor.t
@@ -1,3 +0,0 @@
-package Mo::class_xsaccessor;my$K="Mo::";
-$VERSION=0.25;
-require Class::XSAccessor;*{$K.'class_xsaccessor::e'}=sub{my($P,$e,$h,$features)=@_;$P=~s/::$//;$e->{has}=sub{my($n,%a)=@_;Class::XSAccessor->import(class=>$P,accessors=>{$n=>$n})}unless grep!/class_xsaccessor/,@$features};
View
@@ -1,2 +1 @@
^src/
-class_xsaccessor
View
@@ -2,7 +2,6 @@ ALL := \
../lib/Mo.pm \
../lib/Mo/builder.pm \
../lib/Mo/build.pm \
- ../lib/Mo/class_xsaccessor.pm \
../lib/Mo/coerce.pm \
../lib/Mo/default.pm \
../lib/Mo/has.pm \
View
@@ -1,17 +0,0 @@
-package Mo::class_xsaccessor;
-my $MoPKG = "Mo::";
-$VERSION = 0.25;
-
-require Class::XSAccessor;
-
-*{$MoPKG.'class_xsaccessor::e'} = sub {
- my ($caller_pkg, $exports, $handlers, $features) = @_;
- $caller_pkg =~ s/::$//;
- $exports->{has} = sub {
- my ( $name, %args ) = @_;
- Class::XSAccessor->import(
- class => $caller_pkg,
- accessors => { $name => $name }
- );
- } unless grep !/class_xsaccessor/, @$features;
-};
View
@@ -1,34 +0,0 @@
-use Test::More;
-
-BEGIN {
- eval "use Class::XSAccessor;";
- $@ and plan skip_all => "Class::XSAccessor is needed";
-};
-
-plan tests => 4;
-
-#============
-package Foo;
-
-use Mo 'default', 'class_xsaccessor', 'builder';
-
-has 'this';
-has 'that' => (builder => 'that_builder');
-has 'them' => (default => sub {[]});
-
-use constant that_builder => 'O HAI';
-
-#============
-package main;
-
-my $f = Foo->new(this => 'thing');
-
-is $f->this, 'thing', 'constructor works';
-
-$f->this('thing2');
-
-is $f->this, 'thing2', 'XS accessor works';
-
-is $f->that, 'O HAI', 'builder still works';
-
-is ref $f->them, 'ARRAY', 'default still works';

0 comments on commit df38160

Please sign in to comment.