NAME Plack::App::CPAN::Changes - Plack application to view CPAN::Changes object. SYNOPSIS use Plack::App::CPAN::Changes; my $obj = Plack::App::CPAN::Changes->new(%parameters); my $psgi_ar = $obj->call($env); my $app = $obj->to_app; METHODS "new" my $obj = Plack::App::CPAN::Changes->new(%parameters); Constructor. * "changes" Set CPAN::Changes object. Minimal version of object is 0.500002. It's optional. Default value is undef. * "css" Instance of CSS::Struct::Output object. Default value is CSS::Struct::Output::Raw instance. * "generator" HTML generator string. Default value is 'Plack::App::CPAN::Changes; Version: __VERSION__' * "tags" Instance of Tags::Output object. Default value is Tags::Output::Raw->new('xml' => 1) instance. * "title" Page title. Default value is 'Login page'. Returns instance of object. "call" my $psgi_ar = $obj->call($env); Implementation of view page. Returns reference to array (PSGI structure). "to_app" my $app = $obj->to_app; Creates Plack application. Returns Plack::Component object. EXAMPLE use strict; use warnings; use CPAN::Changes; use CPAN::Changes::Entry; use CPAN::Changes::Release; use CSS::Struct::Output::Indent; use Plack::App::CPAN::Changes; use Plack::Runner; use Tags::Output::Indent; my $changes = CPAN::Changes->new( 'preamble' => 'Revision history for perl module Foo::Bar', 'releases' => [ CPAN::Changes::Release->new( 'entries' => [ CPAN::Changes::Entry->new( 'entries' => [ 'item #1', ], 'text' => '', ), CPAN::Changes::Entry->new( 'entries' => [ 'item #2', ], 'text' => 'Foo', ), ], 'version' => 0.01, ), ], ); # Run application. my $app = Plack::App::CPAN::Changes->new( 'css' => CSS::Struct::Output::Indent->new, 'changes' => $changes, 'generator' => 'Plack::App::CPAN::Changes', 'tags' => Tags::Output::Indent->new( 'preserved' => ['style'], 'xml' => 1, ), )->to_app; Plack::Runner->new->run($app); # Output: # HTTP::Server::PSGI: Accepting connections at http://0:5000/ # > curl http://localhost:5000/ # # # # # # # # Changes # # # # #
#

# Revision history for perl module Foo::Bar #

#
#

# 0.01 #

# #
#
# # DEPENDENCIES Plack::Component::Tags::HTML, Plack::Util::Accessor, Tags::HTML::CPAN::Changes. REPOSITORY AUTHOR Michal Josef Špaček LICENSE AND COPYRIGHT © 2024 Michal Josef Špaček BSD 2-Clause License VERSION 0.03