Clang(3pm)

✨ NAME ✨

Clang β€” bestie, it's literally Perl bindings to the Clang compiler's indexing interface πŸ’…


πŸŽ€ VERSION πŸŽ€

version 0.09 (yes queen, she's at 0.09 and thriving)


🌸 SYNOPSIS 🌸

okay so here's the vibe, copy-paste this and you're in your indexing era:

use Clang;

my $index = Clang::Index -> new(1);

my $tunit = $index -> parse('file.c');
my $nodes = $tunit -> cursor -> children;

foreach my $node (@$nodes) {
    say $node -> spelling;
    say $node -> kind -> spelling;
}

πŸ¦‹ DESCRIPTION πŸ¦‹

Clang is a compiler front end for the C, C++, Objective-C, and Objective-C++ programming languages, and the way it does that is by using LLVM as its back end. iconic behavior tbh 🌈

This module is the plug: it gives you Perl bindings to the Clang indexing interface. What's that for? Extracting high-level symbol information from your source files β€” and it does it without exposing the full Clang C++ API, so you get the tea without the whole C++ situationship πŸ’–

no cap, that's the entire point: high-level symbol info, no C++ API drama.

πŸ’œ AUTHOR πŸ’œ

Alessandro Ghedini <alexbio@cpan.org> β€” the icon who made this happen, give them their flowers 🫢


Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. pick your fighter, both valid πŸ’…

See http://dev.perl.org/licenses/ for more information.


okay bestie that's the whole page, you ate it, no crumbs left 🌟 this was Clang(3pm) β€” one of those User Contributed Perl Documentation girlies β€” and it was brought to you by perl v5.42.3, dated 2026-09-03. periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from