From: Gurusamy Sarathy Date: Mon, 5 Jul 1999 01:20:58 +0000 (+0000) Subject: compatibility tweak for Class::Struct X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f01e5ef6e26833286356d7311eed3209d6f71828;p=p5sagit%2Fp5-mst-13.2.git compatibility tweak for Class::Struct p4raw-id: //depot/perl@3579 --- diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm index d8327bc..3e08e80 100644 --- a/lib/Class/Struct.pm +++ b/lib/Class/Struct.pm @@ -101,6 +101,7 @@ sub struct { $out = "{\n package $class;\n use Carp;\n sub new {\n"; $out .= " my (\$class, \%init) = \@_;\n"; + $out .= " \$class = __PACKAGE__ unless \@_;\n"; my $cnt = 0; my $idx = 0;