Cover image: ​“Everyone’s a crit­ic — graifit­ti under Mancunian Way in Manchester” by Alex Pepperhill is licensed under CC BY-ND 2.0


Class::Struct​’s main claim to…

Introduction: The current state of play

Perl has ​”very min­i­mal” sup­port for object-oriented (OO) pro­gram­ming out of the box by its own admis­sion. It’s class-based but class­es are just pack­ages used dif­fer­ent­ly. Objects are just data struc­tures blessed into a class, meth­ods are just sub­rou­tines whose first argu­ment is an object or class name, and attributes/​properties are often just the key-value pair of a hash stored in the object. (This last is a fea­ture shared with JavaScript, whose prototype-based objects are just col­lec­tions of key-value pairs with the keys addressed as prop­er­ties.) You’ve got poly­mor­phism, inher­i­tance, and it’s up to you to enforce encap­su­la­tion.

Regular expressions


Mark Gardner

Just another desperate Perl hacker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store