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_limitare treated as the default512when 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.