diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-05 01:20:58 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-05 01:20:58 +0000 |
commit | f01e5ef6e26833286356d7311eed3209d6f71828 (patch) | |
tree | 393b447759388f0c1e3651601f5c22546a8a8aca /lib/Class | |
parent | faf89a90b9d9ca73fe8e05bd84a30e7989fb5351 (diff) | |
download | perl-f01e5ef6e26833286356d7311eed3209d6f71828.tar.gz |
compatibility tweak for Class::Struct
p4raw-id: //depot/perl@3579
Diffstat (limited to 'lib/Class')
-rw-r--r-- | lib/Class/Struct.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm index d8327bc7ab..3e08e801d0 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; |