theory/fsa-rules — pull request #5 by glasswalk3r (2013-10-29 21:33:55+00:00)
Title: A small refactoring to tests and added a new test case

Moved all parsing and object creation to the anonymous sub as suggested.
After that, the third tests passes as expected.
Then I added the usage of Devel::Gladiator and Test::Gladiator to count the references to test at each iteration (which fails after the first one) and produce the following report at the end of it:

```
ARRAY|1321|1465|1573
CODE|536|551|566
FSA::State|20|30|40
GLOB|953|954|954
HASH|274|313|352
REF|566|798|994
REF-ARRAY|158|272|350
REF-CODE|97|142|187
REF-FSA::State|56|84|112
REF-HASH|90|129|168
REF-Regexp|12|18|24
Regexp|12|18|24
SCALAR|10156|10303|10447
```
Please do not consider the entries ARRAY, CODE, GLOB and SCALAR for now. Everything else should be removed at each iteration since those references are created (and should be removed) at the end of run() method.

I'm not sure if this is being caused by misusing of FSA::Rules or if Test::Weaken is not checking references as deep as Devel::Gladiator does, but I'm sure that memory from perl interpreter is increased at each iteration.