The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::Depend::Cl - Extract dependency trees from c files

DESCRIPTION

Extract dependency trees from c files. See Devel::Depend::Cpp for more an example.

MEMBER FUNCTIONS

Depend

Depend calls cl (the microsoft C compiler) to extract included files.

Returns

  • Success flag

  • A reference to a hash where the included files are sorted perl level. A file can appear at different levels

  • A reference to a hash with one file per entry

  • A reference to a hash representing an include tree

  • A string containing an error message, if any

Arguments

  • the name of the 'cl' binary to use. undef to use the first 'cl' in your path

  • The name of the file to depend

  • A string to be passed to cpp, ex: '-DDEBUG'

  • A boolean indicating if the system include files should be included in the result

  • a sub reference to be called everytime a node is added (see depender.pl for an example)

  • A boolean indicating if the output of cpp should be dumped on the screen

This sub is a wrapper around RunAndParse.

RunAndParse

This sub runs a, preprocessor, command passed as an argument and parses its output. The output is expected to follow the cl output format. This sub allows finer control of the preprocessing. Try Depend first.

CollapsePath

Removes '.' and '..' from a path.

EXPORT

$PreprocessorDepend, a scalar containing a reference to the Depend sub.

DEPENDENCIES

cpp.

AUTHORS

   Emil Jansson based on Devel::Depend::Cpp.

        Khemir Nadim ibn Hamouda
        CPAN ID: NKH
        mailto:nadim@khemir.net
        http:// no web site

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

Devel::Depend::Cpp and PerlBuildSystem.