use strict;
use warnings;
-our $VERSION = '1.00';
+our $VERSION = '1.62';
-use JSON;
+use JSON::MaybeXS 'to_json';
sub produce {
my $translator = shift;
'fields' => scalar $trigger->fields,
'on_table' => scalar $trigger->on_table,
'action' => scalar $trigger->action,
+ (defined $trigger->scope ? (
+ 'scope' => scalar $trigger->scope,
+ ) : ()),
keys %{$trigger->extra} ? ('extra' => { $trigger->extra } ) : (),
};
}
=head1 SEE ALSO
-SQL::Translator, JSON, http://www.json.org/.
+SQL::Translator, JSON::MaybeXS, http://www.json.org/.
=head1 AUTHORS