NAME
Devel::Depend::Cpp - Perl extension for extracting dependency trees using 'cpp'
SYNOPSIS
use Devel::Depend::Cpp;
my ($success, $includ_levels, $included_files) = Devel::Depend::Cpp::Depend
(
'/usr/include/stdio.h'
, '' # switches to cpp
, 0 # include system includes
) ;
DESCRIPTION
Depend calls cpp (the c pre-processor) to extract all the included files. If the call succeds, Depend returns a list consiting of the following items:
- [1] Success flag set to 1
- [2] A reference to a hash where the included files are sorted per level. (A file can appear at different levels)
- [3] A reference to a hash representing an include tree
If the call faills, Depend returns a list consiting of the following items:
Depend takes the following arguments:
- 1/ The name of the file to depend
- 2/ A string to be passed to cpp, ex: '-DDEBUG'
- 3/ A boolean indicating if the system include files should be included in the result (anything under /usr/)
- 4/ a sub reference to be called everytime a node is added (see depender.pl for an example)
- 5/ A boolean indicating if the output of cpp should be dumped on screen
EXPORT
None .
DEPENDENCIES
cpp must be in your execution path.
depender.pl depends on Data::TreeDumper to dump the dependency tree and PBS if a graph is to be generated.
AUTHOR
Nadim ibn Hamouda el Khemir <nadim@khemir.net>
SEE ALSO
PBS: the Perl Build System from which Devel::Depend::Cpp was extracted. Contact the author for more information about PBS.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 46:
Unknown directive: =comment