projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
faf89a9
)
compatibility tweak for Class::Struct
Gurusamy Sarathy [Mon, 5 Jul 1999 01:20:58 +0000 (
01:20
+0000)]
p4raw-id: //depot/perl@3579
lib/Class/Struct.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Class/Struct.pm
b/lib/Class/Struct.pm
index
d8327bc
..
3e08e80
100644
(file)
--- 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;