PPI::Token::Comment man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

PPI::Token::Comment(3)User Contributed Perl DocumentatioPPI::Token::Comment(3)

NAME
       PPI::Token::Comment - A comment in Perl source code

INHERITANCE
	 PPI::Token::Comment
	 isa PPI::Token
	     isa PPI::Element

SYNOPSIS
	 # This is a PPI::Token::Comment

	 print "Hello World!"; # So it this

	 $string =~ s/ foo  # This, unfortunately, is not :(
	       bar
	       /w;

DESCRIPTION
       In PPI, comments are represented by "PPI::Token::Comment" objects.

       These come in two flavours, line comment and inline comments.

       A "line comment" is a comment that stands on its own line. These
       comments hold their own newline and whitespace (both leading and
       trailing) as part of the one "PPI::Token::Comment" object.

       An inline comment is a comment that appears after some code, and
       continues to the end of the line. This does not include whitespace, and
       the terminating newlines is considered a separate
       PPI::Token::Whitespace token.

       This is largely a convenience, simplifying a lot of normal code
       relating to the common things people do with comments.

       Most commonly, it means when you "prune" or "delete" a comment, a line
       comment disappears taking the entire line with it, and an inline
       comment is removed from the inside of the line, allowing the newline to
       drop back onto the end of the code, as you would expect.

       It also means you can move comments around in blocks much more easily.

       For now, this is a suitably handy way to do things. However, I do
       reserve the right to change my mind on this one if it gets dangerously
       anachronistic somewhere down the line.

METHODS
       Only very limited methods are available, beyond those provided by our
       parent PPI::Token and PPI::Element classes.

   line
       The "line" accessor returns true if the "PPI::Token::Comment" is a line
       comment, or false if it is an inline comment.

SUPPORT
       See the support section in the main module.

AUTHOR
       Adam Kennedy <adamk@cpan.org>

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.14.1			  2011-02-26		PPI::Token::Comment(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net