AI-MegaHAL

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.04_02   Jan 31 2007
        - Removed inclusion of <getopt.h> in libmegahal.c

0.04_01   Oct 03 2006
new maintainer: Alexandr Ciornii
        - Integrated my patch to compile under Mingw and MSVC
        - Submitted this patch for C library.
          See https://alioth.debian.org/tracker/index.php?func=detail&aid=303914&group_id=30393&atid=410992
        - License (GPL from C library)
        - META.yml
        - Fix compilation error under FreeBSD. Tested on FreeBSD 5.4.

0.04  Thu Jan 22 21:09:18 PST 2004
	- Moved from MegaHAL -> AI::MegaHAL namespace
	- Included sources from the MegaHAL distribution - should no longer
	  have to download and install as a separate shared library.

0.03  Sat Feb  3 17:01:32 2001
	- Minor fix for a warning that I apparently didn't notice in 0.02
          (Still involving the 'our' reserved word.)

META.json  view on Meta::CPAN

   "name" : "AI-MegaHAL",
   "no_index" : {
      "directory" : [
         "t",
         "inc"
      ]
   },
   "prereqs" : {
      "build" : {
         "requires" : {
            "Test::More" : "0.47"
         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {}
      }

META.yml  view on Meta::CPAN

---
abstract: Perl interface to the MegaHAL natural language conversation simulator.
author:
  - 'Alexandr Ciornii <alexchorny@gmail.com>'
build_requires:
  Test::More: 0.47
configure_requires:
  ExtUtils::MakeMaker: 0
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.78, CPAN::Meta::Converter version 2.143240'
license: open_source
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: AI-MegaHAL
no_index:

Makefile.PL  view on Meta::CPAN

    },
    'NAME'          => 'AI::MegaHAL',
    'VERSION_FROM'  => 'lib/AI/MegaHAL.pm',
    ABSTRACT_FROM => 'lib/AI/MegaHAL.pm',
    AUTHOR => 'Alexandr Ciornii <alexchorny@gmail.com>',
    'LICENSE' => 'gpl',
    'OBJECT' => 'MegaHAL.o libmegahal.o',
    PREREQ_PM    => {
    },
    BUILD_REQUIRES    => {
        'Test::More'      => '0.47',
    },
    $^O =~/win/i ? (
        dist => {
            TAR      => 'ptar',
            TARFLAGS => '-c -C -f',
        },
    ) : (),
);

sub WriteMakefile1 {  #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.

libmegahal.c  view on Meta::CPAN


#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#ifndef _MSC_VER
#include <unistd.h>
//#include <getopt.h>
#endif
#if !defined(AMIGA) && !defined(__mac_os) && !defined(__FreeBSD__) && !defined(__APPLE__)
// FreeBSD malloc.h is empty and gives error
// Tested on FreeBSD 5.4
#include <malloc.h>
#endif
#include <string.h>
#include <signal.h>
#include <math.h>
#include <time.h>
#include <ctype.h>
#if defined(__mac_os)
#include <types.h>
#include <Speech.h>

t/pod.t  view on Meta::CPAN

#!perl -T

use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
all_pod_files_ok();

t/test.t  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test;
BEGIN { plan tests => 6 };

use AI::MegaHAL;

ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test module is use()ed here so read
# its man page ( perldoc Test ) for help writing this test script.

print("Creating new AI::MegaHAL\n");
my $megahal = AI::MegaHAL->new(AutoSave => 1);
ok(ref($megahal) ne "", 1);

print("#Testing AI::MegaHAL->do_reply method\n");

my $query = "#We are the knights who say NI!";
print("# * Sending: $query\n");
my $reply = $megahal->do_reply($query);
print("# * Replied: $reply\n");
ok($reply ne "", 1);

print("#Destroying MegaHAL - should autosave brain and dictionary files\n");
$megahal = undef;
ok(1);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.316 second using v1.00-cache-2.02-grep-82fe00e-cpan-585fae043c8 )