File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What about perl?

 
Daniel Prene
Ranch Hand
Posts: 241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems this section's description has neglected perl... why? Perl Object Oriented Programing (or POOP for short) is quite effective... If you're going to mention python, why not perl? I'd certainly be watching posts here night and day... Perl is my second favorite programming language. (My first being java of course). And don't say POOP doesn't support inheritance, that's just foolish.

Just a thought from a huge perl fan,
Cheers!
 
Daniel Prene
Ranch Hand
Posts: 241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and I'd jump on any perl questions posters might have.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last time i read about OOP, i remember reading that Perl does support inheritance - are'nt the super/base classes specified in an array in a perl module..i dont remeber the name of the array though..had some wierd name ?

Also remember the book mentioning that OOP in perl is more of an after thought rather than 'by design'?...probably thats why the moderator did'nt choose to add perl in the list
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a lot of poop at JavaRanch -- check out back behind the Pig Pen.
 
Daniel Prene
Ranch Hand
Posts: 241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then why not bring it to this forum? It's as oop capable as python... with alot of additional plusses.

Humbly,
-D.P.
 
Henry Wong
author
Marshal
Pie
Posts: 20833
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
Then why not bring it to this forum? It's as oop capable as python... with alot of additional plusses.

Humbly,
-D.P.


I am also a big fan of Perl. Great language to churn out quick and dirty code. IMO, I think there are tons of people here who favor Perl.

My guess is that Groovy, Python, and Ruby, are mentioned, less due to popularity, and more due to its relationship / integration with Java.

Henry
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually Perl is mentioned - it's included in the "etc."! Did you expect us to enumerate *all* of the OO scripting languages out there?
 
Henry Wong
author
Marshal
Pie
Posts: 20833
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:
Actually Perl is mentioned - it's included in the "etc."! Did you expect us to enumerate *all* of the OO scripting languages out there?


For some reason, I am reminded of the Professor and Mary Ann...

Henry
 
Daniel Prene
Ranch Hand
Posts: 241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you expect us to enumerate *all* of the OO scripting languages out there?

Just the good ones...
Sorry for causing trouble, thank you for atvleast reading my post...
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And don't forget the main reson for not explicitly mentioning perl: There are a ton of web sites dedicated to perl. The great majority of perl questions will likely have already been answered at some of these other places.

Of course; if you value the famous Java Ranch friendliness and don't mind getting answers from people who mostly work in other languages - ask away!
 
Ryan McGuire
Ranch Hand
Posts: 1048
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Karthik Guru:
Last time i read about OOP, i remember reading that Perl does support inheritance - are'nt the super/base classes specified in an array in a perl module..i dont remeber the name of the array though..had some wierd name ?

Also remember the book mentioning that OOP in perl is more of an after thought rather than 'by design'?...probably thats why the moderator did'nt choose to add perl in the list


Mmmmmm.... Obj Ori Perl.

Perl Support for Inheritance:
If you define the @ISA list for a package (class), any sub (method) calls that aren't handled explicitly by the current package, are searched for in the packages listed in the package's @ISA list.



Ok, that was fairly straightforward. But why is @ISA a list instead of a scalar? To support multiple inheritance.

One last "feature" is the AUTOLOAD sub. If you try to call a sub that isn't defined in a package or any of its @ISA packages, the AUTOLOAD sub is tried in each of those.

Frinstance,
Let's say...
- There's "base" packages A and B
- package C has @ISA=("B");
- package D has @ISA=("C", "A");

You try calling foo() on a D. Perl will look for the following subs:
- D::foo
- C::foo
- B::foo (depth first up the inheritance tree)
- A::foo
- UNIVERSAL::foo
- D::AUTOLOAD
- C::AUTOLOAD
- B::AUTOLOAD
- A::AUTOLOAD
- UNIVERSAL::AUTOLOAD

This setup allows any number of labor saving conventions.
[ December 07, 2005: Message edited by: Ryan McGuire ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic