HTML::Native::Comment - HTML::Native comment
use HTML::Native::Comment; my $comment = HTML::Native::Comment->new ( "This is a comment" ); print $comment; # prints "<!-- This is a comment -->"
An HTML::Native::Comment object represents an HTML comment. It can safely be included within an HTML::Native tree without being subject to entity encoding.
$comment = HTML::Native::Comment->new ( <text> );
Create a new HTML::Native::Comment object, representing a single HTML comment. For example:
my $comment = HTML::Native::Comment->new ( "This is a comment" ); print $comment; # prints "<!-- This is a comment -->"
or
my $elem = HTML::Native->new ( div => [ h1 => "Welcome" ], "Hello world!", HTML::Native::Comment->new ( "Hide this" ), ); print $elem; # prints "<div><h1>Welcome</h1>Hello world!<!-- Hide this --></div>"
To install HTML::Native, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Native
CPAN shell
perl -MCPAN -e shell install HTML::Native
For more information on module installation, please visit the detailed CPAN module installation guide.