Inline::Ruby 0.02
Sponsored Links
Inline::Ruby 0.02 Ranking & Summary
File size:
0.025 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
838
Date added:
2007-07-09
Publisher:
Neil Watkiss
Inline::Ruby 0.02 description
Inline::Ruby module can help you write Perl subroutines and classes in Ruby.
SYNOPSIS
print "9 + 16 = ", add(9, 16), "n";
print "9 - 16 = ", subtract(9, 16), "n";
use Inline Ruby;
__END__
__Ruby__
def add(a, b)
a + b
end
def subtract(a, b)
a - b
end
The Inline::Ruby module allows you to put Ruby source code directly "inline" in a Perl script or module. It sets up an in-process Ruby interpreter, runs your code, and then examines Rubys symbol table, looking for things to bind to Perl.
The process of interrogating the Ruby interpreter only occurs the first time you run your Ruby code. The namespace is cached, and subsequent calls use the cached version. Of course, your Ruby code must still be run every time your run the Perl script -- but Inline::Ruby already knows the results of running it.
Using the Inline::Ruby Module
Using Inline::Ruby will seem very similar to using any other Inline language, thanks to Inlines consistent look and feel.
This section will explain the different ways to use Inline::Ruby. For more details on Inline, see perldoc Inline.
Importing Functions
Using functions defined in Ruby is just like using Perl subs. You just supply the source code to Inline::Ruby, and then use them.
use Inline Ruby => <<END;
def doit
...
end
END
doit();
Importing Classes
If youre written a library in Ruby, its probably object-oriented. Binding Ruby classes to Perl is as easy as telling Ruby to import the class library.
use Inline Ruby;
my $obj = SomeClass->new;
__END__
__Ruby__
# Pretend SomeClass is defined in an external library
require SomeClass
SYNOPSIS
print "9 + 16 = ", add(9, 16), "n";
print "9 - 16 = ", subtract(9, 16), "n";
use Inline Ruby;
__END__
__Ruby__
def add(a, b)
a + b
end
def subtract(a, b)
a - b
end
The Inline::Ruby module allows you to put Ruby source code directly "inline" in a Perl script or module. It sets up an in-process Ruby interpreter, runs your code, and then examines Rubys symbol table, looking for things to bind to Perl.
The process of interrogating the Ruby interpreter only occurs the first time you run your Ruby code. The namespace is cached, and subsequent calls use the cached version. Of course, your Ruby code must still be run every time your run the Perl script -- but Inline::Ruby already knows the results of running it.
Using the Inline::Ruby Module
Using Inline::Ruby will seem very similar to using any other Inline language, thanks to Inlines consistent look and feel.
This section will explain the different ways to use Inline::Ruby. For more details on Inline, see perldoc Inline.
Importing Functions
Using functions defined in Ruby is just like using Perl subs. You just supply the source code to Inline::Ruby, and then use them.
use Inline Ruby => <<END;
def doit
...
end
END
doit();
Importing Classes
If youre written a library in Ruby, its probably object-oriented. Binding Ruby classes to Perl is as easy as telling Ruby to import the class library.
use Inline Ruby;
my $obj = SomeClass->new;
__END__
__Ruby__
# Pretend SomeClass is defined in an external library
require SomeClass
Inline::Ruby 0.02 Screenshot
Inline::Ruby 0.02 Keywords
Ruby 0.02
Ruby
Write Perl Subroutines
Write Perl
perl subroutines
can help
Perl
module
inline
using
code
subroutines
Inline::Ruby
InlineRuby
Inline::Ruby 0.02
Libraries
Bookmark Inline::Ruby 0.02
Inline::Ruby 0.02 Copyright
WareSeeker periodically updates pricing and software information of Inline::Ruby 0.02 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Inline::Ruby 0.02 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
how to write perl
write perl module
perlane
module master
write perl script
la perla
write perl program
that perl subroutines
lunar module
perlina handbags
perl tutorial
module allows users
write perl function
perl subroutines arguments
open file write perl
perlembagaan malaysia
perlini silver
modules
Related Software
Inline::CPP is a Perl module that can write Perl subroutines and classes in C++. Free Download
Inline::Filters Perl module contains common source code filters for Inline Modules. Free Download
Inline::Java lets you write Perl classes in Java and wrap/use existing Java classes. Free Download
Inline::C is a Perl module that can Write Perl Subroutines in C. Free Download
Inline-API is a Perl module that teach you how to bind a programming language to Perl using Inline.pm. Free Download
Inline::Octave module contains inline octave code into your perl. Free Download
PerlIO is a Perl module created to load on demand PerlIO layers and root of PerlIO::* name space. Free Download
Inline::Java::PerlInterpreter is a Perl module used to call Perl directly from Java using Inline::Java. Free Download
Latest Software
Popular Software
Favourite Software