Adam

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


1.003     2026-03-11 02:08:02Z
        + Administrative update to cleanup the provides for CPAN

1.002     2026-03-08 05:06:55Z
	+ Updated POD: Adam and Moses now document IO::Async support and dual event loop modes
	+ ai-bot example: multi-channel support with per-channel message buffers
	+ ai-bot example: SYSTEM_PROMPT env var for custom system prompt additions
	+ ai-bot example: error messages only shown in main channel
	+ ai-bot example: typing delay now happens BEFORE each line for more human-like output
	+ ai-bot example: info-level logging for all incoming IRC events (public, join, part, quit, PM) with channel/source
	+ Default logger now includes timestamps in [YYYY-MM-DD HH:MM:SS] [level] format
	+ Fixed stray =cut in Adam.pm that hid async() and stop() methods from compilation
	+ Fixed logger timestamps: log_dispatch_conf callback instead of around log

1.001     2026-03-07 19:44:57Z

1.000     2026-03-07 03:12:40Z
	+ Switched to @Author::GETTY Dist::Zilla plugin bundle
	+ Added IO::Async support via ->async() method (requires IO::Async::Loop::POE)
	+ Added ->stop() method for cleanly stopping both POE and IO::Async event loops

ex/ai-bot.pl  view on Meta::CPAN

    my $idle_mins = int($idle_secs / 60);
    $self->info("Idle ping after ${idle_mins}m");
    # Ping first channel only (idle is a global concept)
    my $channel = $self->_default_channel;
    $self->_buffer_message($channel, 'system',
      "No activity for $idle_mins minutes. You can say something if you want, or stay_silent.");
  }
  POE::Kernel->delay( _idle_check => $IDLE_PING );
};

event irc_public => sub {
  my ( $self, $nickstr, $channels, $msg ) = @_[ OBJECT, ARG0, ARG1, ARG2 ];
  my ( $nick ) = split /!/, $nickstr;
  return if $nick eq $self->get_nickname;
  my $channel = ref $channels ? $channels->[0] : $channels;
  $self->info("$channel <$nick> $msg");
  $self->_last_activity(time());
  $self->_buffer_message($channel, $nick, $msg);
};

event irc_join => sub {

lib/Moses/Plugin.pm  view on Meta::CPAN


version 1.003

=head1 DESCRIPTION

The Moses::Plugin module provides a declarative sugar layer for
L<POE::Component::IRC> plugins based on the L<Adam::Plugin> class.

=head2 events

    events qw( S_public S_privmsg );

Declare which IRC events this plugin should listen to. Event names should be
prefixed with C<S_> for server events or C<U_> for user events.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

lib/oses.pm  view on Meta::CPAN

=head1 NAME

oses - A shortcut in the fashion of oose.pm

=head1 VERSION

version 1.003

=head1 SYNOPSIS

    perl -Ilib -Moses=T -MNet::Twitter -e'event irc_public=>sub {
    Net::Twitter->new(username=>$ARGV[0],password=>$ARGV[1])->update($_[ARG2])
    };T->run'

=head1 DESCRIPTION

A source filter shortcut module in the fashion of C<oose.pm> that automatically
adds a package declaration and C<use Moses;> to your code.

=head1 SUPPORT



( run in 2.960 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )