Group
Extension

Matches 10

Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot.pm ( view source; MetaCPAN )
o '["help"]' > hubot-scripts.json
    $ hubot
    hubot> hubot help
    hubot> exit

=head1 DESCRIPTION

=head2 CONFIGURATION

describe scripts name to F<hubot-scripts.json>

example)

    [
      "he
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot.pod ( view source; MetaCPAN )
o '["help"]' > hubot-scripts.json
    $ hubot
    hubot> hubot help
    hubot> exit

=head1 DESCRIPTION

=head2 CONFIGURATION

describe scripts name to F<hubot-scripts.json>

example)

    [
      "he
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Message.pm ( view source; MetaCPAN )
ift->done(1) }

sub TO_JSON {
    my $self = shift;
    return {
        ## prvent recursive call
        ## Hubot::UserTO_JSON -> Hubot::Message::TO_JSON -> Hubot::User::TO_JSON
        user => {
   


sub match {
    my ( $self, $regex ) = @_;
    return $self->text =~ m/$regex/;
}

override 'TO_JSON' => sub {
    my $self = shift;
    return { %{ super() }, text => $self->text };
};

__PACKAGE__
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Brain.pm ( view source; MetaCPAN )
must be a B<Scalar> or B<HashRef> or B<ArrayRef>.

C<$robot-E<gt>brain-E<gt>data> will convert to json string and stored to external storage.
so, if you trying to store perl object, it will fail.

wit
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/User.pm ( view source; MetaCPAN )

    my ( $class, $ref ) = @_;
    $ref->{name} ||= $ref->{id};
    bless $ref, $class;
}

sub TO_JSON { return { %{ shift() } } }

1;

=pod

=encoding utf-8

=head1 NAME

Hubot::User - storage object
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Robot.pm ( view source; MetaCPAN )
 CLI. named `hubot`
    $ perldoc hubot

    # make sure `hubot-scripts.json` is exist in current working directory
    use JSON::XS;
    use Cwd 'cwd';
    use Hubot::Robot;
    my $robot = Hubot::Ro
ptsFile = "$cwd/hubot-scripts.json";
            if (-f $scriptsFile) {
                my $json = read_file($scriptsFile);
                my $scripts = decode_json($json);
                $robot->lo
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Adapter/Campfire.pm ( view source; MetaCPAN )

extends 'Hubot::Adapter';

use AnyEvent;
use AnyEvent::HTTP;
use AnyEvent::Campfire::Client;
use JSON::XS;
use Encode 'encode_utf8';
use HTTP::Request;
use LWP::UserAgent;
use Try::Tiny;

use Hubot::
                ),
                );
                $req->header( 'Accept',        'application/json' );
                $req->header( 'Authorization', $bot->authorization );
                my $res
cess;

                my $userData;
                try {
                    $userData = decode_json( $res->content );
                }
                catch {
                    $bot->emit( 'erro
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Scripts/tweet.pm ( view source; MetaCPAN )
t::Scripts::tweet;
{
  $Hubot::Scripts::tweet::VERSION = '0.1.3';
}
use strict;
use warnings;
use JSON::XS;

sub load {
    my ( $class, $robot ) = @_;
    $robot->hear(
        qr/https?:\/\/(mobile\
ps://api.twitter.com/1/statuses/show/'
                  . $msg->match->[1]
                  . '.json' )->get(
                sub {
                    my ( $body, $hdr ) = @_;
                    r
^2/ );
                    print "$body\n" if $ENV{DEBUG};
                    my $tweet = decode_json($body);
                    $msg->send("$tweet->{user}{screen_name}: $tweet->{text}");
          
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Scripts/shorten.pm ( view source; MetaCPAN )
se strict;
use warnings;
use URI;
use URI::QueryParam;
use HTTP::Request;
use LWP::UserAgent;
use JSON::XS;
use Encode 'decode';

sub load {
    my ( $class, $robot ) = @_;
    $robot->hear(
        q
$ENV{HUBOT_BITLY_API_KEY},
                    longUrl => $bitly,
                    format  => 'json'
                );
                my $ua  = LWP::UserAgent->new;
                my $req = HTTP
>request($req);
                return unless $res->is_success;
                my $data = decode_json( $res->content );
                $bitly = $data->{data}{url};
            }

            $msg->h
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot/Creator.pm ( view source; MetaCPAN )
 qw(
        .gitignore
        Procfile
        README.md
        cpanfile
        hubot-scripts.json
    );

    for my $file (@files) {
        my ( $src, $dst )
            = ( catfile("$dist_dir/

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