1CPAN::Changes::Release(U3s)er Contributed Perl DocumentatCiPoAnN::Changes::Release(3)
2
3
4

NAME

6       CPAN::Changes::Release - Information about a particular release
7

SYNOPSIS

9           my $rel = CPAN::Changes::Release->new(
10               version => '0.01',
11               date    => '2009-07-06',
12           );
13
14           $rel->add_changes(
15               { group => 'THINGS THAT MAY BREAK YOUR CODE' },
16               'Return a Foo object instead of a Bar object in foobar()'
17           );
18

DESCRIPTION

20       A changelog is made up of one or more releases. This object provides
21       access to all of the key data that embodies a release including the
22       version number, date of release, and all of the changelog information
23       lines. Any number of changelog lines can be grouped together under a
24       heading.
25

METHODS

27   new( %args )
28       Creates a new release object, using %args as the default data.
29
30   version( [ $version ] )
31       Gets/sets the version number for this release.
32
33   date( [ $date ] )
34       Gets/sets the date for this release.
35
36   note( [ $note ] )
37       Gets/sets the note for this release.
38
39   changes( [ $group ] )
40       Gets the list of changes for this release as a hashref of group/changes
41       pairs. If a group name is specified, an array ref of changes for that
42       group is returned. Should that group not exist, undef is returned.
43
44   add_changes( [ \%options ], @changes )
45       Appends a list of changes to the release. Specifying a "group" option
46       appends them to that particular group. NB: the default group is
47       represented by and empty string.
48
49           # Append to default group
50           $release->add_changes( 'Added foo() function' );
51
52           # Append to a particular group
53           $release->add_changes( { group => 'Fixes' }, 'Fixed foo() function' );
54
55   set_changes( [ \%options ], @changes )
56       Replaces the existing list of changes with the supplied values.
57       Specifying a "group" option will only replace change items in that
58       group.
59
60   clear_changes( )
61       Clears all changes from the release.
62
63   groups( sort => \&sorting_function )
64       Returns a list of current groups in this release.
65
66       If sort is provided, groups are sorted according to the given function.
67       If not, they are sorted alphabetically.
68
69   add_group( @groups )
70       Creates an empty group under the names provided.
71
72   delete_group( @groups )
73       Deletes the groups of changes specified.
74
75   delete_empty_groups( )
76       Deletes all groups that don't contain any changes.
77
78   serialize( group_sort => \&sorting_function )
79       Returns the release data as a string, suitable for inclusion in a
80       Changes file.
81
82       If group_sort is provided, change groups are sorted according to the
83       given function. If not, groups are sorted alphabetically.
84
85   get_group( [ $name ] )
86       Returns the internal CPAN::Changes::Group object for the group $name.
87
88       If $name is not specified, the "default" group "('')" will be returned.
89
90       If $name does not exist, a CPAN::Changes::Group object will be created,
91       and returned.
92
93   attach_group( $group_object )
94       Attach a CPAN::Changes::Group object to the "::Release". Note that the
95       name is not specified, as it is instead determined from
96       "$group_object->name"
97
98   group_values( sort => \&sorting_function )
99       Works like "groups" but instead returns "CPAN::Changes::Group"
100       compatible objects.
101

SEE ALSO

103       ·   CPAN::Changes::Spec
104
105       ·   CPAN::Changes
106
107       ·   Test::CPAN::Changes
108

AUTHOR

110       Brian Cassidy <bricas@cpan.org>
111
113       Copyright 2011-2013 by Brian Cassidy
114
115       This library is free software; you can redistribute it and/or modify it
116       under the same terms as Perl itself.
117
118
119
120perl v5.32.0                      2020-07-28         CPAN::Changes::Release(3)
Impressum