From: Justin Hunter Date: Mon, 27 Sep 2010 21:10:06 +0000 (-0700) Subject: database_events needs to be an ArrayRef X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05e37c4fd7e9183c8b5db722d4a820bda8b0fa52;p=dbsrgits%2FSQL-Translator-2.0-ish.git database_events needs to be an ArrayRef --- diff --git a/lib/SQL/Translator/Object/Trigger.pm b/lib/SQL/Translator/Object/Trigger.pm index 2bd60d5..c212be8 100644 --- a/lib/SQL/Translator/Object/Trigger.pm +++ b/lib/SQL/Translator/Object/Trigger.pm @@ -94,7 +94,8 @@ class SQL::Translator::Object::Trigger extends SQL::Translator::Object { around BUILDARGS(ClassName $self: @args) { my $args = $self->$orig(@args); - $args->{_database_events} = delete $args->{database_events} || []; + my $database_events = delete $args->{database_events}; + $args->{_database_events} = ref $database_events ? $database_events : [ $database_events ]; return $args; }