Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Perl OOP

by sundialsvc4 (Abbot)
on Jul 05, 2017 at 15:29 UTC ( #1194260=note: print w/replies, xml ) Need Help??

in reply to Perl OOP

As others have now said, the Perl5 implementation of objects is, shall we say, “grafted onto” the language, not designed into it.   Essentially, it revolves around the verb, bless, which associates a package with a memory-variable so that the -> nomenclature can be used against it.   Other packages, specifically Moose and its brethren, provide further “wrappers” to make things a little bit easier, but all of these are written in Perl5 and so cannot entirely escape nor make up for its lack of built-in class features a la Java or C#.

The Perl6 language, which is really an entirely different beast, did implement, within its core language, some (but not all) of the features that you are used to from your prior-language experience.

Despite its simplicity, the Perl5 object implementation is efficient, even with Moose.   But, at least at first, you will perhaps be caught off-guard by the general lack of a compile-time, and the error-tests which customarily occur at that time.   Perl is not a “strongly typed” language:   in fact, it is typeless.   Perl will compile and run scripts and catch (or, maybe not catch) errors at runtime which you might be accustomed to have been trapped before the program ever started to run.   It is a “DWIM = Do What I Mean™” language that may or may not actually know what you mean.   Therefore, you will probably experience a few “impedance mismatch” moments as you get the hang of things.

Replies are listed 'Best First'.
Re^2: Perl OOP
by jdporter (Canon) on Jul 07, 2017 at 14:52 UTC
    As others have now said

    Exactly. So why do you feel the need? You haven't added any information of any value to the OP.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1194260]
[choroba]: Good morning!

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-06-22 07:30 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (122 votes). Check out past polls.