How to test Perl roles without creating test classes
Don’t waste time writing test classes, test the role directly
Don’t waste time writing test classes, test the role directly
Learn when and how to use this classic “gang of four” code pattern
Writing accessors in vanilla object oriented Perl doesn’t have to lead to verbose boilerplate code
If you’re using a Perl destructor method (‘DESTROY’, ‘DEMOLISH’) it may not be called if the Perl process is terminated abruptly by a signal. To fix this, just add the sigtrap pragma to your program:
Perl’s flexible syntax accepts all kinds of shenanigans and hackery. This article describes one such trick to call object methods without including the referent object (sort of).
If you need to write object oriented Perl code with no dependencies, then you need to use the old school Perl syntax. This article describes the main features of old school object oriented Perl including class declaration, constructors, destructors, methods, attributes, accessors and inheritance.