Revision history for Mouse
0.40_06
- * Implement many in XS (gfx)
-
+ * Shipped with Module::Install::XSUtil 0.17 (gfx)
* Mouse::Object
- BUILDALL and DMELISHALL are no longer called by the default ctr/dtr,
- because generated ctrs/dtrs have never call them (gfx)
+ because generated ctrs/dtrs have never call them anyway (gfx)
+ - new and DESTROY are now in XS (gfx)
+
0.40_05 Mon Nov 2 11:59:01 2009
* Shipped with Module::Install::XSUtil 0.16 (gfx)
--- /dev/null
+#!perl
+
+### MODULES
+
+
+{
+ package PlainMoose;
+ use Moose;
+ has foo => (is => 'rw');
+ __PACKAGE__->meta->make_immutable();
+}
+{
+ package PlainMouse;
+ use Mouse;
+ has foo => (is => 'rw');
+ __PACKAGE__->meta->make_immutable();
+}
+{
+ package ClassAccessorFast;
+ use warnings;
+ use strict;
+ use base 'Class::Accessor::Fast';
+ __PACKAGE__->mk_accessors(qw(foo));
+}
+
+use Benchmark qw(cmpthese);
+
+my $moose = PlainMoose->new;
+my $mouse = PlainMouse->new;
+my $caf = ClassAccessorFast->new;
+
+
+print "\nSETTING\n";
+cmpthese(-1, {
+ Moose => sub { $moose->foo(23) },
+ Mouse => sub { $mouse->foo(23) },
+ ClassAccessorFast => sub { $caf->foo(23) },
+}, 'noc');
+
+print "\nGETTING\n";
+cmpthese(-1, {
+ Moose => sub { $moose->foo },
+ Mouse => sub { $mouse->foo },
+ ClassAccessorFast => sub { $caf->foo },
+}, 'noc');
+
+my (@moose, @moose_immut, @mouse, @mouse_immut, @caf_stall);
+print "\nCREATION\n";
+cmpthese(1_000_000, {
+ Moose => sub { push @moose, PlainMoose->new(foo => 23) },
+ Mouse => sub { push @mouse, PlainMouse->new(foo => 23) },
+ ClassAccessorFast => sub { push @caf_stall, ClassAccessorFast->new({foo => 23}) },
+}, 'noc');
+
+my ( $moose_idx, $mouse_idx, $caf_idx ) = ( 0, 0, 0, 0 );
+print "\nDESTRUCTION\n";
+cmpthese(1_000_000, {
+ Moose => sub {
+ $moose[$moose_idx] = undef;
+ $moose_idx++;
+ },
+ Mouse => sub {
+ $mouse[$mouse_idx] = undef;
+ $mouse_idx++;
+ },
+ ClassAccessorFast => sub {
+ $caf_stall[$caf_idx] = undef;
+ $caf_idx++;
+ },
+}, 'noc');
+
+
use Mouse::Exporter; # enables strict and warnings
-our $VERSION = '0.40_05';
+our $VERSION = '0.40_06';
use Carp qw(confess);
use Scalar::Util qw(blessed);
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SYNOPSIS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SYNOPSIS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 METHODS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 METHODS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 DESCRIPTION
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 METHODS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SEE ALSO
package Mouse::Role;
use Mouse::Exporter; # enables strict and warnings
-our $VERSION = '0.40_05';
+our $VERSION = '0.40_06';
use Carp qw(confess);
use Scalar::Util qw(blessed);
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SYNOPSIS
use strict;
use warnings;
-our $VERSION = '0.40_05';
+our $VERSION = '0.40_06';
our $MouseVersion = $VERSION;
our $MooseVersion = '0.90';
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 SYNOPSIS
# Because Mouse::Util is loaded first in all the Mouse sub-modules,
# XS loader is placed here, not in Mouse.pm.
- our $VERSION = '0.40_05';
+ our $VERSION = '0.40_06';
my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL});
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 IMPLEMENTATIONS FOR
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head2 SYNOPSIS
=head1 VERSION
-This document describes Mouse version 0.40_05
+This document describes Mouse version 0.40_06
=head1 DESCRIPTION