There's actually one more problem:
(define (sqaaa y) (* y y)) ;(define square (lambda (x) (* x x))) (define square sqaaa)
leads to:
Subroutine main::square redefined at /usr/local/share/perl/5.8.4/Inline/Guile.pm line 79.
That's because Inline::Guile is simply looking at the code string using a regex /define\s+(\S+)/ and thus misses the comment completely.
I suggest the following solution:
- pass the code string to guile, let it (read) it into a S-EXPR and extract the define symbols and return them to perl.
- then proceed as currently, e.g. do Guile::lookup($name) and check if that is a procedure_p
Christian.
