The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Class::Rebirth.pm - Class::Rebirth.pm

SYNOPSIS

  use Class::Rebirth 'rebirth';
  my $object = rebirth( $zombie );

or

  use Class::Rebirth;
  my $object = Class::Rebirth::rebirth( $zombie );

It is also able to use a data dump instead of an object.

  my $object = Class::Rebirth::rebirth( $dump );

DESCRIPTION

When a class is deserialized from saved dump it still holds the information, but the methods are not accessable anymore.

So far a run with eval would do the rebirth, but that does only work if needed classes are required/ used. Here the Class::Rebirth also cares about requiring the needed classes nested in the potential object.

A death class I call zombie (has nothing todo with processes), as they look like normal classes but have no living methods.

REQUIRES

List::MoreUtils

Data::Dumper

Exporter

Scalar::Util

Carp

METHODS

rebirth

 my $object = rebirth($zombie);

Takes a death object and and creates a living object of it. Such a zombie class looks like a normal class when you dump it. But it is not alive, means methods won't work. An effect which happens by deserializing classes from a store (dumped data).

AUTHOR

Andreas Hernitscheck ahernit(AT)cpan.org