dari prof,
1:48:06 PM Prof: mantaaaab http://code.google.com/p/ruby-perl/
1:48:47 PM ArieKeren: howah
The library's primary aim is to make the wealth of libraries on CPAN available
to
Ruby. It should also serve as an easier approach to glue different-language
software projects, or as a language migration path.
It is based on Yoshidam's Perl library, with some minor updates and fixes. It
builds on that work by offloading a lot of meta-magic to a Ruby script which
attempts to perform introspection on Perl classes (using Devel::Symdump), and
creating classes in Ruby with appropriate methods.
It still needs a fair bit of work, but currently you can do this kind of thing
(require hacking a la ruby-python):
require 'perl'
require 'perl/spreadsheet/parse_excel'
# put class in top-level namespace. Perl is currently a class so you can't
include
Spreadsheet = Perl::Spreadsheet
# extend perl class in ruby
class Spreadsheet::ParseExcel
class Worksheet
def inspect
# Worksheet is a blessed hash, "instance variables" are hash members
"#<#{self.class}:#{self['Name']}>"
end
end
end
book = Spreadsheet::ParseExcel::Workbook.parse 'test.xls'
# note that the array of worksheets is stored in this hash key:
p book['Worksheet']
# => [#<Perl::Spreadsheet::ParseExcel::Worksheet:Sheet1>]
makin banyak pilihan nih kita rubyist, ada spreadsheet dari ruby, juga ada dari
CPAN yang sekelas monster heboh. mantap!
svn checkout http://ruby-perl.googlecode.com/svn/trunk/ ruby-perl
http://groups.google.com/group/comp.lang.ruby/search?group=comp.lang.ruby&q=ruby-perl&qt_g=Search+this+group
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb?key=ruby-perl&cginame=namazu.rb&submit=Search&dbname=ruby-talk&max=50&whence=0
--
Arie || ariekeren, YM!=riyari3, http://ariekusumaatmaja.wordpress.com
http://groups.yahoo.com/groups/id-ruby, Bow! My favorite : UCHIHA ITACHI !
"Never say RTFM. Turn the trolls into committers", Audrey Tang -
conisli-ofun.pdf