These are essentially Perl structures compatible with JSON. A simple idea comes to mind, convert these to JSON, and zip them. (If necessary, you can convert the live structures into JSON and write files.) In the embedded system, you can unzip the data, streaming into a perl script, convert from JSON to Perl structures, and populate Perl vars.
I haven't looked farther than that, but I suspect there is some simple boilerplate to read in a zipped JSON file and get a ref to the structure. The last piece of the puzzle is putting the data into the expected variables (you have shown %my_flds and %my_def).
Quantum Mechanics: The dreams stuff is made of