Inline::SLangInline::SLang can write Perl subroutines in S-Lang. | |
Download |
Inline::SLang Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Doug Burke
- Publisher web site:
- http://search.cpan.org/~djburke/Inline-SLang-1.00/SLang.pod
Inline::SLang Tags
Inline::SLang Description
Inline::SLang can write Perl subroutines in S-Lang. Inline::SLang can write Perl subroutines in S-Lang.SYNOPSIS use Inline SLang; print "9 + 16 = ", add(9,16), "n"; print "9 - 16 = ", subtract(9,16), "n"; print JAxH('Inline'), "n"; __END__ __SLang__ define add (a,b) { return a + b; } define subtract (a,b) { return a - b; } define JAxH () { variable type = (); return sprintf( "Just Another %S Hacker!", type ); }The Inline::SLang module lets you write Perl subroutines in S-Lang. It dynamically translates the parameters and return values into native data types for both languages (or into Perl classes that are used to represent S-Lang types with no direct translation to Perl). This allows you to write a Perl script and take advantage of S-Lang whenever you wish: perhaps there is a S-Lang module that you wish to use, or you want to take advantage of a S-Lang function that you have written.The module sets up an in-process S-Lang interpreter, runs your code, and then examines the interpreter's symbol table, looking for things to bind to Perl. The process of interrogating the S-Lang interpreter only occurs the first time you run your S-Lang code. The namespaces are cached, and subsequent calls use the cached version (which is hidden in the _Inline directory; see the Inline documentation for details of how the code is cached). Of course, your S-Lang code must still be run every time your run the Perl script -- but Inline::S-Lang already knows the results of running it.Requirements:· Perl Requirements: · Perl
Inline::SLang Related Software