• MORE:
  • Perl Camel
  • rss
  • GitHub logo
Perl.com
  •   ABOUT
  •   AUTHORS
  •   CATEGORIES
  • #
      TAGS

How to test Perl roles without creating test classes

Oct 16, 2014 by David Farrell

development
object
test_more
role_tiny
unit
mock
fake
role_basic
bless
sub

Don’t waste time writing test classes, test the role directly

Read it

Implementing the singleton pattern in Perl

Dec 11, 2013 by David Farrell

development
object_oriented
object
pattern
gof

Learn when and how to use this classic “gang of four” code pattern

Read it

Add Moose-style attribute accessors to your Perl classes

Nov 25, 2013 by David Farrell

development
class
object
attribute
method
typeglob

Writing accessors in vanilla object oriented Perl doesn’t have to lead to verbose boilerplate code

Read it

Use roles in object oriented Perl with Role::Tiny

Nov 11, 2013 by David Farrell

development
module
object_oriented
object
role

Get roles / traits with minimal overhead

Read it

Perl destructor not being called? Here's why

Aug 27, 2013 by David Farrell

development
object_oriented
object
signal
sigint
destructor
sigtrap

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:

Read it

Call object methods without an object reference

Aug 3, 2013 by David Farrell

development
object_oriented
object
method
wizardry

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).

Read it

Old School Object Oriented Perl

May 20, 2013 by David Farrell

development
object_oriented
old_school_perl
class
object
attribute
inheritance

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.

Read it
Page 1 of 1
Site Map
  • Home

  • About

  • Authors

  • Categories

  • Tags

Contact Us

To get in touch, send an email to perl.com-editor@perl.org, or submit an issue to perladvent/perldotcom on GitHub.

Perl Camel rss GitHub logo

License

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Creative Commons License

Legal

Perl.com and the authors make no representations with respect to the accuracy or completeness of the contents of all work on this website and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. The information published on this website may not be suitable for every situation. All work on this website is provided with the understanding that Perl.com and the authors are not engaged in rendering professional services. Neither Perl.com nor the authors shall be liable for damages arising herefrom.