From: Jesse Luehrs Date: Mon, 18 Oct 2010 01:37:44 +0000 (-0500) Subject: this test should be for definedness X-Git-Tag: 1.16~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=692a93f66801387a1cfd42fe5dc984364f1347ae;p=gitmo%2FMoose.git this test should be for definedness --- diff --git a/lib/Moose/Error/Default.pm b/lib/Moose/Error/Default.pm index 2588083..a5c44de 100644 --- a/lib/Moose/Error/Default.pm +++ b/lib/Moose/Error/Default.pm @@ -17,7 +17,7 @@ Class::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait'); sub new { my ( $self, @args ) = @_; - if(exists $ENV{MOOSE_ERROR_STYLE} && $ENV{MOOSE_ERROR_STYLE} eq 'croak') { + if (defined $ENV{MOOSE_ERROR_STYLE} && $ENV{MOOSE_ERROR_STYLE} eq 'croak') { $self->create_error_croak( @args ); } else {