PPI::Token::BOM(3pm)

PPI::Token::BOM3pm

Tokens representing unicode byte order marks

Inheritance

  PPI::Token::BOM
  isa PPI::Token
      isa PPI::Element

Overview

This is a special token in that it can only occur at the beginning of documents. If a BOM byte mark occurs elsewhere in a file, it should be treated as PPI::Token::Whitespace. We recognize the byte order marks identified at this URL: <https://web.archive.org/web/https://www.unicode.org/faq/utf_bom.html#BOM>

    UTF-32, big-endian     00 00 FE FF
    UTF-32, little-endian  FF FE 00 00
    UTF-16, big-endian     FE FF
    UTF-16, little-endian  FF FE
    UTF-8                  EF BB BF

Note that as of this writing, PPI only has support for UTF-8 (namely, in POD and strings) and no support for UTF-16 or UTF-32. We support the BOMs of the latter two for completeness only.

The BOM is considered non-significant, like white space.

Methods

There are no additional methods beyond those provided by the parent PPI::Token and PPI::Element classes.

Support

See the support section in the main module

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 8 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

Author

Chris Dolan <[email protected]>

From perl-ppi 1.291-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.