cvsuser 04/10/18 15:07:21
Modified: classes pmc2c2.pl
Log:
this patch fixes the --tree option of classes/pmc2s.pl.
The commands
perl classes/pmc2c2.pl --tree classes/*.pmc
and
cd classes
perl pmc2c2.pl --tree *.pmc
should now print again the 'extends' - Tree of PMCs.
Courtesy of Bernhard Schmalhofer <[EMAIL PROTECTED]>
Revision Changes Path
1.19 +6 -7 parrot/classes/pmc2c2.pl
Index: pmc2c2.pl
===================================================================
RCS file: /cvs/public/parrot/classes/pmc2c2.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -r1.18 -r1.19
--- pmc2c2.pl 14 Oct 2004 08:11:45 -0000 1.18
+++ pmc2c2.pl 18 Oct 2004 22:07:20 -0000 1.19
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: pmc2c2.pl,v 1.18 2004/10/14 08:11:45 leo Exp $
+# $Id: pmc2c2.pl,v 1.19 2004/10/18 22:07:20 dan Exp $
=head1 NAME
@@ -569,15 +569,14 @@
}
sub print_tree {
- my $include = shift;
- my ($depth, @files) = @_;
+ my ($include,$depth, @files) = @_;
+
foreach my $file (@files) {
my $class = read_dump($include, $file);
- my $name = $class->{class};
- print " " x $depth, $name, "\n";
+ print " " x $depth, $class->{class}, "\n";
foreach my $parent (keys %{$class->{flags}{extends}}) {
- my $pmc = "classes/" . lc($parent) . ".pmc";
- print_tree($depth + 1, $pmc);
+ my $pmc = lc($parent) . '.pmc';
+ print_tree($include, $depth + 1, $pmc);
}
}
}