From: gfx Date: Fri, 14 Aug 2009 02:26:05 +0000 (+0900) Subject: Fix _strip_command in Moose::Exporter X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e73f040e0ce396c1323da6f54868a7aca6603ff0;p=gitmo%2FMoose.git Fix _strip_command in Moose::Exporter --- diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index e4fdbf0..ab90144 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -361,6 +361,7 @@ sub _strip_command { else { ${$slot_ref} = $arg; } + $i--; } } return; diff --git a/t/010_basics/023_extends_command.t b/t/010_basics/023_extends_command.t index 72f0c1a..4ac8ca4 100755 --- a/t/010_basics/023_extends_command.t +++ b/t/010_basics/023_extends_command.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; use Test::Exception; ok(T3->isa('T1'), 'extablish is-a relationship at compile-time'); @@ -23,6 +23,13 @@ ok(T3->isa('T1'), 'extablish is-a relationship at compile-time'); use Moose -extends => 'T2'; } +{ + package T4; + use Moose + -metaclass => 'Moose::Meta::Class', + -extends => 'T3'; +} + lives_and { isa_ok(T1->new, 'T1'); }; @@ -37,3 +44,7 @@ lives_and { isa_ok(T3->new, 'T2'); isa_ok(T3->new, 'T3'); }; + +lives_and { + isa_ok(T4->new, 'T3'); +};