Lines 183-189
SKIP: {
Link Here
|
183 |
is_deeply( $cache->get_from_cache('test_deep_copy_array'), [ qw ( an array ref ) ], 'An array will be deep copied'); |
183 |
is_deeply( $cache->get_from_cache('test_deep_copy_array'), [ qw ( an array ref ) ], 'An array will be deep copied'); |
184 |
$item_from_cache = $cache->get_from_cache('test_deep_copy_array', { unsafe => 1 }); |
184 |
$item_from_cache = $cache->get_from_cache('test_deep_copy_array', { unsafe => 1 }); |
185 |
@$item_from_cache = qw( another array ref ); |
185 |
@$item_from_cache = qw( another array ref ); |
186 |
is_deeply( $cache->get_from_cache('test_deep_copy_array'), [ qw ( another array ref ) ], 'An array will not be deep copied if the unsafe flag is set'); |
186 |
is_deeply( $cache->get_from_cache('test_deep_copy_array', { unsafe => 1 }), [ qw ( another array ref ) ], 'An array will not be deep copied if the unsafe flag is set'); |
187 |
# Hash |
187 |
# Hash |
188 |
my %item = ( a => 'hashref' ); |
188 |
my %item = ( a => 'hashref' ); |
189 |
$cache->set_in_cache('test_deep_copy_hash', \%item); |
189 |
$cache->set_in_cache('test_deep_copy_hash', \%item); |
Lines 192-198
SKIP: {
Link Here
|
192 |
is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { a => 'hashref' }, 'A hash will be deep copied'); |
192 |
is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { a => 'hashref' }, 'A hash will be deep copied'); |
193 |
$item_from_cache = $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1}); |
193 |
$item_from_cache = $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1}); |
194 |
%$item_from_cache = ( another => 'hashref' ); |
194 |
%$item_from_cache = ( another => 'hashref' ); |
195 |
is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { another => 'hashref' }, 'A hash will not be deep copied if the unsafe flag is set'); |
195 |
is_deeply( $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1 }), { another => 'hashref' }, 'A hash will not be deep copied if the unsafe flag is set'); |
196 |
} |
196 |
} |
197 |
|
197 |
|
198 |
END { |
198 |
END { |
199 |
- |
|
|