From 3e4fee89dd1224aedbf34df55047da6b7d05dcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=B6hmer?= Date: Tue, 27 Nov 2018 10:51:03 +0100 Subject: [PATCH] Fix trailing whitespace in header comments --- lib/SQL/Translator/Utils.pm | 10 +++++----- t/12header_comment.t | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/SQL/Translator/Utils.pm b/lib/SQL/Translator/Utils.pm index ccc7ad3a2..f96441cfa 100644 --- a/lib/SQL/Translator/Utils.pm +++ b/lib/SQL/Translator/Utils.pm @@ -9,7 +9,7 @@ use Try::Tiny; use Carp qw(carp croak); our $VERSION = '1.59'; -our $DEFAULT_COMMENT = '-- '; +our $DEFAULT_COMMENT = '--'; use base qw(Exporter); our @EXPORT_OK = qw( @@ -111,14 +111,14 @@ sub header_comment { my $header_comment =<<"HEADER_COMMENT"; ${comment_char} -${comment_char}Created by $producer -${comment_char}Created on $now +${comment_char} Created by $producer +${comment_char} Created on $now ${comment_char} HEADER_COMMENT # Any additional stuff passed in for my $additional_comment (@_) { - $header_comment .= "${comment_char}${additional_comment}\n"; + $header_comment .= "${comment_char} ${additional_comment}\n"; } return $header_comment; @@ -547,7 +547,7 @@ Will give three different results; specifically: =head2 $DEFAULT_COMMENT -This is the default comment string, '-- ' by default. Useful for +This is the default comment string, '--' by default. Useful for C. =head2 parse_mysql_version diff --git a/t/12header_comment.t b/t/12header_comment.t index 17c091170..84f585852 100644 --- a/t/12header_comment.t +++ b/t/12header_comment.t @@ -8,7 +8,7 @@ use SQL::Translator::Utils qw($DEFAULT_COMMENT header_comment); # Superfluous test, but that's ok use_ok("SQL::Translator::Utils"); -is($DEFAULT_COMMENT, '-- ', 'default comment'); +is($DEFAULT_COMMENT, '--', 'default comment'); like(header_comment("foo"), qr/[-][-] Created by foo/, "Created by..."); my $comm = header_comment("My::Producer",