Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should definitely take a look at
Moose.Moose gives you (among other things) a constructor, accessor methods, and type checking for free!
So in your code you can:
A good starting point is
Moose::ManualandMoose::CookbookIf you just need the basic stuff you can also use
Mousewhich is not as complete, but without most of the compile time penalty.