How can I tell if a string is a pragma? I'm scanning perl code for dependencies, and want to ignore use xxx when xxx is a pragma. I was advised in the Chatterbox:
pragma's are traditionally all lowercase but I think you are likely to only find good rules of thumb not exact assurancesProblem is that, although modules are traditionally capitalized, a bunch of them in the codebase I'm looking at are not.
I'm extending Module::Dependency. For my present purpose (building a set of graphs of a large codebase) it may be enough to make a list of the most popular pragmas (pragmae?) and just exclude those. However, I'd like to actually post my updates back to CPAN.1 If I do that, I'd like a comprehensive solution.
throop
In reply to Is it a pragma or a module? by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |