NAME
Changes::NewLine - New Line Class
SYNOPSIS
use Changes::NewLine;
my $nl = Changes::NewLine->new(
nl => "\n",
line => 12,
raw => "\t\n",
) || die( Changes::NewLine->error, "\n" );
say $nl->as_string;
VERSION
v0.1.0
DESCRIPTION
This class represents a new line in the Changes
file.
CONSTRUCTOR
new
This takes an hash or an hash reference of following options, and instantiate a new Changes::NewLine object and returns it.
If an error occurred, it returns an error
line
The line number where this new line was found in the
Changes
file.nl
The format of the new line to use with "as_string"
raw
The raw initial value such as it is found when parsing the
Changes
file with "parse" in Changes
METHODS
as_string
Returns a string representation of the new line. If raw
is defined with "raw", then that initial value will be used and returned, otherwise, it will use whatever value is set with "nl".
Returns a scalar object
line
Sets or gets the line number at which this new line appeared in the Changed
file. This is set by "parse" in Changes
Returns a number object
nl
Sets or gets the new line sequence. For example \n
, or \r\n
, or \015\012
(same as previous, but more portable), etc.
Returns a scalar object
raw
Sets or gets the initial new line value. This is set upon parsing by "parse" in Changes
Returns a scalar object
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Changes, Changes::Release, Changes::Group, Changes::Changes, Changes::Version
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.