--- /dev/null
+use Module::Build;
+
+use strict;
+
+my $build = Module::Build->new(
+ module_name => 'Moose',
+ license => 'perl',
+ requires => {
+ 'Scalar::Util' => '1.18',
+ 'Carp' => '0.01',
+ 'Class::MOP' => '0.20',
+ },
+ optional => {
+ },
+ build_requires => {
+ 'Test::More' => '0.47',
+ 'Test::Exception' => '0.21',
+ },
+ create_makefile_pl => 'traditional',
+ recursive_test_files => 1,
+ add_to_cleanup => [
+ 'META.yml', '*.bak', '*.gz', 'Makefile.PL',
+ ],
+);
+
+$build->create_build_script;
+
--- /dev/null
+Revision history for Perl extension Moose
+
+0.01
+ - Møøse
+
--- /dev/null
+^_build
+^Build$
+^blib
+~$
+\.bak$
+^MANIFEST\.SKIP$
+CVS
+\.svn
+\.DS_Store
+cover_db
+\..*\.sw.?$
+^Makefile$
+^pm_to_blib$
+^MakeMaker-\d
+^blibdirs$
+\.old$
+^#.*#$
+^\.#
\ No newline at end of file
--- /dev/null
+Moose version 0.01
+===========================
+
+See the individual module documentation for more information
+
+INSTALLATION
+
+To install this module type the following:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+DEPENDENCIES
+
+This module requires these other modules and libraries:
+
+ None
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 Infinity Interactive, Inc.
+
+http://www.iinteractive.com
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
--- /dev/null
+
+package Moose;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+use Scalar::Util 'blessed';
+use Carp 'confess';
+
+use Class::MOP;
+use Moose::Object;
+
+sub import {
+ shift;
+ my $pkg = caller();
+
+ my $meta;
+ if ($pkg->can('meta')) {
+ $meta = $pkg->meta();
+ (blessed($meta) && $meta->isa('Class::MOP::Class'))
+ || confess "Whoops, not møøsey enough";
+ }
+ else {
+ $meta = Class::MOP::Class->initialize($pkg);
+ }
+
+ $meta->alias_method('has' => sub {
+ my ($name, %options) = @_;
+ my ($init_arg) = ($name =~ /^[\$\@\%][\.\:](.*)$/);
+ $meta->add_attribute($name => (
+ init_arg => $init_arg,
+ %options,
+ ));
+ });
+
+ $meta->superclasses('Moose::Object')
+ unless $meta->superclasses();
+}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Moose -
+
+=head1 SYNOPSIS
+
+ package Point;
+ use Moose;
+
+ has '$.x';
+ has '$.y' => (is => 'rw');
+
+ sub clear {
+ my $self = shift;
+ $self->x(0);
+ $self->y(0);
+ }
+
+ package Point::3D;
+ use Moose;
+
+ use base 'Point';
+
+ has '$:z';
+
+ sub clear : After {
+ my $self = shift;
+ $self->{'$:z'} = 0;
+ }
+
+=head1 DESCRIPTION
+
+=head1 OTHER NAMES
+
+=head1 BUGS
+
+All complex software has bugs lurking in it, and this module is no
+exception. If you find a bug please either email me, or add the bug
+to cpan-RT.
+
+=head1 CODE COVERAGE
+
+I use L<Devel::Cover> to test the code coverage of my tests, below is the
+L<Devel::Cover> report on this module's test suite.
+
+=head1 ACKNOWLEDGEMENTS
+
+=head1 AUTHOR
+
+Stevan Little E<lt>stevan@iinteractive.comE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2006 by Infinity Interactive, Inc.
+
+L<http://www.iinteractive.com>
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
\ No newline at end of file
--- /dev/null
+
+package Moose::Object;
+
+use strict;
+use warnings;
+use metaclass;
+
+sub new {
+ my $class = shift;
+ $class->meta->new_object(@_);
+}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Moose::Object -
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=head1 METHODS
+
+=over 4
+
+=item B<meta>
+
+=item B<new>
+
+=back
+
+=head1 BUGS
+
+All complex software has bugs lurking in it, and this module is no
+exception. If you find a bug please either email me, or add the bug
+to cpan-RT.
+
+=head1 CODE COVERAGE
+
+I use L<Devel::Cover> to test the code coverage of my tests, below is the
+L<Devel::Cover> report on this module's test suite.
+
+=head1 ACKNOWLEDGEMENTS
+
+=head1 AUTHOR
+
+Stevan Little E<lt>stevan@iinteractive.comE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2006 by Infinity Interactive, Inc.
+
+L<http://www.iinteractive.com>
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok('Moose');
+}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 15;
+
+BEGIN {
+ use_ok('Moose');
+}
+
+{
+ package Point;
+ use Moose;
+
+ has '$.x' => (reader => 'x');
+ has '$.y' => (accessor => 'y');
+
+ sub clear {
+ my $self = shift;
+ $self->{'$.x'} = 0;
+ $self->y(0);
+ }
+
+ package Point3D;
+ use Moose;
+
+ use base 'Point';
+
+ has '$:z';
+
+ sub clear {
+ my $self = shift;
+ $self->SUPER::clear();
+ $self->{'$:z'} = 0;
+ }
+
+}
+
+my $point = Point->new(x => 1, y => 2);
+isa_ok($point, 'Point');
+
+is($point->x, 1, '... got the right value for x');
+is($point->y, 2, '... got the right value for y');
+
+$point->y(10);
+
+is($point->y, 10, '... got the right (changed) value for y');
+
+$point->clear();
+
+is($point->x, 0, '... got the right (cleared) value for x');
+is($point->y, 0, '... got the right (cleared) value for y');
+
+my $point3d = Point3D->new(x => 10, y => 15, z => 3);
+isa_ok($point3d, 'Point3D');
+isa_ok($point3d, 'Point');
+
+is($point3d->x, 10, '... got the right value for x');
+is($point3d->y, 15, '... got the right value for y');
+is($point3d->{'$:z'}, 3, '... got the right value for z');
+
+$point3d->clear();
+
+is($point3d->x, 0, '... got the right (cleared) value for x');
+is($point3d->y, 0, '... got the right (cleared) value for y');
+is($point3d->{'$:z'}, 0, '... got the right (cleared) value for z');
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+
+all_pod_files_ok();
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+
+all_pod_coverage_ok();