NAME

Devel::Depend::Cpp - Perl extension for extracting dependency trees from c files

SYNOPSIS

 use Devel::Depend::Cpp;
 
my ($success, $includ_levels, $included_files) = Devel::Depend::Cpp::Depend
							(
							  undef
							, '/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 perl level. A file can appear simulteanously 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:

[1] Success flag set to 0
[2] A string containing an error message

Depend takes the following arguments:

1/ the name of the 'cpp' binary to use. undef to use the first 'cpp' in your path
2/ The name of the file to depend
3/ A string to be passed to cpp, ex: '-DDEBUG'
4/ A boolean indicating if the system include files should be included in the result (anything under /usr/)
5/ a sub reference to be called everytime a node is added (see depender.pl for an example)
6/ A boolean indicating if the output of cpp should be dumped on screen

EXPORT

None .

DEPENDENCIES

cpp.

AUTHOR

Nadim ibn Hamouda el Khemir <nadim@khemir.net>

SEE ALSO

PBS.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 48:

Unknown directive: =comment