Revision history for Perl extension Moose
-0.52
- * Moose::Meta::Attribute
- - added legal_options_for_inheritance (wreis)
-
- * Moose::Cookbook::Snacks::*
- - removed some of the unfinished snacks that should
- not have been released yet. Added some more examples
- and explanation to the 'Keywords' snack. (stevan)
-
+0.52 Thurs. July 3, 2008
* Moose
- added "FEATURE REQUESTS" section to the Moose docs
to properly direct people (stevan) (RT #34333)
(fixed by stevan, found by obra)
- added tests for this (stevan)
+ * Moose::Object
+ - adding support for DOES (as in UNIVERSAL::DOES)
+ (nothingmuch)
+ - added test for this
+
+ * Moose::Meta::Attribute
+ - added legal_options_for_inheritance (wreis)
+ - added tests for this (wreis)
+
+ * Moose::Cookbook::Snacks::*
+ - removed some of the unfinished snacks that should
+ not have been released yet. Added some more examples
+ to the 'Keywords' snack. (stevan)
+
* Moose::Cookbook::Style
- added general Moose "style guide" of sorts to the
cookbook (nothingmuch) (RT #34335)
^TODO$
^PLANS$
^benchmarks
-^\._.*$
\ No newline at end of file
+^\._.*$
+^t\/600_todo_tests\/$
\ No newline at end of file
Chris (perigrin) Prather
+Wallace (wreis) Reis
+
Jonathan (jrockway) Rockway
Piotr (dexter) Roszatycki
Shawn (sartak) Moore
-Wallace (wreis) Reis
-
... and many other #moose folks
=head1 COPYRIGHT AND LICENSE
sub BUILDARGS {
my $class = shift;
-
if (scalar @_ == 1) {
if (defined $_[0]) {
(ref($_[0]) eq 'HASH')
|| confess "Single parameters to new() must be a HASH ref";
return {%{$_[0]}};
- } else {
+ }
+ else {
return {}; # FIXME this is compat behavior, but is it correct?
}
- } else {
+ }
+ else {
return {@_};
}
}
$_[0]->DEMOLISHALL;
}
+# support for UNIVERSAL::DOES ...
sub DOES {
my ( $self, $class_or_role_name ) = @_;
-
- $self->SUPER::DOES($class_or_role_name)
- or
- $self->does($class_or_role_name);
+ if (my $DOES = __PACKAGE__->meta->find_next_method_by_name('DOES')) {
+ return $DOES->body->($self, $class_or_role_name)
+ || $self->does($class_or_role_name);
+ }
+ return $self->isa($class_or_role_name)
+ || $self->does($class_or_role_name);
}
# new does() methods will be created
my ( $role, $method ) = @_;
local $Test::Builder::Level = $Test::Builder::Level + 1;
if ( $role ) {
- ok( $role->has_method($method) || $role->requires_method($method), $role->name . " has or requires method $method" );
+ ok(
+ $role->has_method($method) || $role->requires_method($method),
+ $role->name . " has or requires method $method"
+ );
} else {
fail("role has or requires method $method");
}
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More no_plan => 1;
+use Test::Exception;
+
+BEGIN {
+ use_ok('Moose');
+}
+
+=pod
+
+See this for some details:
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476579
+
+Here is the basic test case, it segfaults, so I am going
+to leave it commented out. Basically it seems that there
+is some bad interaction between the ??{} construct that
+is used in the "parser" for type definitions and threading
+so probably the fix would involve removing the ??{} usage
+for something else.
+
+use threads;
+
+{
+ package Foo;
+ use Moose;
+ has "bar" => (is => 'rw', isa => "Str | Num");
+}
+
+my $thr = threads->create(sub {});
+$thr->join();
+
+=cut
+
+{
+ local $TODO = 'This is just a stub for the test, see the POD';
+ fail('Moose type constraints and threads dont get along');
+}
+
+
+
+