Class::Rebless

Class::Rebless contains rebase deep data structures.
Download

Class::Rebless Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Gaal Yahas and Gabor Szabo
  • Publisher web site:
  • http://search.cpan.org/~gaal/

Class::Rebless Tags


Class::Rebless Description

Class::Rebless contains rebase deep data structures. Class::Rebless contains rebase deep data structures.SYNOPSIS use Class::Rebless; my $beat = bless({ one => bless({ hey => 'ho', }, 'AOne'), two => bless({ list => , }, '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. Requirements: · Perl


Class::Rebless Related Software