NAME Tags::HTML::CPAN::Changes - Tags helper for CPAN changes. SYNOPSIS use Tags::HTML::CPAN::Changes; my $obj = Tags::HTML::CPAN::Changes->new(%params); $obj->cleanup; $obj->init($changes); $obj->prepare; $obj->process; $obj->process_css; METHODS "new" my $obj = Tags::HTML::CPAN::Changes->new(%params); Constructor. * "css" 'CSS::Struct::Output' object for process_css processing. Default value is undef. * "no_css" No CSS support flag. If this flag is set to 1, process_css() returns undef. Default value is 0. * "tags" 'Tags::Output' object. Default value is undef. "cleanup" $obj->cleanup; Cleanup module to init state. Returns undef. "init" $obj->init($changes); Set CPAN::Changes instance defined by $changes to object. Minimal version of CPAN::Changes is 0.500002. Returns undef. "prepare" $obj->prepare; Process initialization before page run. Do nothing in this module. Returns undef. "process" $obj->process; Process Tags structure for output with message. Returns undef. "process_css" $obj->process_css; Process CSS::Struct structure for output. Returns undef. ERRORS new(): From Class::Utils::set_params(): Unknown parameter '%s'. From Tags::HTML::new(): Parameter 'tags' must be a 'Tags::Output::*' class. Parameter 'css_class' is required. init(): Data object must be a 'CPAN::Changes' instance. Minimal version of supported CPAN::Changes is 0.500002.", Version: %s process(): From Tags::HTML::process(): Parameter 'tags' isn't defined. EXAMPLE1 use strict; use warnings; use CSS::Struct::Output::Raw; use CPAN::Changes; use Tags::HTML::CPAN::Changes; use Tags::HTML::Page::Begin; use Tags::HTML::Page::End; use Tags::Output::Raw; use Unicode::UTF8 qw(decode_utf8 encode_utf8); my $css = CSS::Struct::Output::Raw->new; my $tags = Tags::Output::Raw->new( 'xml' => 1, ); my $begin = Tags::HTML::Page::Begin->new( 'author' => decode_utf8('Michal Josef Špaček'), 'css' => $css, 'generator' => 'EXAMPLE1', 'lang' => { 'title' => 'Hello world!', }, 'tags' => $tags, ); my $end = Tags::HTML::Page::End->new( 'tags' => $tags, ); my $obj = Tags::HTML::CPAN::Changes->new( 'css' => $css, 'tags' => $tags, ); # Example changes object. my $changes = CPAN::Changes->new( 'preamble' => 'Revision history for perl module Foo::Bar', 'releases' => [ CPAN::Changes::Release->new( 'date' => '2009-07-06', 'entries' => [ CPAN::Changes::Entry->new( 'entries' => [ 'item #1', ], ), ], 'version' => 0.01, ), ], ); # Init. $obj->init($changes); # Process CSS. $obj->process_css; # Process HTML. $begin->process; $obj->process; $end->process; # Print out. print encode_utf8($tags->flush); # Output: # # Hello world!

0.01 - 2009-07-06

EXAMPLE2 use strict; use warnings; use CSS::Struct::Output::Indent; use CPAN::Changes; use CPAN::Changes::Entry; use CPAN::Changes::Release; use Tags::HTML::CPAN::Changes; use Tags::HTML::Page::Begin; use Tags::HTML::Page::End; use Tags::Output::Indent; use Unicode::UTF8 qw(decode_utf8 encode_utf8); my $css = CSS::Struct::Output::Indent->new; my $tags = Tags::Output::Indent->new( 'preserved' => ['style'], 'xml' => 1, ); my $begin = Tags::HTML::Page::Begin->new( 'author' => decode_utf8('Michal Josef Špaček'), 'css' => $css, 'generator' => 'EXAMPLE2', 'lang' => { 'title' => 'Hello world!', }, 'tags' => $tags, ); my $end = Tags::HTML::Page::End->new( 'tags' => $tags, ); my $obj = Tags::HTML::CPAN::Changes->new( 'css' => $css, 'tags' => $tags, ); # Example changes object. my $changes = CPAN::Changes->new( 'preamble' => 'Revision history for perl module Foo::Bar', 'releases' => [ CPAN::Changes::Release->new( 'date' => '2009-07-06', 'entries' => [ CPAN::Changes::Entry->new( 'entries' => [ 'item #1', ], ), ], 'version' => 0.01, ), ], ); # Init. $obj->init($changes); # Process CSS. $obj->process_css; # Process HTML. $begin->process; $obj->process; $end->process; # Print out. print encode_utf8($tags->flush); # Output: # # # # # # # # # Hello world! # # # # #
#
#

# 0.01 - 2009-07-06 #

# #
#
# # DEPENDENCIES Class::Utils, CPAN::Version, English, Error::Pure, Scalar::Util, Tags::HTML. REPOSITORY AUTHOR Michal Josef Špaček LICENSE AND COPYRIGHT © 2024 Michal Josef Špaček BSD 2-Clause License VERSION 0.04