From: Florian Ragwitz Date: Mon, 25 Jan 2010 18:59:52 +0000 (+0000) Subject: Revert "in what case is a numeric comparison called for? I cannot think of one. Is... X-Git-Tag: 5.80019~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=7905feb37e16936e4acd2e21bf65815109b39620 Revert "in what case is a numeric comparison called for? I cannot think of one. Is this the best way to test?" This reverts commit 279b2f1abb0a8e056b8c905e5a4ecb66537ee194. --- diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 5e8a94c..c4717b4 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -84,7 +84,7 @@ sub BUILDARGS { } elsif (Class::MOP::is_class_loaded($_[0]) && $_[0]->isa('Catalyst') && ref($_[1]) eq 'HASH') { $args = $_[1]; - } elsif ($_[0] eq $_[1]) { + } elsif ($_[0] == $_[1]) { $args = $_[1]; } else { $args = +{ @_ }; diff --git a/t/aggregate/unit_core_component.t b/t/aggregate/unit_core_component.t index 9fb578a..69ac6c0 100644 --- a/t/aggregate/unit_core_component.t +++ b/t/aggregate/unit_core_component.t @@ -1,4 +1,4 @@ -use Test::More tests => 23; +use Test::More tests => 22; use strict; use warnings; @@ -91,18 +91,3 @@ is_deeply([ MyApp->comp('Foo') ], \@complist, 'Fallthrough return ok'); is_deeply($args, [qw/foo3 bar3/], 'args passed to ACCEPT_CONTEXT ok'); } -# BUILDARGS logic -{ - { - package MyController; - @MyController::ISA = ('Catalyst::Controller'); - } - my $warning; - local $SIG{__WARN__} = sub { - $warning = shift; - diag($warning); - }; - my $controller = MyController->new('MyApp', undef); - like( $warning, qr/uninitialized value in string eq/, "no warning for == comparison"); - -}