X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F200_examples%2F002_example_Moose_POOP.t;h=a7e01533d07f8235d184927a7760a4573832f6d0;hb=d0caa5e58a8ebd292a03261b31af6764ba0caa22;hp=029812357be13aafaed04445c8c0b3db86ae4f37;hpb=0f051d5873315b99bfe3a6dd0eae8a1d4f509444;p=gitmo%2FMoose.git diff --git a/t/200_examples/002_example_Moose_POOP.t b/t/200_examples/002_example_Moose_POOP.t index 0298123..a7e0153 100644 --- a/t/200_examples/002_example_Moose_POOP.t +++ b/t/200_examples/002_example_Moose_POOP.t @@ -10,7 +10,7 @@ BEGIN { plan skip_all => "DBM::Deep 1.0003 (or greater) is required for this test" if $@; eval "use DateTime::Format::MySQL;"; plan skip_all => "DateTime::Format::MySQL is required for this test" if $@; - plan tests => 89; + plan tests => 88; } use Test::Exception; @@ -24,9 +24,7 @@ END { unlink('newswriter.db') if -e 'newswriter.db'; } -BEGIN { - use_ok('Moose'); -} + =pod @@ -139,9 +137,10 @@ BEGIN { extends 'Moose::Meta::Class'; override 'construct_instance' => sub { - my ($class, %params) = @_; - return $class->get_meta_instance->find_instance($params{oid}) - if $params{oid}; + my $class = shift; + my $params = @_ == 1 ? $_[0] : {@_}; + return $class->get_meta_instance->find_instance($params->{oid}) + if $params->{oid}; super(); };