Revision history for Perl extension Moose::Autobox
+ * Moose::Autobox
+ - fixed loading approach so that Moose::Object doesn't end up in isa
+
0.04 Thurs. May 31, 2007
* Moose::Autobox::Hash
- added method for shallow hash merging
* Moose::Autobox::Scalar/Array/Hash
- added &print/&say to SCALAR, ARRAY and HASH
-
0.03 Thurs. Aug 17, 2006
* Moose::Autobox
{
package Moose::Autobox::SCALAR;
- # NOTE:
- # this doesnt make sense, but
- # I need to prevent Moose from
- # assiging to @ISA
- use base 'UNIVERSAL';
- use Moose;
- with 'Moose::Autobox::Scalar';
+
+ use Moose::Autobox::Scalar;
+
+ use metaclass 'Moose::Meta::Class';
+
+ __PACKAGE__->meta->_apply_all_roles('Moose::Autobox::Scalar');
*does = \&Moose::Object::does;
package Moose::Autobox::ARRAY;
- use base 'UNIVERSAL';
- use Moose;
- with 'Moose::Autobox::Array';
+
+ use Moose::Autobox::Array;
+
+ use metaclass 'Moose::Meta::Class';
+
+ __PACKAGE__->meta->_apply_all_roles('Moose::Autobox::Array');
*does = \&Moose::Object::does;
package Moose::Autobox::HASH;
- use base 'UNIVERSAL';
- use Moose;
- with 'Moose::Autobox::Hash';
+
+ use Moose::Autobox::Hash;
+
+ use metaclass 'Moose::Meta::Class';
+
+ __PACKAGE__->meta->_apply_all_roles('Moose::Autobox::Hash');
*does = \&Moose::Object::does;
package Moose::Autobox::CODE;
- use base 'UNIVERSAL';
- use Moose;
- with 'Moose::Autobox::Code';
+
+ use Moose::Autobox::Code;
+
+ use metaclass 'Moose::Meta::Class';
+
+ __PACKAGE__->meta->_apply_all_roles('Moose::Autobox::Code');
*does = \&Moose::Object::does;
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 5;
+
+use_ok("Moose::Autobox");
+
+foreach my $stem (qw(SCALAR ARRAY HASH CODE)) {
+ my $class = "Moose::Autobox::${stem}";
+ ok(!$class->isa('Moose::Object'), "${class} !isa Moose::Object");
+}