
marvin at rectangular
Aug 25, 2008, 8:52 PM
Post #1 of 1
(462 views)
Permalink
|
|
r3763 - trunk/boilerplater/lib/Boilerplater/Binding
|
|
Author: creamyg Date: 2008-08-25 20:52:02 -0700 (Mon, 25 Aug 2008) New Revision: 3763 Modified: trunk/boilerplater/lib/Boilerplater/Binding/Perl.pm Log: Autogenerate POD describing inheritance. Modified: trunk/boilerplater/lib/Boilerplater/Binding/Perl.pm =================================================================== --- trunk/boilerplater/lib/Boilerplater/Binding/Perl.pm 2008-08-25 20:16:50 UTC (rev 3762) +++ trunk/boilerplater/lib/Boilerplater/Binding/Perl.pm 2008-08-26 03:52:02 UTC (rev 3763) @@ -487,6 +487,22 @@ $methods_pod = join( "", "=head1 METHODS\n\n", @method_docs ); } + my $child = $class; + my @ancestors; + while ( defined( my $parent = $child->get_parent ) ) { + push @ancestors, $parent; + $child = $parent; + } + my $inheritance_pod = ""; + if (@ancestors) { + $inheritance_pod = "=head1 INHERITANCE\n\n"; + $inheritance_pod .= $class->get_class_name; + for my $ancestor (@ancestors) { + $inheritance_pod .= " isa L<" . $ancestor->get_class_name . ">"; + } + $inheritance_pod .= ".\n"; + } + my $pod = <<END_POD; # Auto-generated file -- DO NOT EDIT!!!!! @@ -505,6 +521,8 @@ $methods_pod +$inheritance_pod + =head1 COPYRIGHT Copyright 2005-2008 Marvin Humphrey _______________________________________________ kinosearch-commits mailing list kinosearch-commits [at] rectangular http://www.rectangular.com/mailman/listinfo/kinosearch-commits
|