parrotcode: Parrot::Pmc2c::PMC::PrintTree | |
Contents | Perl Modules |
Parrot::Pmc2c::PMC::PrintTree
This class inherits from Parrot::Pmc2c::Pmc2cMain and adds one method,
print_tree()
.
print_tree()
is called within tools/dev/pmctree.pl.
print_tree()
$self->print_tree( {
depth => 0,
files => [ @files_to_be_printed ], # optional
} );
Purpose: Print the inheritance tree for each of the files, using the given directories to search for all of correct PMCs.
Arguments: Reference to hash holding key-value pairs.
Number holding the display depth. Used for the recursive definition of this function. Defaults to 0
if not specified.
Optional. Reference to an array holding a list of files. If not supplied, the value of the args
key in Parrot::Pmc2c::Pmc2cMain::new()
will be used. (This is used for the recursive call.)
Return Values: 1
upon successful printing.
Comment: print_tree()
was formerly found within Parrot::Pmc2c::Pmc2cMain. However, since the primary purpose of that class is to provide methods for a different program, tools/build/pmc2c.pl, which is invoked repeatedly by make, it was felt better to extract this method into a class of its own.
Comment: In earlier version of pmc2c.pl, this subroutine returned undef
upon success. This was changed to more Perl-ish 1
.
|