Language::SIOD - Perl bindings to SIOD


Language-SIOD documentation Contained in the Language-SIOD distribution.

Index


Code Index:

NAME

Top

Language::SIOD - Perl bindings to SIOD

VERSION

Top

This document describes version 0.01 of Language::SIOD, released December 26, 2004.

SYNOPSIS

Top

    use Language::SIOD;
    my $siod = Language::SIOD->new;
    print $siod->eval('(+ 1 1)');   # 2

    # See t/*.t in the source distribution for more!

DESCRIPTION

Top

This module provides Perl bindings to an embedded SIOD environment.

SIOD (Scheme in One Defun) is a small-footprint implementation of the Scheme programming language that is provided with some database, Unix programming and CGI scripting extensions.

The documentation is sorely lacking at this moment. For an overview of supported features, please consult t/*.t in the source distribution.

SEE ALSO

Top

http://www.cs.indiana.edu/scheme-repository/imp/siod.html

AUTHORS

Top

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Top


Language-SIOD documentation Contained in the Language-SIOD distribution.
package Language::SIOD;
$Language::SIOD::VERSION = '0.01';

use strict;
use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS $Buffer);
use Language::SIOD_in;

BEGIN {
    @EXPORT_OK = @EXPORT;
    @EXPORT = ();
    %EXPORT_TAGS = ( all => \@EXPORT_OK );
}

sub new {
    process_cla(0, [], 0);
    init_storage();
    init_subrs();
    return bless({}, $_[0]);
}

$Buffer = (' ' x 65535);
sub eval {
    my $self = shift;
    local $Buffer = shift;
    repl_c_string($Buffer, 0, 0, 65535);
    return substr($Buffer, 0, index($Buffer, "\0"));
}

1;

__END__