Group
Extension

Matches 7

Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Weak.pod ( view source; MetaCPAN )
$object->{what}->frobozz; # called on $ref1 if still alive

   # TO_JSON always returns undef
   my $will_be_undef = $object->TO_JSON;


=head1 DESCRIPTION

This module provides a little wrapper class
on't have
to worry about circular references.

Additionally, when some JSON encoder tries to encode this object calling
L</TO_JSON>, it will get C<undef> back. This comes handy if you want to
e.g. def
rns C<$object> for possible chaining.

=head2 B<< TO_JSON >>

   my $this_is_undef = $object->TO_JSON;

Return C<undef>. This will be called by JSON encoders when configured to
do so for blessed objec
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Role/WebHook.pod ( view source; MetaCPAN )
 huh?
   }

   sub parse_request {
      my ($self, $request) = @_;
      my @updates = $request->json;
      return @updates;
   }

   sub render_response {
      my ($self, $controller, $response, $
= $response->{chat_id}
         // $update->{message}{chat}{id};
      return $controller->render(json => $response);
   }

   1;

=head1 DESCRIPTION

This is an updates receiver and dispatcher role f
ssage::Request> and return all the updates
inside.

Defaults to just returning C<< $req->json >>, i.e. the JSON decoding of
the request's content, which should work in most cases. You should
override 
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Role/Source.pod ( view source; MetaCPAN )
 huh?
   }

   sub parse_request {
      my ($self, $request) = @_;
      my @updates = $request->json;
      return @updates;
   }

   sub render_response {
      my ($self, $controller, $response, $
= $response->{chat_id}
         // $update->{message}{chat}{id};
      return $controller->render(json => $response);
   }

   1;

=head1 DESCRIPTION

This role abstracts elements that identify a sour
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Role/WebHook.pm ( view source; MetaCPAN )
>handler($args);
   return $r->$method($p => $h);
} ## end sub install_route

sub parse_request { # most APIs rely on JSON... let's leverage this
   my ($self, $req) = @_;
   return $req->json;
}

1;
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Role/UserAgent.pod ( view source; MetaCPAN )
        GET => 'http://frobozz.example.com/v1/whatever',
         {Accept => 'application/json'},
         json => $message
      );
   }
   1;

=head1 DESCRIPTION

This role adds some user-agent capa
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Role/Sender.pod ( view source; MetaCPAN )
        GET => 'http://frobozz.example.com/v1/whatever',
         {Accept => 'application/json'},
         json => $message
      );
   }
   1;

=head1 DESCRIPTION

This is a sender role for bots.

=h
Bot-ChatBots ( P/PO/POLETTIX/Bot-ChatBots-0.014.tar.gz, POLETTIX, 2018; MetaCPAN )
Bot-ChatBots/lib/Bot/ChatBots/Weak.pm ( view source; MetaCPAN )
args) {
      my ($key, $value) = splice @args, 0, 2;
      $self->{$key} = $value;
      weaken($self->{$key}) if ref $value;
   }
   return $self;
} ## end sub set

sub TO_JSON { return undef }

1;

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