… | |
… | |
217 | decoded, as they need manual cleanup to avoid memory leaks, so code that |
217 | decoded, as they need manual cleanup to avoid memory leaks, so code that |
218 | isn't prepared for this will not leak memory. |
218 | isn't prepared for this will not leak memory. |
219 | |
219 | |
220 | If C<$enable> is false (the default), then C<decode> will throw an error |
220 | If C<$enable> is false (the default), then C<decode> will throw an error |
221 | when it encounters a self-referential/cyclic data structure. |
221 | when it encounters a self-referential/cyclic data structure. |
|
|
222 | |
|
|
223 | FUTURE DIRECTION: the motivation behind this option is to avoid I<real> |
|
|
224 | cycles - future versions of this module might chose to decode cyclic data |
|
|
225 | structures using weak references when this option is off, instead of |
|
|
226 | throwing an error. |
222 | |
227 | |
223 | This option does not affect C<encode> in any way - shared values and |
228 | This option does not affect C<encode> in any way - shared values and |
224 | references will always be decoded properly if present. |
229 | references will always be decoded properly if present. |
225 | |
230 | |
226 | =item $cbor = $cbor->pack_strings ([$enable]) |
231 | =item $cbor = $cbor->pack_strings ([$enable]) |