NAME
    CPAN::Changes::Utils - Utilities for CPAN::Changes.

SYNOPSIS
     use CPAN::Changes::Utils qw(construct_copyright_years);

     my $copyright_years = construct_copyright_years($changes);

DESCRIPTION
    Utilities for work with CPAN::Changes objects. One utility is subroutine
    to construct copyright years (from-to) from CPAN::Changes instance.

SUBROUTINES
  "construct_copyright_years"
     my $copyright_years = construct_copyright_years($changes);

    Construct copyright year(s) from CPAN::Changes instance.

    Returns string or undef.

EXAMPLE
     use strict;
     use warnings;

     use IO::Barf qw(barf);
     use File::Temp;
     use CPAN::Changes;
     use CPAN::Changes::Utils qw(construct_copyright_years);

     # Content.
     my $content = <<'END';
     0.02 2019-07-13
      - item #2
      - item #3
 
     0.01 2009-07-06
      - item #1
     END

     # Temporary file.
     my $temp_file = File::Temp->new->filename;

     # Barf out.
     barf($temp_file, $content);

     # Create CPAN::Changes instance.
     my $changes = CPAN::Changes->load($temp_file);

     # Construct copyright years.
     my $copyright_years = construct_copyright_years($changes);

     # Print copyright years to stdout.
     print "Copyright years: $copyright_years\n";

     # Unlink temporary file.
     unlink $temp_file;

     # Output:
     # Copyright years: 2009-2019

DEPENDENCIES
    Exporter, List::Util, Readonly.

REPOSITORY
    <https://github.com/michal-josef-spacek/CPAN-Changes-Utils>

AUTHOR
    Michal Josef Е paДЌek <mailto:skim@cpan.org>

    <http://skim.cz>

LICENSE AND COPYRIGHT
    В© 2025 Michal Josef Е paДЌek

    BSD 2-Clause License

VERSION
    0.02