Class::Rebless contains rebase deep data structures.
SYNOPSIS
use Class::Rebless;
my $beat = bless({
one => bless({
hey => 'ho',
}, 'AOne'),
two => bless({
list => [
bless({ three => 3 }, 'AThree'),
bless({ four => 4 }, 'AFour'),
5,
"this is just noise",
],
}, 'ATwo'),
six => {
seven => bless({ __VALUE__ => 7}, 'ASeven'),
eight => bless({ __VALUE__ => 8}, 'AnEight'),
},
}, 'AOne');
Class::Rebless->rebase($beat, 'And');
# $beat now contains objects of type
# And::AOne, And::ATwo .. And::AnEight!
Class::Rebless->rebless($beat, 'Beatless');
# All (blessed) objects in $beat now belong to package
# Beatless.
Class::Rebless takes a Perl data structure and recurses through its hierarchy, reblessing objects that it finds along the way into new namespaces. This is typically useful when your object belongs to a package that is too close to the main namespace for your tastes, and you want to rebless everything down to your project's base namespace.
Class::Rebless walks scalar, array, and hash references. It uses Scalar::Util::reftype to discover how to walk blessed objects of any type.
Product's homepage
Requirements:
· Perl