$c = new C::Scan(filename => 'foo.c', filename_filter => 'foo.c', add_cppflags => '-DFOOBAR', includeDirs => [ 'dir1', 'dir2' ] ); # # Fetch and iterate through information about function declarations. # my $array_ref = $c->get('parsed_fdecls'); foreach my $func (@$array_ref) { my ($type, $name, $args, $full_text, undef) = @$func; foreach my $arg (@$args) { my ($atype, $aname, $aargs, $full_text, $array_modifiers) = @$arg; } } # # Fetch and iterate through information about #define values w/out args. # my $hash_ref = $c->get('defines_no_args'); foreach my $macro_name (keys %$hash_ref) { my $macro_text = $hash_ref{$macro_name}; } # # Fetch and iterate through information about #define macros w/args. # my $hash_ref = $c->get('defines_args'); foreach my $macro_name (keys %$hash_ref) { my $array_ref = $macros_hash{$macro_name}; my ($arg_ref, $macro_text) = @$array_ref; my @macro_args = @$arg_ref; }