Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Learning classes in Perl

by GotToBTru (Prior)
on Feb 19, 2016 at 13:08 UTC ( [id://1155636]=note: print w/replies, xml ) Need Help??


in reply to Learning classes in Perl

The constructor is not automatically created for you, which is why Perl complains it can't locate the method 'new'. Doing OO in Perl is kind of clunky, which is why most people like to use packages like Moose or Moo or any one of several others. Many of them do things like automatically creating constructors, getters and setters, and handling alot of the overhead issues for you.

This comes with a cost of added complexity, but if you're really going to code OO in Perl, it is worth your time to invest in learning. You will get that time back multiplied many times in coding and maintenance.

But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1155636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found