NAME

Changes::Group - Group object class

SYNOPSIS

use Changes::Group;
my $g = Changes::Group->new(
    line => 12,
    name => 'Front-end',
    spacer => "\t",
    debug => 4,
) || die( Changes::Group->error, "\n" );
say $g->as_string;

VERSION

v0.1.0

DESCRIPTION

This object class represents a Changes file group within a release section. It is completely optional.

METHODS

as_string

Returns a scalar object of the change group. This is a group name enclosed in square brackets:

[my group]

It returns a scalar object

If an error occurred, it returns an error

The result of this method is cached so that the second time it is called, the cache is used unless there has been any change.

changes

Read only. This returns an array object containing all the change objects within this group object.

elements

Sets or gets an array object of all the elements within this group object. Those elements can be Changes::Change and Changes::NewLine objects.

line

Sets or gets an integer representing the line number where this line containing this group information was found in the original Changes file. If this object was instantiated separately, then obviously this value will be undef

name

Sets or gets the group name as a scalar object

nl

Sets or gets the new line character, which defaults to \n

It returns a number object

raw

Sets or gets the raw version of the group as found in the Changes file. If set and nothing has been changed, this will be returned by "as_string" instead of computing the formatting of the group.

It returns a scalar object

spacer

Sets or gets the leading space, if any, found before the group.

It returns a scalar object

type

Sets or gets the type of group for this object. This can either be bracket, which is the default, or colon:

[My group]
# or
My group:

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Changes, Changes::Release, Changes::Change

COPYRIGHT & LICENSE

Copyright(c) 2022 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.