Amethyst

 view release on metacpan or  search on metacpan

Amethyst/Brain.pm  view on Meta::CPAN

package Amethyst::Brain;

use strict;
use Data::Dumper;
use POE;

sub new {
	my $class = shift;
	my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ };
	return bless $self, $class;
}

sub init {
	my ($self) = @_;

Amethyst/Brain/Infobot/Module/Exchange.pm  view on Meta::CPAN

package Amethyst::Brain::Infobot::Module::Exchange;

use strict;
use vars qw(@ISA
		%CODE2CODE %TLD2CODE %CURR2CODE %COUNTRY2CODE
		%CODE2CURR
				$REFERER $CONVERTER);
use Data::Dumper;
use POE;
use POE::Component::Client::UserAgent;
use HTTP::Request::Common;
use HTTP::Response;
use LWP::UserAgent;	# For init
use Amethyst::Message;
use Amethyst::Brain::Infobot;
use Amethyst::Brain::Infobot::Module;

@ISA = qw(Amethyst::Brain::Infobot::Module);

Amethyst/Brain/Infobot/Module/Google.pm  view on Meta::CPAN

package Amethyst::Brain::Infobot::Module::Google;

use strict;
use vars qw(@ISA);
use Data::Dumper;
use POE;
use POE::Component::Client::UserAgent;
use HTTP::Request::Common;
use HTTP::Response;
use WWW::Search;
use WWW::SearchResult;
use Amethyst::Message;
use Amethyst::Brain::Infobot;
use Amethyst::Brain::Infobot::Module;

Amethyst/Brain/Markov.pm  view on Meta::CPAN

use vars qw(@ISA);
use URI;
use Amethyst::Store;
use Amethyst::Brain;
use Amethyst::Message;
use Algorithm::MarkovChain;

@ISA = qw(Amethyst::Brain);

BEGIN {
	use Data::Dumper;
	print Dumper(\%INC);
}

sub init {
	my $self = shift;
	$self->{Store} = new Amethyst::Store(
					Source	=> 'markov',
						);
	$self->{Chain} = $self->{Store}->get('chain');
	if (!$self->{Chain}) {

Amethyst/Connection.pm  view on Meta::CPAN

package Amethyst::Connection;

use strict;
use Socket qw(AF_INET SOCK_STREAM);
use Data::Dumper;
use POE qw(Wheel::SocketFactory Wheel::ReadWrite
				Filter::Line Driver::SysRW);

sub new {
	my $class = shift;
	my $args = ($#_ == 0) ? { %{ (shift) } } : { @_ };

	die "No name for connection" unless $args->{Name};

	my %states = map { $_ => "handler_$_" } qw(

Amethyst/Connection/Anarres.pm  view on Meta::CPAN

package Amethyst::Connection::Anarres;

use strict;
use vars qw(@ISA);
use POE;
use Data::Dumper;
use Parse::Lex;
use Amethyst::Connection;
use Amethyst::Message;

@ISA = qw(Amethyst::Connection);

# Offsets into the IST_COMPUTER format for machine readable messages.
sub MS_CLASS	() { 0; }
sub MS_CONTENT	() { 1; }	# Might be removed
sub MS_FORMAT	() { 2; }

Amethyst/Connection/IRC.pm  view on Meta::CPAN

package Amethyst::Connection::IRC;

use strict;
use vars qw(@ISA);
use Data::Dumper;
use POE;
use POE::Component::IRC;
use Parse::Lex;
use Amethyst::Connection;
use Amethyst::Message;

@ISA = qw(Amethyst::Connection);

sub handler_init {
	my ($kernel, $session, $heap) = @_[KERNEL, SESSION, HEAP];

dump.pl  view on Meta::CPAN

use strict;
use Data::Dumper;
use Amethyst::Store;

my $file = shift @ARGV;

my $store = new Amethyst::Store(
		Source	=> $file,
			);

my @keys = sort $store->keys;

example.pl  view on Meta::CPAN

# sub POE::Kernel::TRACE_DEFAULT  () { 1 }
sub POE::Kernel::ASSERT_DEFAULT	() { 1 }
# sub POE::Kernel::TRACE_EVENTS  () { 1 }
# sub POE::Kernel::TRACE_QUEUE  () { 1 }
# sub POE::Kernel::TRACE_GARBAGE  () { 1 }
# sub POE::Kernel::TRACE_REFCOUNT  () { 1 }

# use lib qw/./;
use Data::Dumper;
use POE;
use Amethyst;

new Amethyst;

my %anarres = (
		# Amethyst variables
		Name		=> 'anarres',
		Brains		=> [ qw(infobot eliza) ],	# barwench markov
		Alias		=> 'anarres',	# For CNN module

import.pl  view on Meta::CPAN

use strict;
use Data::Dumper;
use Amethyst::Store;

my $store = new Amethyst::Store(
				Source	=> 'factpack',
					);

foreach (<>) {
	next if /^\s*#/;
	next unless /=>/;



( run in 0.579 second using v1.01-cache-2.11-cpan-4d50c553e7e )