in reply to memory consumption
Extending what bangers and Corion said already, you can ask Mech to not keep a history if you need or prefer to have a single object (this was documented incorrectly in earlier versions but I think it's worked for a long time-
$mech->stack_depth(0)
|
|---|