stack_depth#

Return the current scalar recursion limit used while freezing and thawing.

Σύνοψη#

use Storable;
my $d = Storable::stack_depth();

Τι επιστρέφεται#

The integer value of $Storable::recursion_limit. This is the maximum nesting depth the serialiser will follow before aborting with a recursion error. The default is 512; assigning to $Storable::recursion_limit changes what the next call returns.

Παραδείγματα#

Raise the limit for a particularly deep structure:

local $Storable::recursion_limit = 4096;
my $bytes = freeze($deep_tree);

Οριακές περιπτώσεις#

  • Zero or negative values of $Storable::recursion_limit are treated as the default 512 when serialising.

Διαφορές από το upstream#

Fully compatible with upstream. Pinned by t/81-xs-native/Storable/240-stack-depth.t.

Δείτε επίσης#

  • stack_depth_hash - the separate limit used for hash serialisation.

  • freeze / thaw - the consumers of this limit.