I have no time for the moment to review your code and probably i would catch no issue, but if you are interested in performance, gives a try to
Sereal a relatively new serialization module with impressive
performances.
You can also profit the read of the thread where afoken describes Data::Dumper JSON Storable YAML differences
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.