PPI::Token::HereDoc(3) User Contributed Perl Documentation NAME PPI::Token::HereDoc - Token class for the here-doc INHERITANCE PPI::Token::HereDoc isa PPI::Token isa PPI::Element DESCRIPTION Here-docs are incredibly handy when writing Perl, but incredibly tricky when parsing it, primarily because they don't follow the general flow of input. They jump ahead and nab lines directly off the input buffer. Whitespace and newlines may not matter in most Perl code, but they matter in here- docs. They are also tricky to store as an object. They look sort of like an operator and a string, but they don't act like it. And they have a second section that should be something like a separate token, but isn't because a string can span from above the here-doc content to below it. So when parsing, this is what we do. Firstly, the PPI::Token::HereDoc object, does not represent the "<<" operator, or the "END_FLAG", or the content, or even the terminator. It represents all of them at once. The token itself has only the declaration part as its "content". # This is what the content of a HereDoc token is < COPYRIGHT Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.38.2 2024-05-12 PPI::Token::HereDoc(3)