curiouswebster
asked on
Perl and Object Oriented Development
I am new to the Perl syntax but have used OOP from Pascal, to C++ to C#.
Can you give me an example of the syntax for using OOP in Perl?
Thanks.
Can you give me an example of the syntax for using OOP in Perl?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I would use the latest version of Perl, I presume.
I am trying to learn how I would code a report analysis tool which would "consume" the data from a merchant credit card statement, make some calculations, and output an analysis of that report.
PCI issues aside, I have a high bar on getting the technology to handle this logic and would feel much more comfortable knowing whether the OOP support of Perl is up for the task.
I am trying to learn how I would code a report analysis tool which would "consume" the data from a merchant credit card statement, make some calculations, and output an analysis of that report.
PCI issues aside, I have a high bar on getting the technology to handle this logic and would feel much more comfortable knowing whether the OOP support of Perl is up for the task.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The documentation link provided by Dan is to the built-in Perl 5 OOP. For Perl 5 Moose OOP, one tutorial is https://perlmaven.com/object-oriented-perl-using-moose
ASKER
Is it better to use Perl 6 and the built-in OOP capabilities?
Or, Perl 5 and Moose?
It seems Perl 6 skills would be more re-usable, no?
Or, Perl 5 and Moose?
It seems Perl 6 skills would be more re-usable, no?
Is Perl 6 the latest version of Perl?
ASKER
Here is what they say at Perl.Org
https://www.perl.org/
"Perl 6 is a sister language, part of the Perl family, not intended as a replacement for Perl 5, but as its own thing - libraries exist to allow you to call Perl 5 code from Perl 6 programs and vice versa."
So, that raise the question, which version if better for me to try and master? I want to have the best OOP capabilities available with Perl.
https://www.perl.org/
"Perl 6 is a sister language, part of the Perl family, not intended as a replacement for Perl 5, but as its own thing - libraries exist to allow you to call Perl 5 code from Perl 6 programs and vice versa."
So, that raise the question, which version if better for me to try and master? I want to have the best OOP capabilities available with Perl.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So, is this something like a "fork" in the language? Will Perl 5 and Perl 6 continue on with its own unique features?
Why could they not make Perl6 the new version of Perl5?
Are there features which are mutually exclusive? Where Perl6 contains features which would replace still viable features in Perl?
I think understanding this "split" is key before I choose which to use...
Thanks.
Why could they not make Perl6 the new version of Perl5?
Are there features which are mutually exclusive? Where Perl6 contains features which would replace still viable features in Perl?
I think understanding this "split" is key before I choose which to use...
Thanks.
Why PERL? Why not Python?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I saw this awesome video which makes Perl 6 looks very expressive and very code efficient...
Look what just three lines can do compared to so may more lines in about a dozen languages, and much better than Python 3.
https://www.youtube.com/watch?v=lpu-3UF_b48
Is Python going to beat Perl 6? This video may change a few minds...
When did Perl 6 come out?
Look what just three lines can do compared to so may more lines in about a dozen languages, and much better than Python 3.
https://www.youtube.com/watch?v=lpu-3UF_b48
Is Python going to beat Perl 6? This video may change a few minds...
When did Perl 6 come out?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
If Perl 5, what sort of OOP do you want to use in Perl? The built-in OOP is limited compared to a lot of other languages. Most OOP people highly recommend Moose (or derivatives) for OOP.
If Perl 6, it has much better built-in OOP.
Honestly, I'm not the best person to give examples of any of the Perl OOP as I rarely use OOP.