From: gfx Date: Mon, 16 Nov 2009 11:20:53 +0000 (+0900) Subject: Checking in changes prior to tagging of version 0.40_06. Changelog diff is: X-Git-Tag: 0.40_06^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c06682dd715ca41a2f83bab2adff08bd3464fcda;p=gitmo%2FMouse.git Checking in changes prior to tagging of version 0.40_06. Changelog diff is: diff --git a/Changes b/Changes index 84d9e90..2156189 100644 --- a/Changes +++ b/Changes @@ -1,11 +1,12 @@ 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) --- diff --git a/Changes b/Changes index 84d9e90..2156189 100644 --- a/Changes +++ b/Changes @@ -1,11 +1,12 @@ 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) diff --git a/benchmarks/vs_caf.pl b/benchmarks/vs_caf.pl new file mode 100644 index 0000000..569b78f --- /dev/null +++ b/benchmarks/vs_caf.pl @@ -0,0 +1,72 @@ +#!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'); + + diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 0765630..04be220 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -3,7 +3,7 @@ use 5.006_002; 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); @@ -160,7 +160,7 @@ Mouse - Moose minus the antlers =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SYNOPSIS diff --git a/lib/Mouse/Exporter.pm b/lib/Mouse/Exporter.pm index d2bf45e..18a3387 100644 --- a/lib/Mouse/Exporter.pm +++ b/lib/Mouse/Exporter.pm @@ -258,7 +258,7 @@ Mouse::Exporter - make an import() and unimport() just like Mouse.pm =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SYNOPSIS diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index 2ac284a..c513a8d 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -435,7 +435,7 @@ Mouse::Meta::Attribute - The Mouse attribute metaclass =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 METHODS diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 1aee61d..ae69e32 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -410,7 +410,7 @@ Mouse::Meta::Class - The Mouse class metaclass =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 METHODS diff --git a/lib/Mouse/Meta/Method.pm b/lib/Mouse/Meta/Method.pm index dd11d1f..561051a 100755 --- a/lib/Mouse/Meta/Method.pm +++ b/lib/Mouse/Meta/Method.pm @@ -39,7 +39,7 @@ Mouse::Meta::Method - A Mouse Method metaclass =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Method/Accessor.pm b/lib/Mouse/Meta/Method/Accessor.pm index b05e267..a71266a 100755 --- a/lib/Mouse/Meta/Method/Accessor.pm +++ b/lib/Mouse/Meta/Method/Accessor.pm @@ -172,7 +172,7 @@ Mouse::Meta::Method::Accessor - A Mouse method generator for accessors =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Method/Constructor.pm b/lib/Mouse/Meta/Method/Constructor.pm index 1f40a3c..2e848a7 100644 --- a/lib/Mouse/Meta/Method/Constructor.pm +++ b/lib/Mouse/Meta/Method/Constructor.pm @@ -193,7 +193,7 @@ Mouse::Meta::Method::Constructor - A Mouse method generator for constructors =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Method/Delegation.pm b/lib/Mouse/Meta/Method/Delegation.pm index 5877cf7..022cb98 100644 --- a/lib/Mouse/Meta/Method/Delegation.pm +++ b/lib/Mouse/Meta/Method/Delegation.pm @@ -34,7 +34,7 @@ Mouse::Meta::Method::Delegation - A Mouse method generator for delegation method =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 5ffcd5c..f61e354 100644 --- a/lib/Mouse/Meta/Method/Destructor.pm +++ b/lib/Mouse/Meta/Method/Destructor.pm @@ -53,7 +53,7 @@ Mouse::Meta::Method::Destructor - A Mouse method generator for destructors =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index fd7d6d5..ab2fd6a 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -298,7 +298,7 @@ Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Rol =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index cd7fdd8..225ed0b 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -330,7 +330,7 @@ Mouse::Meta::Role - The Mouse Role metaclass =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Role/Composite.pm b/lib/Mouse/Meta/Role/Composite.pm index 51fb947..1eb91a7 100644 --- a/lib/Mouse/Meta/Role/Composite.pm +++ b/lib/Mouse/Meta/Role/Composite.pm @@ -120,7 +120,7 @@ Mouse::Meta::Role::Composite - An object to represent the set of roles =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/Role/Method.pm b/lib/Mouse/Meta/Role/Method.pm index d74454a..b476751 100755 --- a/lib/Mouse/Meta/Role/Method.pm +++ b/lib/Mouse/Meta/Role/Method.pm @@ -20,7 +20,7 @@ Mouse::Meta::Role::Method - A Mouse Method metaclass for Roles =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index 1e19143..a29edfe 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -210,7 +210,7 @@ Mouse::Meta::TypeConstraint - The Mouse Type Constraint metaclass =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 DESCRIPTION diff --git a/lib/Mouse/Object.pm b/lib/Mouse/Object.pm index 94a73d7..787cc17 100644 --- a/lib/Mouse/Object.pm +++ b/lib/Mouse/Object.pm @@ -49,7 +49,7 @@ Mouse::Object - The base object for Mouse classes =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 METHODS diff --git a/lib/Mouse/PurePerl.pm b/lib/Mouse/PurePerl.pm index dcac898..1ce720d 100644 --- a/lib/Mouse/PurePerl.pm +++ b/lib/Mouse/PurePerl.pm @@ -477,7 +477,7 @@ Mouse::PurePerl - A Mouse guts in pure Perl =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SEE ALSO diff --git a/lib/Mouse/Role.pm b/lib/Mouse/Role.pm index 9148284..635c936 100644 --- a/lib/Mouse/Role.pm +++ b/lib/Mouse/Role.pm @@ -1,7 +1,7 @@ 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); @@ -143,7 +143,7 @@ Mouse::Role - The Mouse Role =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SYNOPSIS diff --git a/lib/Mouse/Spec.pm b/lib/Mouse/Spec.pm index ac462aa..30a49ae 100644 --- a/lib/Mouse/Spec.pm +++ b/lib/Mouse/Spec.pm @@ -2,7 +2,7 @@ package Mouse::Spec; use strict; use warnings; -our $VERSION = '0.40_05'; +our $VERSION = '0.40_06'; our $MouseVersion = $VERSION; our $MooseVersion = '0.90'; @@ -19,7 +19,7 @@ Mouse::Spec - To what extent Mouse is compatible with Moose =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 SYNOPSIS diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index cf26fe3..4d15fb2 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -5,7 +5,7 @@ BEGIN{ # 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}); @@ -336,7 +336,7 @@ Mouse::Util - Features, with or without their dependencies =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 IMPLEMENTATIONS FOR diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index df0b56a..b47a93b 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -351,7 +351,7 @@ Mouse::Util::TypeConstraints - Type constraint system for Mouse =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head2 SYNOPSIS diff --git a/lib/Mouse/XS.pod b/lib/Mouse/XS.pod index 32ad53a..f09fbd1 100644 --- a/lib/Mouse/XS.pod +++ b/lib/Mouse/XS.pod @@ -5,7 +5,7 @@ Mouse::XS - A Mouse guts in XS =head1 VERSION -This document describes Mouse version 0.40_05 +This document describes Mouse version 0.40_06 =head1 DESCRIPTION