Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Class::Rebless 0.08

    Download button

    No screenshots available
    Downloads: 374  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gaal Yahas and Gabor Szabo | More programs
    MIT/X Consortium Lic... / FREE
    November 15th, 2007, 03:57 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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 => [
    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

      


    TAGS:

    rebase class | data structures | Perl module | rebase | data | structures

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM