opic;
use strict;
use warnings;
our $VERSION = '2.0';
use base qw(Amazon::SNS::V4::Topic);
use JSON;
# add messagegroupid and deduplicationid for FIFO
sub Publish
{
my ($self, $msg, $subj, $group
$structure = undef;
my $attributes = undef;
# support JSON payload
if (ref($msg) eq 'HASH') {
$structure = 'json';
$msg = encode_json($msg);
}
if (defined($attr) and ref($attr) eq 'HASH')
e JSON;
__PACKAGE__->mk_accessors(qw/ sns arn /);
sub Publish
{
my ($self, $msg, $subj, $attr) = @_;
# XXX croak on invalid arn
my $structure = undef;
my $attributes = undef;
# support JSON
payload
if (ref($msg) eq 'HASH') {
$structure = 'json';
$msg = encode_json($msg);
}
if (defined($attr) and ref($attr) eq 'HASH') {
my $i = 1;
foreach my $key (keys %$attr) {
$attrib
e JSON;
__PACKAGE__->mk_accessors(qw/ sns arn /);
sub Publish
{
my ($self, $msg, $subj, $attr) = @_;
# XXX croak on invalid arn
my $structure = undef;
my $attributes = undef;
# support JSON
payload
if (ref($msg) eq 'HASH') {
$structure = 'json';
$msg = encode_json($msg);
}
if (defined($attr) and ref($attr) eq 'HASH') {
my $i = 1;
foreach my $key (keys %$attr) {
$attrib