Source code for "Functional Refactoring" presentation.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
00-start
01-employee
02-factor
03-modify
04-arguments
05-columns
06-functions
07-builders
08-builders
09-iterator
10-refactor
11-data-source
t
.gitignore
README.md
cpanfile
cpanfile.snapshot
customer.db
customer.txt
employee.db

README.md

Functional Refactoring in Perl

Functional programming is the oldest but least well known of the three major programming paradigms. While it has a reputation for inscrutability, many of its tenets can be applied to both procedural and object-oriented paradigms to reduce complexity and create cleaner code. In this workshop we'll get a taste of functional programming in Perl and apply the techniques we learn to refactoring and removing common procedural problems related to strong coupling.

This repo contains code examples from the corresponding presentation found here.

Running Examples

To run the examples, cd to the repo base, then:

$ perl 03-modify/customer.pl
$ perl 08-builders/employee.pl

Running Tests

To run tests, cd to the repo base, then set the TEST_DIR environment variable to point to the directory you want to test:

$ TEST_DIR=09-iterator ct prove -lv t