ict;
use warnings;
use Moo;
use Types::Standard qw(ArrayRef);
use Path::Tiny;
use JSON;
use overload '""' => \&json;
our $VERSION = 0.16;
has objects => (
is => 'rw',
isa => Array
tropo => \@objects,
};
return $data;
}
sub json {
my ($self) = @_;
my $data = $self->perl;
my $string = JSON->new->encode( $data );
return $string;
}
sub ad
to => $clients_phone_number,
);
$tropo->say( 'hello ' . $client_name );
$tropo->json;
Creates this JSON output:
{
"tropo":[
{
"call": {
=> Str,
required => 1,
);
has from => (
is => 'ro',
isa => Str,
exclude_from_json => 1,
);
has ['network', 'channel'] => (
is => 'ro',
isa => Str,
);
has 'answer_on_med