On Mon, 19 Oct 2020 02:44:25 +0000, Stefan Ram wrote: > Mladen Gogala <mgog...@yahoo.com> writes: >>In Perl, there are no classes. > > If there are no classes in Perl, then what does > > bless REF,CLASSNAME > > do?
bless \$ref will make the given reference a reference to the class. And classes is Perl are called "modules". However, Perl classes are not the classes in the real sense. There is no inheritance. You can have a similar thing in C: it's called "struct", it can do similar things like Perl modules. But C isn't object oriented. Inheritance is an essential characteristic of object orientation. There were attempts to turn Perl into OO language with Moose (https://metacpan.org/pod/Moose) However, Moose is complex, tedious and rarely used. Perl6 is an OO language, but nobody uses it. The problem is CPAN and all the Perl5 modules which are not compatible with Perl6 or "Roku" as it is known. -- Mladen Gogala Database Consultant http://mgogala.byethost5.com -- https://mail.python.org/mailman/listinfo/python-list