X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lib%2FClass%2FModular.pm;h=1b4a88113e3989007476c4f5f03d52fb14cfb833;hb=44c8669f46de5293e57a26b841e8ee1f3e51105e;hp=7977e7e2ca44ccc0a88a6f37913d933bd2a15cf3;hpb=38dd32070977ee6a14487fa384877e431f953285;p=class_modular.git%2F.git diff --git a/lib/Class/Modular.pm b/lib/Class/Modular.pm index 7977e7e..1b4a881 100644 --- a/lib/Class/Modular.pm +++ b/lib/Class/Modular.pm @@ -2,7 +2,7 @@ # under the terms of the GPL version 2, or any later version. See the # file README and COPYING for more information. Copyright 2003 by Don # Armstrong . -# $Id: Modular.pm,v 1.8 2003/12/09 02:00:10 don Exp $ +# $Id$ package Class::Modular; @@ -12,9 +12,9 @@ Class::Modular -- Modular class generation superclass =head1 SYNOPSIS -package Foo::Bar; + package Foo::Bar; -@ISA = qw(Class::Modular); + use base qw(Class::Modular); =head1 DESCRIPTION @@ -28,32 +28,20 @@ functions. Less generic functions can be included or overridden without modifying the base classes. This allows for code to be more modular, and reduces code duplication. -=over - -=item new - -new is responsible for blessing and creating a new database superclass. - -=item load - -load is responsible for loading database plugins - -=back - - =head1 FUNCTIONS =cut use strict; -use vars qw($VERSION $DEBUG); +use vars qw($VERSION $DEBUG $REVISION); use Carp; -use Data::Copy qw(deep_copy); # Used for deep copying objects +use Storable qw(dclone); # Used for deep copying objects BEGIN{ - ($VERSION) = q$Revision: 1.8 $ =~ /\$Revision:\s+([^\s+])/; + $VERSION = '0.1'; + ($REVISION) = q$LastChangedRevision$ =~ /\$LastChangedRevision:\s+([^\s+])/; $DEBUG = 0 unless defined $DEBUG; } @@ -245,8 +233,8 @@ sub clone { bless $clone, ref($self); # copy data structures at this level - $clone->{_methodhash} = deep_copy($self->{_methodhash}); - $clone->{_subclasses} = deep_copy($self->{_subclasses}); + $clone->{_methodhash} = dclone($self->{_methodhash}); + $clone->{_subclasses} = dclone($self->{_subclasses}); foreach my $subclass (keys %{$self->{_subclasses}}) { # use eval to try and call the subclasses _clone method.