# Coming from Perl question

**URL:** <https://www.ruby-forum.com/t/coming-from-perl-question/65397>\
**Category:** Ruby\
**Created:** [August 17, 2006, 10:31pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397 "2006-08-17T22:31:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 17, 2006, 10:31pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/1 "2006-08-17T22:31:50Z")

</div>

I’m looking to switch from perl to something more object oriented. I’m  
trying to decide between ruby and python, but I’m having some issues  
with some aspects of ruby. The language looks great to me, but I am  
interested in how it is extended (for things like network programming,  
oracle connectivity, extra fancy date manipulation, things like that).  
rubyforge seems to be the central location for these things, but it  
isn’t entirely obvious how to get things installed properly or in a  
“standard” way, and if I did manage to get them installed, it’s not  
obvious how to use them.

I guess I was hoping for CPAN for ruby (I’m sure that’s come up a few  
billion times here). Or at least some sort of page like this:

> **[Library and Extension FAQ](https://docs.python.org/3/faq/library.html)**
>
> Contents: Library and Extension FAQ- General Library Questions- How do I find a module or application to perform task X?, Where is the math.py (socket.py, regex.py, etc.) source file?, How do I mak...

that tells how to find out the information i’m looking for. Can anyone  
help out a newbie?

Thanks!

Brian

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 17, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/2 "2006-08-17T22:45:22Z")

</div>

On 8/17/06, Brian H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m looking to switch from perl to something more object oriented. I’m  
> trying to decide between ruby and python, but I’m having some issues  
> with some aspects of ruby. The language looks great to me,

Good decision then 😉

but I am

> interested in how it is extended (for things like network programming,  
> oracle connectivity, extra fancy date manipulation, things like that).  
> rubyforge seems to be the central location for these things, but it  
> isn’t entirely obvious how to get things installed properly or in a  
> “standard” way, and if I did manage to get them installed, it’s not  
> obvious how to use them.
> 
> I guess I was hoping for CPAN for ruby (I’m sure that’s come up a few  
> billion times here).

Strangely enough not at all!

Or at least some sort of page like this:

> [Library and Extension FAQ — Python 3.11.4 documentation](http://www.python.org/doc/faq/library/)
> 
> that tells how to find out the information i’m looking for. Can anyone  
> help out a newbie?

Try the Ruby Application Archive [http://raa.ruby-lang.org/](http://raa.ruby-lang.org/)  
The famous Pickaxe book has a good chapter about extending  
[Programming Ruby: The Pragmatic Programmer's Guide](http://www.ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html) (  
[Programming Ruby: The Pragmatic Programmer's Guide](http://www.ruby-doc.org/docs/ProgrammingRuby/) for frames )  
And do not forget the Ruby Hackers Guide ML.

Hope that helps  
Robert

–  
Deux choses sont infinies : l’univers et la bÃªtise humaine ; en ce qui  
concerne l’univers, je n’en ai pas acquis la certitude absolue.

- Albert Einstein

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 17, 2006, 10:54pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/3 "2006-08-17T22:54:23Z")

</div>

On Fri, 18 Aug 2006, Robert D. wrote:

> > I guess I was hoping for CPAN for ruby (I’m sure that’s come up a few  
> > billion times here).
> 
> Strangely enough not at all!

Search the archives. This is indeed a recurring topic.

However, in a nutshell, for the OP:

The majority of projects these days are hosted at Rubyforge.  
The majority also have listings at RAA ([http://raa.ruby-lang.org](http://raa.ruby-lang.org)).

These are non-identical majorities with a lot of overlap, so when  
hunting  
for something, it’s a good idea to search both places.

A more or less standard package distribution format is the RubyGem.  
Read all about it here:

[http://docs.rubygems.org/](http://docs.rubygems.org/)

Once you have gems installed in your Ruby installation, you can do  
something like this:

gem install mime-types

RTM for details on everything else you can do.

Kirk H.

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 17, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/4 "2006-08-17T23:39:30Z")

</div>

On 8/17/06, Brian H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m looking to switch from perl to something more object oriented. I’m  
> trying to decide between ruby and python, but I’m having some issues  
> with some aspects of ruby. The language looks great to me, but I am  
> interested in how it is extended (for things like network programming,  
> oracle connectivity, extra fancy date manipulation, things like that).  
> rubyforge seems to be the central location for these things, but it  
> isn’t entirely obvious how to get things installed properly or in a  
> “standard” way, and if I did manage to get them installed, it’s not  
> obvious how to use them.

I found ruby fairly intuitive coming from a mostly perl background.  
network programming is pretty easy. Database connectivity is pretty  
good, although I haven’t used the oracle adaptors. There is ruby-dbi  
which is similar to perl dbi. The one thing I do miss is Date::Manip.  
Nothing like it in ruby that I have found. Ruby regular expressions  
aren’t quite as powerful as perl’s, but more then adequate. I do like  
all the little methods in ruby that make doing the simple stuff easy,  
like string.ljust, etc… Some stuff takes a while to get used to  
though, like the fact that everything is an object. Variable  
assignment has it’s quirks that have caught me a few times.

For things on rubyforge you can usually just ‘gem install packagename’  
from your local server and it will grab it from rubyforge and install  
it. Stuff on raa you have to pull down and run ‘ruby setup.rb’  
yourself.

I’ve written a couple of decent sized apps in python and a ton of perl  
code over the years, but the more i use ruby the more I like it.

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 17, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/5 "2006-08-17T23:03:23Z")

</div>

On 8/17/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Fri, 18 Aug 2006, Robert D. wrote:
> 
> > > I guess I was hoping for CPAN for ruby (I’m sure that’s come up a few  
> > > billion times here).
> > 
> > Strangely enough not at all!
> 
> Search the archives. This is indeed a recurring topic.

54 times in 6 months, whatever you say.

I guess OP felt better with my reply, but obviously you did not!

Sorry

–  
Deux choses sont infinies : l’univers et la bÃªtise humaine ; en ce qui  
concerne l’univers, je n’en ai pas acquis la certitude absolue.

- Albert Einstein

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 18, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/6 "2006-08-18T16:40:40Z")

</div>

Brian H. wrote:

> What’s the easiest way to figure out what this “RubyMail” does and how  
> to use it?

I’m new to Ruby, too, but I’ve already come across this question on my  
own learning. My solution was to simply open up the source code and  
look through it. If it’s commented even halfway well, it’ll be very  
obvious what everything does.

I know this isn’t nearly as easy as a proper set of examples, but it’s  
usually enough to get started and quite often enough to do what you  
need.

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 18, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/7 "2006-08-18T16:24:01Z")

</div>

Robert D. wrote:

> On 8/17/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > On Fri, 18 Aug 2006, Robert D. wrote:
> 
> 54 times in 6 months, whatever you say.
> 
> I guess OP felt better with my reply, but obviously you did not!
> 
> Sorry

I was mostly just looking for the most up to date anyway, so both  
answers are appreciated. 😉

I had actually found [raa.ruby-lang.org](http://raa.ruby-lang.org), so finding the modules looks to  
be not THAT difficult, but finding usage info for them could be  
problematic.

For example, I’m interested in sending an email with ruby. So I go to  
[raa.ruby-lang.org](http://raa.ruby-lang.org) and look through “libraries” and find RubyMail. The  
description says, “lightweight mail library containing various mail  
utility classes and modules”. It sounds like it might do what I want.  
From this: [http://raa.ruby-lang.org/project/rubymail/](http://raa.ruby-lang.org/project/rubymail/) I can see links to  
download the module, see changes, the project homepage on rubyforge, and  
the author’s email address. No usage info.

Ok, so I’ll go to the homepage. It’s here:  
[http://rubyforge.org/projects/rubymail/](http://rubyforge.org/projects/rubymail/). Again, I can see the  
requirements/dependencies, a changelog, and I can download the module.  
There’s even a forum here, but it’s empty. Still no usage help. I could  
ask on the forum, but that seems inefficient.

What’s the easiest way to figure out what this “RubyMail” does and how  
to use it?

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 18, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/8 "2006-08-18T18:48:25Z")

</div>

William C. wrote:

> I’m new to Ruby, too, but I’ve already come across this question on my  
> own learning. My solution was to simply open up the source code and  
> look through it. If it’s commented even halfway well, it’ll be very  
> obvious what everything does.

Man, I was hoping it wouldn’t come to that, since you’d have to download  
and possibly install a module before deciding if it’s something you even  
need.

However, I just noticed here:

[http://www.ruby-doc.org/docs/ProgrammingRuby/](http://www.ruby-doc.org/docs/ProgrammingRuby/)

That there are plenty of useful modules for networking (including  
smtp!). There’s even a date class in the standard library! I should be  
able to build any modules I’m missing from those building blocks without  
too much trouble.

Neat!

Brian

---

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [August 18, 2006, 8:24pm UTC](https://www.ruby-forum.com/t/coming-from-perl-question/65397/9 "2006-08-18T20:24:10Z")

</div>

On 8/17/06, Robert D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 8/17/06, Brian H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I guess I was hoping for CPAN for ruby (I’m sure that’s come up a few  
> > billion times here).  
> > Strangely enough not at all!

Not recently, especially since the introduction of RubyGems and  
their hosting on RubyForge, but in the past, it was quite common to hear  
people say something like “we need something like CPAN”.

-austin
