How to save and compress a Moose object using Perl?

I created the package using Moose, and I would like nstoresome large instances. The resulting binaries are very large (500 + MB), so I would like to compress them.

What is the best way to do this? Should I open the file descriptor with bzip, etc., then save with fd_nstore?

+3
source share
3 answers

With MooseX :: Storage , most of them are already made for you - you just need to specify the serialization and I / O format.

+5
source

, , , .

, , , ? , , (, Moose lazy + builder lazy_build), , . , , , .

, - Storable, STORABLE_freeze STORABLE_thaw, Storable.

. MooseX:: Storage , , , , .

+4

Source: https://habr.com/ru/post/1767780/


All Articles