Package Info

perl-File-Comments


Recognizes file formats and extracts format-specific comments


Development/Libraries/Perl

File::Comments guesses the type of a given file, determines the format used for comments, extracts all comments, and returns them as a reference to an array of chunks. Alternatively, it strips all comments from a file.

Currently supported are Perl scripts, C/C++ programs, Java, makefiles, JavaScript, Python and PHP.

The plugin architecture used by File::Comments makes it easy to add new formats. To support a new format, a new plugin module has to be installed. No modifications to the File::Comments codebase are necessary, new plugins will be picked up automatically.

File::Comments can also be used to simply guess a file's type. It it somewhat more flexible than File::MMagic and File::Type. File types in File::Comments are typically based on file name suffixes (.c, .pl, etc.). If no suffix is available, or a given suffix is ambiguous (e.g. if several plugins have registered a handler for the same suffix), then the file's content is used to narrow down the possibilities and arrive at a decision.

WARNING: THIS MODULE IS UNDER DEVELOPMENT, QUALITY IS ALPHA. IF YOU FIND BUGS, OR WANT TO CONTRIBUTE PLUGINS, PLEASE SEND THEM MY WAY.


License: Artistic-1.0 OR GPL-1.0-or-later
URL: https://metacpan.org/release/File-Comments

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.08-bp155.3.8 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-File-Comments
0.08-bp154.2.13 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-File-Comments
0.08-bp153.1.12 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-File-Comments
0.08-bp152.3.12 info GA Release 2020-04-17 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-File-Comments
0.08-bp151.3.1 info GA Release 2019-07-17 15 SP1
  • AArch64
  • x86-64
  • perl-File-Comments
0.08-bp151.2.10 info GA Release 2019-05-18 15 SP1
  • ppc64le
  • s390x
  • perl-File-Comments
0.08-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-File-Comments