<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Toolforge::MixNMatch::Diff - Mix'n'match catalogs diff.

SYNOPSIS
     use Toolforge::MixNMatch::Diff;

     my $diff_cat = Toolforge::MixNMatch::Diff::diff($cat1, $cat2, $warn);

SUBRUTINES
  "diff"
     my $diff_cat = Toolforge::MixNMatch::Diff::diff($cat1, $cat2, $warn);

    Creates diff between two catalogs. $warn is boolean variable which turn
    on/off warnings (default is off).

    Returns instance of Toolforge::MixNMatch::Object::Catalog.

ERRORS
     diff():
             Something wrong with uids in catalogs.

EXAMPLE
     use strict;
     use warnings;

     use Toolforge::MixNMatch::Diff;
     use Toolforge::MixNMatch::Object::Catalog;
     use Toolforge::MixNMatch::Object::User;
     use Toolforge::MixNMatch::Object::YearMonth;
     use Toolforge::MixNMatch::Print::Catalog;

     # Catalogs.
     my $cat1 = Toolforge::MixNMatch::Object::Catalog-&gt;new(
             'count' =&gt; 10,
             'type' =&gt; 'Q5',
             'users' =&gt; [
                     Toolforge::MixNMatch::Object::User-&gt;new(
                             'count' =&gt; 2,
                             'uid' =&gt; 1,
                             'username' =&gt; 'Skim',
                     ),
                     Toolforge::MixNMatch::Object::User-&gt;new(
                             'count' =&gt; 1,
                             'uid' =&gt; 2,
                             'username' =&gt; 'Foo',
                     ),
             ],
             'year_months' =&gt; [
                     Toolforge::MixNMatch::Object::YearMonth-&gt;new(
                             'count' =&gt; 3,
                             'month' =&gt; 9,
                             'year' =&gt; 2020,
                     ),
             ],
     );
     my $cat2 = Toolforge::MixNMatch::Object::Catalog-&gt;new(
             'count' =&gt; 10,
             'type' =&gt; 'Q5',
             'users' =&gt; [
                     Toolforge::MixNMatch::Object::User-&gt;new(
                             'count' =&gt; 3,
                             'uid' =&gt; 1,
                             'username' =&gt; 'Skim',
                     ),
                     Toolforge::MixNMatch::Object::User-&gt;new(
                             'count' =&gt; 2,
                             'uid' =&gt; 2,
                             'username' =&gt; 'Foo',
                     ),
             ],
             'year_months' =&gt; [
                     Toolforge::MixNMatch::Object::YearMonth-&gt;new(
                             'count' =&gt; 3,
                             'month' =&gt; 9,
                             'year' =&gt; 2020,
                     ),
                     Toolforge::MixNMatch::Object::YearMonth-&gt;new(
                             'count' =&gt; 2,
                             'month' =&gt; 10,
                             'year' =&gt; 2020,
                     ),
             ],
     );

     my $diff_cat = Toolforge::MixNMatch::Diff::diff($cat1, $cat2);

     # Print out.
     print "Catalog #1:\n";
     print Toolforge::MixNMatch::Print::Catalog::print($cat1)."\n\n";
     print "Catalog #2:\n";
     print Toolforge::MixNMatch::Print::Catalog::print($cat2)."\n\n";
     print "Diff catalog:\n";
     print Toolforge::MixNMatch::Print::Catalog::print($diff_cat)."\n";

     # Output:
     # Catalog #1:
     # Type: Q5
     # Count: 10
     # Year/months:
     #         2020/9: 3
     # Users:
     #         Skim (1): 2
     #         Foo (2): 1
     # 
     # Catalog #2:
     # Type: Q5
     # Count: 10
     # Year/months:
     #         2020/9: 3
     #         2020/10: 2
     # Users:
     #         Skim (1): 3
     #         Foo (2): 2
     # 
     # Diff catalog:
     # Type: Q5
     # Count: 10
     # Year/months:
     #         2020/10: 2
     # Users:
     #         Foo (2): 1
     #         Skim (1): 1

DEPENDENCIES
    Error::Pure, Toolforge::MixNMatch::Object::Catalog,
    Toolforge::MixNMatch::Object::User,
    Toolforge::MixNMatch::Object::YearMonth.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Toolforge-MixNMatch-Diff&gt;

AUTHOR
    Michal Josef Е&nbsp;paДЌek &lt;mailto:skim@cpan.org&gt;

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

LICENSE AND COPYRIGHT
    В© Michal Josef Е&nbsp;paДЌek 2020

    BSD 2-Clause License

VERSION
    0.04

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