Group
Extension

Matches 1

Mail-SendGrid-SmtpApiHeader ( P/PO/POTYL/Mail-SendGrid-SmtpApiHeader-0.02.tar.gz, POTYL, 2013; MetaCPAN )
Mail-SendGrid-SmtpApiHeader/lib/Mail/SendGrid/SmtpApiHeader.pm ( view source; MetaCPAN )
package Mail::SendGrid::SmtpApiHeader;

use strict;
use warnings;

use JSON;

our $VERSION = '0.02';

sub new {
  my $class = shift;
  return bless { 'data' => { } },  ref $class || $class;
}


sub ad
 $JSON;
sub asJSON {
  my $self = shift;
  $JSON ||= _build_json();
  return $JSON->encode($self->{data});
}


my $JSON_PRETTY;
sub asJSONPretty {
  my $self = shift;
  $JSON_PRETTY ||=  _build_json()
(1);
  return $JSON_PRETTY->encode($self->{data});
}


sub as_string {
  my $self = shift;
  my $json = $self->asJSON;
  $json =~ s/(.{1,72})(\s)/$1\n   /g;
  my $str = "X-SMTPAPI: $json";
  return $s

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.