From: Justin Hunter Date: Tue, 27 Jul 2010 03:19:28 +0000 (-0700) Subject: fix database_events X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b100149134bda5d233ee03b80f89bf9cac424acf;p=dbsrgits%2FSQL-Translator-2.0-ish.git fix database_events --- diff --git a/lib/SQL/Translator/Object/Trigger.pm b/lib/SQL/Translator/Object/Trigger.pm index 5e324b5..2bd60d5 100644 --- a/lib/SQL/Translator/Object/Trigger.pm +++ b/lib/SQL/Translator/Object/Trigger.pm @@ -90,4 +90,12 @@ class SQL::Translator::Object::Trigger extends SQL::Translator::Object { } method is_valid { 1 } + + around BUILDARGS(ClassName $self: @args) { + my $args = $self->$orig(@args); + + $args->{_database_events} = delete $args->{database_events} || []; + + return $args; + } }