<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Plack::App::CPAN::Changes - Plack application to view CPAN::Changes
    object.

SYNOPSIS
     use Plack::App::CPAN::Changes;

     my $obj = Plack::App::CPAN::Changes-&gt;new(%parameters);
     my $psgi_ar = $obj-&gt;call($env);
     my $app = $obj-&gt;to_app;

DESCRIPTION
    Plack application which prints changelog record. Record is defined by
    CPAN::Changes object, which is created from some file (like Changes) in
    CPAN distribution.

METHODS
  "new"
     my $obj = Plack::App::CPAN::Changes-&gt;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-&gt;new('xml' =&gt; 1) instance.

    *       "title"

            Page title.

            Default value is 'Login page'.

    Returns instance of object.

  "call"
     my $psgi_ar = $obj-&gt;call($env);

    Implementation of view page.

    Returns reference to array (PSGI structure).

  "to_app"
     my $app = $obj-&gt;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-&gt;new(
             'preamble' =&gt; 'Revision history for perl module Foo::Bar',
             'releases' =&gt; [
                     CPAN::Changes::Release-&gt;new(
                             'entries' =&gt; [
                                     CPAN::Changes::Entry-&gt;new(
                                             'entries' =&gt; [
                                                     'item #1',
                                             ],
                                             'text' =&gt; '',
                                     ),
                                     CPAN::Changes::Entry-&gt;new(
                                             'entries' =&gt; [
                                                     'item #2',
                                             ],
                                             'text' =&gt; 'Foo',
                                     ),
                             ],
                             'version' =&gt; 0.01,
                     ),
             ],
     );

     # Run application.
     my $app = Plack::App::CPAN::Changes-&gt;new(
             'css' =&gt; CSS::Struct::Output::Indent-&gt;new,
             'changes' =&gt; $changes,
             'generator' =&gt; 'Plack::App::CPAN::Changes',
             'tags' =&gt; Tags::Output::Indent-&gt;new(
                     'preserved' =&gt; ['style'],
                     'xml' =&gt; 1,
             ),
     )-&gt;to_app;
     Plack::Runner-&gt;new-&gt;run($app);

     # Output:
     # HTTP::Server::PSGI: Accepting connections at http://0:5000/

     # &gt; curl http://localhost:5000/
     # &lt;!DOCTYPE html&gt;
     # &lt;html lang="en"&gt;
     #   &lt;head&gt;
     #     &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
     #     &lt;meta name="generator" content="Plack::App::CPAN::Changes" /&gt;
     #     &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
     #     &lt;title&gt;
     #       Changes
     #     &lt;/title&gt;
     #     &lt;style type="text/css"&gt;
     # * {
     #      box-sizing: border-box;
     #      margin: 0;
     #      padding: 0;
     # }
     # .changes {
     #      max-width: 800px;
     #      margin: auto;
     #      background: #fff;
     #      padding: 20px;
     #      border-radius: 8px;
     #      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     # }
     # .changes .version {
     #      border-bottom: 2px solid #eee;
     #      padding-bottom: 20px;
     #      margin-bottom: 20px;
     # }
     # .changes .version:last-child {
     #      border-bottom: none;
     # }
     # .changes .version h2, .changes .version h3 {
     #      color: #007BFF;
     #      margin-top: 0;
     # }
     # .changes .version-changes {
     #      list-style-type: none;
     #      padding-left: 0;
     # }
     # .changes .version-change {
     #      background-color: #f8f9fa;
     #      margin: 10px 0;
     #      padding: 10px;
     #      border-left: 4px solid #007BFF;
     #      border-radius: 4px;
     # }
     # &lt;/style&gt;
     #   &lt;/head&gt;
     #   &lt;body&gt;
     #     &lt;div class="changes"&gt;
     #       &lt;h1&gt;
     #         Revision history for perl module Foo::Bar
     #       &lt;/h1&gt;
     #       &lt;div class="version"&gt;
     #         &lt;h2&gt;
     #           0.01
     #         &lt;/h2&gt;
     #         &lt;ul class="version-changes"&gt;
     #           &lt;li class="version-change"&gt;
     #             item #1
     #           &lt;/li&gt;
     #           &lt;h3&gt;
     #             [Foo]
     #           &lt;/h3&gt;
     #           &lt;li class="version-change"&gt;
     #             item #2
     #           &lt;/li&gt;
     #         &lt;/ul&gt;
     #       &lt;/div&gt;
     #     &lt;/div&gt;
     #   &lt;/body&gt;
     # &lt;/html&gt;

DEPENDENCIES
    Plack::Component::Tags::HTML, Plack::Util::Accessor,
    Tags::HTML::CPAN::Changes.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Plack-App-CPAN-Changes&gt;

AUTHOR
    Michal Josef ﾅ�paﾄ稿k &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    ﾂｩ 2024 Michal Josef ﾅ�paﾄ稿k

    BSD 2-Clause License

VERSION
    0.04

</pre></body></html>