From: Dave Rolsky Date: Fri, 5 Dec 2008 02:17:14 +0000 (+0000) Subject: This todo test is now partially implemented. The other part is not X-Git-Tag: 0.62_02~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0668ef02836253c443b2584b87c15aea10e149dd;p=gitmo%2FMoose.git This todo test is now partially implemented. The other part is not going to be fixed unless we can inline method modifiers. --- diff --git a/t/600_todo_tests/004_inlined_constructor_modified_new.t b/t/600_todo_tests/004_inlined_constructor_modified_new.t deleted file mode 100644 index 6679437..0000000 --- a/t/600_todo_tests/004_inlined_constructor_modified_new.t +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 6; - -my ($around_new); -{ - package Foo; - use Moose; - - around new => sub { my $o = shift; $around_new = 1; $o->(@_); }; - has 'foo' => (is => 'rw', isa => 'Int'); - - package Bar; - use Moose; - extends 'Foo'; - Bar->meta->make_immutable; -} - -my $orig_new = Foo->meta->find_method_by_name('new'); -isa_ok($orig_new, 'Class::MOP::Method::Wrapped'); -$orig_new = $orig_new->get_original_method; -isa_ok($orig_new, 'Moose::Meta::Method'); - -Foo->meta->make_immutable(debug => 0); -my $inlined_new = Foo->meta->find_method_by_name('new'); -isa_ok($inlined_new, 'Class::MOP::Method::Wrapped'); -$inlined_new = $inlined_new->get_original_method; - -TODO: -{ - local $TODO = 'but it isa Moose::Meta::Method instead'; - isa_ok($inlined_new, 'Moose::Meta::Method::Constructor'); -} - -Foo->new(foo => 100); -ok($around_new, 'around new called'); - -$around_new = 0; -Bar->new(foo => 100); - -TODO: -{ - local $TODO = 'but it is not called'; - ok($around_new, 'around new called'); -}