[Rt-commit] r2022 - in mzscheme: . Language-MzScheme
Language-MzScheme/lib/Language Language-MzScheme/t
autrijus at bestpractical.com
autrijus at bestpractical.com
Tue Dec 21 12:09:07 EST 2004
Author: autrijus
Date: Tue Dec 21 12:09:06 2004
New Revision: 2022
Removed:
mzscheme/Language-MzScheme/SIGNATURE
Modified:
mzscheme/ (props changed)
mzscheme/Language-MzScheme/Changes
mzscheme/Language-MzScheme/MANIFEST
mzscheme/Language-MzScheme/MANIFEST.SKIP
mzscheme/Language-MzScheme/META.yml
mzscheme/Language-MzScheme/Makefile.PL
mzscheme/Language-MzScheme/README
mzscheme/Language-MzScheme/lib/Language/MzScheme.pm
mzscheme/Language-MzScheme/t/0-signature.t
mzscheme/Language-MzScheme/t/1-basic.t
Log:
r6830 at not: autrijus | 2004-12-22 01:03:11 +0800
* Installing this module no longer requires SWIG. Yay!
* Fixed a spurious warning from t/1-basic.t.
Modified: mzscheme/Language-MzScheme/Changes
==============================================================================
--- mzscheme/Language-MzScheme/Changes (original)
+++ mzscheme/Language-MzScheme/Changes Tue Dec 21 12:09:06 2004
@@ -1,101 +1,108 @@
+[Changes for 0.09 - December 22, 2004]
+
+* Installing this module no longer requires SWIG. Yay!
+
+* Fixed a spurious warning from t/1-basic.t.
+
[Changes for 0.08 - June 15, 2004]
-Object and Environment now has ->val and ->sym to easily create
-MzScheme objects from Perl.
+* Object and Environment now has ->val and ->sym to easily create
+ MzScheme objects from Perl.
-Fixed building and eliminated segmentation faults on Mac OS X.
+* Fixed building and eliminated segmentation faults on Mac OS X.
[Changes for 0.07 - June 15, 2004]
-MzPerl now correctly supports end-of-file as end of ";__PERL__;" regions.
+* MzPerl now correctly supports end-of-file as end of ";__PERL__;" regions.
-All MzScheme code are now evaluated in Language::MzScheme::Env::__eval;
-this made Spiffy-based modules (eg. IO::All) work better.
+* All MzScheme code are now evaluated in Language::MzScheme::Env::__eval;
+ this made Spiffy-based modules (eg. IO::All) work better.
-Avoid importing invalid symbols, such as '(OVERLOAD', into MzScheme space.
+* Avoid importing invalid symbols, such as '(OVERLOAD', into MzScheme space.
-Adds nifty call/cc example to bin/mzperl's POD.
+* Adds nifty call/cc example to bin/mzperl's POD.
-Suppressed harmless warnings under -w.
+* Suppressed harmless warnings under -w.
[Changes for 0.06 - June 14, 2004]
-Beginning of at least some module documentations.
+* Beginning of at least some module documentations.
-Massive refactoring for Perl method wrappers, resulting in better
-error handling and more robust symbol importing.
+* Massive refactoring for Perl method wrappers, resulting in better
+* error handling and more robust symbol importing.
-The script/mzperl program now supports inlined Perl code, via
-;__PERL__; ... ;__END__; blocks.
+* The script/mzperl program now supports inlined Perl code, via
+ ;__PERL__; ... ;__END__; blocks.
[Changes for 0.05 - June 13, 2004]
-Much more efficient vector<=>arrayref type conversion.
+* Much more efficient vector<=>arrayref type conversion.
-Context symbols added to function definition and runtime object
-invocation with sigils; the default context is to interpret it
-as scalar if only one value has been returned, and as a list otherwise.
+* Context symbols added to function definition and runtime object
+ invocation with sigils; the default context is to interpret it
+ as scalar if only one value has been returned, and as a list otherwise.
-Objects and code references now preserve their identity when
-casted into scheme object and later dereferenced with ->as_perl_data.
+* Objects and code references now preserve their identity when
+ casted into scheme object and later dereferenced with ->as_perl_data.
-Environment is now created with Language::MzScheme->new, which adds
-perl-specific bindings (perl-use, perl-require, perl-do, perl-eval)
-on top of the basic env.
+* Environment is now created with Language::MzScheme->new, which adds
+ perl-specific bindings (perl-use, perl-require, perl-do, perl-eval)
+ on top of the basic env.
-New utility, script/mzperl, a perl-embedded mzscheme interpreter.
+* New utility, script/mzperl, a perl-embedded mzscheme interpreter.
-Full round-trip for non-self-referential data structures now works;
-you can now pass unblessed references into scheme. (Blessed references
-already works as object closures.)
+* Full round-trip for non-self-referential data structures now works;
+ you can now pass unblessed references into scheme. (Blessed references
+ already works as object closures.)
-Proper error handling; scheme-level errors are turned into "die" calls.
-Calls within eval{} will return scheme_undefined, but $SIG{__DIE__} will
-catch the actual error.
+* Proper error handling; scheme-level errors are turned into "die" calls;
+ calls within eval{} will return scheme_undefined, but $SIG{__DIE__} will
+ catch the actual error.
-Object closure invocation now demands a method instead of silently dying.
+* Object closure invocation now demands a method instead of silently dying.
-Extensive tests for context, object, data, perl-calls and error handling.
+* Extensive tests for context, object, data, perl-calls and error handling.
[Changes for 0.04 - June 11, 2004]
-Backported to SWIG 1.3.19 and earlier versions.
+* Backported to SWIG 1.3.19 and earlier versions.
+
+* Methods refactored into Language::MzScheme::Object and
+ Language::MzScheme::Env classes.
-Methods refactored into Language::MzScheme::Object and
-Language::MzScheme::Env classes.
+* All scheme value types turned into properly overloaded Perl objects;
+ type checking methods, eg. ->isa('CODE'), are also implemented.
-All scheme value types turned into properly overloaded Perl objects.
-Type checking methods, eg. ->isa('CODE'), are also implemented.
+* Deep copying into perl data structure supported as $obj->as_perl_data.
-Deep copying into perl data structure supported as $obj->as_perl_data.
+* Previously exported symbols now become class methods for Language::MzScheme,
+ with the prefix 'mzscheme_', 'scheme_' and 'SCHEME_' removed.
-Previously exported symbols now become class methods for Language::MzScheme,
-with the prefix 'mzscheme_', 'scheme_' and 'SCHEME_' removed.
+* Transparent procedure calls across perl/scheme boundaries.
-Transparent procedure calls across perl/scheme boundaries.
+* Perl objects and classes may now be bound as scheme primitives.
-Perl objects and classes may now be bound as scheme primitives.
-To invoke perl objects from scheme, do this:
+* To invoke perl objects from scheme, do this:
(object 'method arg1 arg2 ...)
[Changes for 0.03 - June 9, 2004]
-Build cleanly on SWIG 1.3.21, which we now requires.
+* Build cleanly on SWIG 1.3.21, which we now require.
-It is now possible to insert Perl subroutines as MzScheme primitives.
-(See t/1-basic.t for how.)
+* It is now possible to insert Perl subroutines as MzScheme primitives.
+ (See t/1-basic.t for how.)
-Perl-based primitives can both accept and return lists of any size.
+* Perl-based primitives can both accept and return lists of any size.
[Changes for 0.02 - June 7, 2004]
-Worked around automatic "swig -shadow" on Mac OS X, by not rebuilding
-lib/Language/MzScheme_in.pm by default.
+* Worked around automatic "swig -shadow" on Mac OS X, by not rebuilding
+ lib/Language/MzScheme_in.pm by default.
-All publicly supported functions from "schemex.h" are now wrapped.
+* All publicly supported functions from "schemex.h" are now wrapped.
-Fixed ithreads building problem by setting scheme_set_stack_base().
+* Fixed ithreads building problem by setting scheme_set_stack_base().
[Changes for 0.01 - June 7, 2004]
-Initial CPAN Release.
+* Initial CPAN Release.
Modified: mzscheme/Language-MzScheme/MANIFEST
==============================================================================
--- mzscheme/Language-MzScheme/MANIFEST (original)
+++ mzscheme/Language-MzScheme/MANIFEST Tue Dec 21 12:09:06 2004
@@ -11,6 +11,7 @@
lib/Language/MzScheme.pm
lib/Language/MzScheme/Env.pm
lib/Language/MzScheme/Object.pm
+lib/Language/MzScheme_in.pm
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
@@ -18,9 +19,10 @@
mzscheme.c
mzscheme.h
mzscheme.i
+mzscheme_wrap.c
+mzscheme_wrap.h
README
script/mzperl
-SIGNATURE
t/0-signature.t
t/1-basic.t
t/2-context.t
Modified: mzscheme/Language-MzScheme/MANIFEST.SKIP
==============================================================================
--- mzscheme/Language-MzScheme/MANIFEST.SKIP (original)
+++ mzscheme/Language-MzScheme/MANIFEST.SKIP Tue Dec 21 12:09:06 2004
@@ -11,10 +11,9 @@
^.*\.hi
^scheme
^MzScheme
-^mzscheme_wrap
+^mzscheme_wrap\.(?![ch])
^blibdirs
^pm_to_blib
-^lib/Language/MzScheme_in.pm
~$
\.old$
^#.*#$
Modified: mzscheme/Language-MzScheme/META.yml
==============================================================================
--- mzscheme/Language-MzScheme/META.yml (original)
+++ mzscheme/Language-MzScheme/META.yml Tue Dec 21 12:09:06 2004
@@ -1,5 +1,5 @@
name: Language-MzScheme
-version: 0.08
+version: 0.09
abstract: Perl bindings to PLT MzScheme
author: Autrijus Tang <autrijus at autrijus.org>
license: perl
@@ -9,4 +9,4 @@
no_index:
directory:
- inc
-generated_by: Module::Install version 0.33
+generated_by: Module::Install version 0.36
Modified: mzscheme/Language-MzScheme/Makefile.PL
==============================================================================
--- mzscheme/Language-MzScheme/Makefile.PL (original)
+++ mzscheme/Language-MzScheme/Makefile.PL Tue Dec 21 12:09:06 2004
@@ -14,9 +14,6 @@
install_script('script/mzperl');
can_cc() or die "This module requires a C compiler";
-my ($swig_version) = (run('swig', '-version') =~ /([\d\.]+)/g)
- or die "SWIG not found - http://www.swig.org/";
-
my ($mz_version) = (run('mzscheme', '--version') =~ /([\d\.]+)/g)
or die "MzScheme not found - http://plt-scheme.org/software/mzscheme/";
@@ -29,26 +26,30 @@
};
my $include = "$plt_path/include";
--d $include or die "Cannot find 'include' dir under $plt_path; please set \$ENV{PLT_PATH}";
+-d $include or die "Cannot find 'include' path under $plt_path; please set \$ENV{PLT_PATH}";
-make_h();
+if (-e 'inc/.author') {
+ my ($swig_version) = (run('swig', '-version') =~ /([\d\.]+)/g)
+ or die "SWIG not found - http://www.swig.org/";
-system(
- 'swig',
- "-I$include",
- ((v($swig_version) ge v('1.3.20')) ? qw(-noproxy) : ()),
- qw(-module Language::MzScheme -includeall -exportall -perl5 mzscheme.i)
-);
+ (v($swig_version) ge v('1.3.24'))
+ or die "SWIG 1.3.24+ not found - http://www.swig.org/";
+
+ make_h();
-#make_c();
+ system(
+ 'swig',
+ "-I$include",
+ qw(-noproxy -module Language::MzScheme -includeall -exportall -perl5 mzscheme.i)
+ );
-unlink('lib/Language/MzScheme_in.pm');
-rename('MzScheme.pm' => 'lib/Language/MzScheme_in.pm');
+ unlink('lib/Language/MzScheme_in.pm');
+ rename('MzScheme.pm' => 'lib/Language/MzScheme_in.pm');
+}
makemaker_args(
- LIBS => "-L$plt_path/lib -lmzgc -lmzscheme ".run(qw(swig -perl -ldflags)),
+ LIBS => "-L$plt_path/lib -lmzgc -lmzscheme",
INC => "-I$include",
-# OPTIMIZE => '-g',
OBJECT => "mzscheme_wrap$Config{obj_ext}",
);
@@ -127,6 +128,9 @@
sub run {
my ($wtr, $rdr, $err);
+
+ local $SIG{__WARN__} = sub { 1 };
+
my $pid = open3($wtr, $rdr, $err, @_);
my $out = join('', map $_ && readline($_), $rdr, $err);
chomp $out;
Modified: mzscheme/Language-MzScheme/README
==============================================================================
--- mzscheme/Language-MzScheme/README (original)
+++ mzscheme/Language-MzScheme/README Tue Dec 21 12:09:06 2004
@@ -6,8 +6,7 @@
* Prerequisites
-- The C++ Compiler used to compile your perl installation
-- SWIG v1.3 or above - http://www.swig.org/
+- The compiler used to compile your perl installation
- MzScheme v200 or above - http://plt-scheme.org/software/mzscheme/
* Installation
Modified: mzscheme/Language-MzScheme/lib/Language/MzScheme.pm
==============================================================================
--- mzscheme/Language-MzScheme/lib/Language/MzScheme.pm (original)
+++ mzscheme/Language-MzScheme/lib/Language/MzScheme.pm Tue Dec 21 12:09:06 2004
@@ -1,5 +1,5 @@
package Language::MzScheme;
-$Language::MzScheme::VERSION = '0.08';
+$Language::MzScheme::VERSION = '0.09';
use strict;
use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS);
@@ -19,8 +19,8 @@
=head1 VERSION
-This document describes version 0.08 of Language::MzScheme, released
-June 15, 2004.
+This document describes version 0.09 of Language::MzScheme, released
+December 22, 2004.
=head1 SYNOPSIS
Modified: mzscheme/Language-MzScheme/t/0-signature.t
==============================================================================
--- mzscheme/Language-MzScheme/t/0-signature.t (original)
+++ mzscheme/Language-MzScheme/t/0-signature.t Tue Dec 21 12:09:06 2004
@@ -1,24 +1,23 @@
-#!/usr/bin/perl
-
+#!/usr/bin/perl -w
use strict;
-print "1..1\n";
-
-if (!-s 'SIGNATURE') {
- print "ok 1 # skip No signature file found\n";
+if (!eval { require Module::Signature; 1 }) {
+ print "1..0 # Skip ",
+ "Next time around, consider installing Module::Signature, ",
+ "so you can verify the integrity of this distribution.\n";
+} elsif ( !-e 'SIGNATURE' ) {
+ print "1..0 # Skip SIGNATURE not found\n";
+} elsif ( !-s 'SIGNATURE' ) {
+ print "1..0 # Skip SIGNATURE file empty\n";
+} elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) {
+ print "1..0 # Skip ",
+ "Cannot connect to the keyserver to check module signature\n";
+} else {
+ print "1..1\n";
+ my $ret = Module::Signature::verify();
+ if ($ret eq Module::Signature::CANNOT_VERIFY()) {
+ print "ok 1 # skip Module::Signature cannot verify\n";
+ } else {
+ ($ret == Module::Signature::SIGNATURE_OK()) or print "not ";
+ print "ok 1 # Valid signature\n";
+ }
}
-elsif (!eval { require Module::Signature; 1 }) {
- print "ok 1 # skip ",
- "Next time around, consider installing Module::Signature, ",
- "so you can verify the integrity of this distribution.\n";
-}
-elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) {
- print "ok 1 # skip ",
- "Cannot connect to the keyserver\n";
-}
-else {
- (Module::Signature::verify() == Module::Signature::SIGNATURE_OK())
- or print "not ";
- print "ok 1 # Valid signature\n";
-}
-
-__END__
Modified: mzscheme/Language-MzScheme/t/1-basic.t
==============================================================================
--- mzscheme/Language-MzScheme/t/1-basic.t (original)
+++ mzscheme/Language-MzScheme/t/1-basic.t Tue Dec 21 12:09:06 2004
@@ -50,8 +50,8 @@
my $sym = $env->sym('symbol');
ok($env->S->SYMBOLP($sym), 'new symbol with ->sym');
-my $str = $env->val('value');
-ok($env->S->STRINGP($str), 'new value with ->val');
+my $val = $env->val('value');
+ok($env->S->STRINGP($val), 'new value with ->val');
my $code = $env->lookup('square');
isa_ok($code, 'CODE', 'to_coderef');
More information about the Rt-commit
mailing list