SNS::Notification - An object for representing SNS Notifications
use SNS::Notification; my $not = SNS::Notification->new( Timestamp => ... ... required attributes ... ); #do something with $obj my $body = decode_json($sns_message); my $sns = eval { SNS::Notification->new($body) }; if ($@) { die "Doesn't look like an SNS::Message to me"; } print $sns->Message;
This module holds an object for representing an SNS messsage. It tries to validate that all appropiate fields are present.
This is really just a module for other modules that work with SNS to depend on (and not reimplement it constantly).
http://docs.aws.amazon.com/sns/latest/dg/json-formats.html
http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html
http://docs.aws.amazon.com/sns/latest/dg/SendMessageToSQS.html
Copyright (c) 2016 by CAPSiDE
This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.
To install SNS::Notification, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNS::Notification
CPAN shell
perl -MCPAN -e shell install SNS::Notification
For more information on module installation, please visit the detailed CPAN module installation guide.